dbTalk Databases Forums  

access97, report formatting

comp.databases.ms-access comp.databases.ms-access


Discuss access97, report formatting in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Roger
 
Posts: n/a

Default access97, report formatting - 03-08-2010 , 02:01 PM






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 ?

Reply With Quote
  #2  
Old   
Salad
 
Posts: n/a

Default Re: access97, report formatting - 03-08-2010 , 02:29 PM






Roger wrote:

Quote:
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.

Reply With Quote
  #3  
Old   
Roger
 
Posts: n/a

Default Re: access97, report formatting - 03-08-2010 , 03:38 PM



On Mar 8, 12:29*pm, Salad <sa... (AT) oilandvinegar (DOT) com> wrote:
Quote:
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 -
hide duplicates seems to work in the details section if a control
contains duplicate data
but it doesn't work in a group header section if the control contains
duplicate
unless there's a specific setting (other than 'hide duplicates') that
I'm missing

Reply With Quote
  #4  
Old   
Roger
 
Posts: n/a

Default Re: access97, report formatting - 03-08-2010 , 04:21 PM



On Mar 8, 12:29*pm, Salad <sa... (AT) oilandvinegar (DOT) com> wrote:
Quote:
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 ?

Reply With Quote
  #5  
Old   
paii, Ron
 
Posts: n/a

Default Re: access97, report formatting - 03-09-2010 , 08:02 AM



"Roger" <lesperancer (AT) natpro (DOT) com> wrote

Quote:
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 ?
On-Format may work better for hiding sections then On-Print.

Reply With Quote
  #6  
Old   
Salad
 
Posts: n/a

Default Re: access97, report formatting - 03-09-2010 , 10:59 AM



Roger wrote:

Quote:
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 ?

"You can use the HideDuplicates property to hide a control on a report
when its value is the same as in the preceding record.

I assume that when you set another grouping, it (dupe check) gets reset
on a new group. I think the key is "preceding record." from the the
help notes sentence.

I had tested in out, when I replied yesterday, in a small table on A2003
and it seemed to work fine.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.