View Full Version : Hiding Duplicates in Multi-row Details


jimd
04-09-2009, 06:45 PM
Hi,
I have a report that covers multiple lines. It's of the format

----------------Long Group Text Item A ----------------
----------------Long Group Text Item B ----------------
----- Text Item C -------------- Text Item D -- Text E--

I'm able to get the group items to not print using Hideduplicates option (or the isVisible property in VBA) for the field but the line space is still taking space on the report. In other words, the report prints like this when item A and B are the same for two consecutive records.

--------------Line 1 Item A1--------------
--------------Line 2 Item B1--------------
-----Item C1------Item D1---------Item E1
------------Blank line since A1 is a dupe---
------------Blank line since B1 is a dupe---
-----Item C2------Item D2---------Item E2

How can I get rid of the blank lines? Setting the height to 0 when A1.isvisible is false, generates a error 2191. Any tips or hints would be greatly appreciated!

Thanks!

boblarson
04-09-2009, 07:17 PM
If the whole line is a duplicate and is blank, setting the section's Can Shrink property to YES and setting each control's Can Shrink property to YES should do it.

jimd
04-09-2009, 07:28 PM
Thanks, Bob, for your quick reply and it made sense to me but it only seems to shrink the visible data. For example, in Layout View, the boxes for the data are still showing ... and of course, still showing in Print Preview. You seem to be a guru, any other thoughts?

Regards, --Jim

boblarson
04-09-2009, 07:36 PM
Layout view it wouldn't affect it at all - that isn't meant for viewing anyway. That is more of a WYSIWIG on the fly editor for some things. Not sure why it would show in Print Preview. Can you share a screenshot of the Design view and a screenshot of Print Preview to show what you see?

jimd
04-09-2009, 07:52 PM
Thanks for taking a look!

boblarson
04-09-2009, 07:58 PM
And the Design View?

jimd
04-09-2009, 08:04 PM
... and the design view. Took some time to get it under the 100KB limit.

boblarson
04-09-2009, 08:28 PM
quick question - why not put the Org and sub area boxes in the group header instead and then they won't be duplicated for sure.

jimd
04-09-2009, 08:51 PM
Works great. I'm a DB designer not a Reports developer but it's been a good Day One with Access reports. THANK YOU!