![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I've got a query returning dept employee details which is used to create a report, where I'm grouping on department and employee the groupings each have a header section to show the department and the employee the details section shows the details from the query so the report shows department employee details which works, now I want to hide the department if there are duplicates I tried using 'hide duplicates' on the department textbox no luck I managed to use 'on print' event coding to not show the department unless it's the first occurrence - works fine Department.Visible = Not (lastDepartment = Department And lastDepartment <> "") Cancel = Not (Department.Visible) lastDepartment = Department but it doesn't reclaim the space where the department would normally be shown, even if the section's 'can shrink' is set to Yes so I see this department employee details employee details instead of department employee details employee details is there a way to only show a department once, ie hide duplicates, and shrink the report ? |
#3
| |||
| |||
|
|
Roger wrote: I've got a query returning dept employee details which is used to create a report, where I'm grouping on department and employee the groupings each have a header section to show the department and the employee the details section shows the details from the query so the report shows department * *employee * * * details which works, now I want to hide the department if there are duplicates I tried using 'hide duplicates' on the department textbox no luck I managed to use 'on print' event coding to not show the department unless it's the first occurrence - works fine * * Department.Visible = Not (lastDepartment = Department And lastDepartment <> "") * * Cancel = Not (Department.Visible) * * lastDepartment = Department but it doesn't reclaim the space where the department would normally be shown, even if the section's 'can shrink' is set to Yes so I see this department * *employee * * * details * *employee * * * details instead of department * *employee * * * details * *employee * * * details is there a way to only show a department once, ie hide duplicates, and shrink the report ? *From A2003 help it states "You can use the HideDuplicates property to hide a control on a report when its value is the same as in the preceding record. Read/write Boolean." Were the dupes not in sorted order? I'd expect the order to be this instead. * department * * *employee * * * * details * * * * details *'dupe emp name * * *employee * * * * details I'd check your grouping and sorting settings.- Hide quoted text - - Show quoted text - |
#4
| |||
| |||
|
|
Roger wrote: I've got a query returning dept employee details which is used to create a report, where I'm grouping on department and employee the groupings each have a header section to show the department and the employee the details section shows the details from the query so the report shows department * *employee * * * details which works, now I want to hide the department if there are duplicates I tried using 'hide duplicates' on the department textbox no luck I managed to use 'on print' event coding to not show the department unless it's the first occurrence - works fine * * Department.Visible = Not (lastDepartment = Department And lastDepartment <> "") * * Cancel = Not (Department.Visible) * * lastDepartment = Department but it doesn't reclaim the space where the department would normally be shown, even if the section's 'can shrink' is set to Yes so I see this department * *employee * * * details * *employee * * * details instead of department * *employee * * * details * *employee * * * details is there a way to only show a department once, ie hide duplicates, and shrink the report ? *From A2003 help it states "You can use the HideDuplicates property to hide a control on a report when its value is the same as in the preceding record. Read/write Boolean." Were the dupes not in sorted order? I'd expect the order to be this instead. * department * * *employee * * * * details * * * * details *'dupe emp name * * *employee * * * * details I'd check your grouping and sorting settings.- Hide quoted text - - Show quoted text - |
#5
| |||
| |||
|
|
I've got a query returning dept employee details which is used to create a report, where I'm grouping on department and employee the groupings each have a header section to show the department and the employee the details section shows the details from the query so the report shows department employee details which works, now I want to hide the department if there are duplicates I tried using 'hide duplicates' on the department textbox no luck I managed to use 'on print' event coding to not show the department unless it's the first occurrence - works fine Department.Visible = Not (lastDepartment = Department And lastDepartment <> "") Cancel = Not (Department.Visible) lastDepartment = Department but it doesn't reclaim the space where the department would normally be shown, even if the section's 'can shrink' is set to Yes so I see this department employee details employee details instead of department employee details employee details is there a way to only show a department once, ie hide duplicates, and shrink the report ? |
#6
| |||
| |||
|
|
On Mar 8, 12:29 pm, Salad <sa... (AT) oilandvinegar (DOT) com> wrote: Roger wrote: I've got a query returning dept employee details which is used to create a report, where I'm grouping on department and employee the groupings each have a header section to show the department and the employee the details section shows the details from the query so the report shows department employee details which works, now I want to hide the department if there are duplicates I tried using 'hide duplicates' on the department textbox no luck I managed to use 'on print' event coding to not show the department unless it's the first occurrence - works fine Department.Visible = Not (lastDepartment = Department And lastDepartment <> "") Cancel = Not (Department.Visible) lastDepartment = Department but it doesn't reclaim the space where the department would normally be shown, even if the section's 'can shrink' is set to Yes so I see this department employee details employee details instead of department employee details employee details is there a way to only show a department once, ie hide duplicates, and shrink the report ? From A2003 help it states "You can use the HideDuplicates property to hide a control on a report when its value is the same as in the preceding record. Read/write Boolean." Were the dupes not in sorted order? I'd expect the order to be this instead. department employee details details 'dupe emp name employee details I'd check your grouping and sorting settings.- Hide quoted text - - Show quoted text - ok, I created a new report, same query query returns 22 rows where department is always 'sales' sorting/grouping set to department ascending group header yes group footer no group on each value group interval 1 keep together no the 'department' group header is set to defaults force new page none new row or col none keep together yes visible yes can grow no can shrink no only one control on report in 'department' header control source department hide duplicates yes can grow no can shrink no since I'm hiding duplicates, when running the report, I expect to see "sales" only once, and I do now, if I leave everything as is, but I just insert an extra sorting/grouping, so that I have monthYear ascending group header no group footer no group on each value group interval 1 keep together no department ascending group header yes group footer no group on each value group interval 1 keep together no when running the report,since the monthYear grouping is for sorting purposes, and has neither a header or footer group, and I still have 22 rows with a department of 'sales', I still expect to see "sales" only once, but I see it 22 times why does the extra group affect this ? how can I sort my report by monthYear, by department and still hide duplicate departments ? |
![]() |
| Thread Tools | |
| Display Modes | |
| |