Separator lines in footers

G

Guest

I have created a report that groups multiple fields and displays in a tabular
format. I have also inserted a horizontal line within the grouped fields
footer to clearly separate these groups. The report currently shows two
lines where one group ends and the next begins (see example below). Is there
a way to supress one of the lines in such instances?

Example:

Group 1
Sub Group 1
Sub Sub Group 1
Sub Sub Group 2
--------------------
Sub Group 2
Sub Sub Group 1
Sub Sub Group 2
--------------------
Sub Group 3
Sub Sub Group 1
Sub Sub Group 2
------------------- [Supress this line]
----------------------------
Group 2
Sub Group 1
Sub Sub Group 1
Sub Sub Group 2
--------------------
Etc....

Any suggestions would be appreciated.
Thanks,
Peter
 
M

Marshall Barton

Peter said:
I have created a report that groups multiple fields and displays in a tabular
format. I have also inserted a horizontal line within the grouped fields
footer to clearly separate these groups. The report currently shows two
lines where one group ends and the next begins (see example below). Is there
a way to supress one of the lines in such instances?

Example:

Group 1
Sub Group 1
Sub Sub Group 1
Sub Sub Group 2
--------------------
Sub Group 2
Sub Sub Group 1
Sub Sub Group 2
--------------------
Sub Group 3
Sub Sub Group 1
Sub Sub Group 2
------------------- [Supress this line]
----------------------------
Group 2
Sub Group 1
Sub Sub Group 1
Sub Sub Group 2
--------------------


I can't think of a way to do that. How about trying to turn
the problem upside down by placing the line in the Sub Group
header section? It's kind of messy, but I think I can work
out a way to make it appear the way you want.

First, move the line to the top of the Sub Group header
section. Let's say the line control is named lnSubLine

Next, add an invisible text box named txtSubGrpNum to the
SubGroup header section (below the line). Set its Control
Source expression to =1 and RunningSum to Over Group.

Now, you can use some VBA code in the group header section's
Format event procedure to suppress the line in the first sub
group in the top level group:

Me.lnSubLine.Visible = (txtSubGrpNum = 1)

If you have white space above/below the line, it's not that
simple, but get this part working and if you need additional
help, post back with the specific details.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top