Hiding dividing lines on reports

  • Thread starter Thread starter Larry
  • Start date Start date
L

Larry

I have a report with multiple groupings that have different footers. I have
drawn lines in the footers to help divide the report and make it more
readable.

The problem is, with 3 footers, even pressed close together, there is a
space between the first line and the third line. I would rather make the
previous line(s) indivisible, if they are not needed.

The lines separate all the phone numbers for an employee; and all employees
by team; and all teams by group. So if the last phone number is printed for
a person on a team, I just want the team line to print. If it's the last for
a group, I want just the group line to print.

I have been trying to figure out how to write some code to make the previous
line invisible, but I can't figure out how to tell when it should be printed
and where to put the code.

Anyone have any suggestions?
 
WOW, no one has any suggestions!

Now I don't feel so bad for not being able to solve this myself.
 
Maybe you need to explain your situation better. Maybe typing in some sample
data how it appears and how you would like it to appear.
 
I have Departments, which have Projects, which have Employees and each
Employee may have multiple locations. So I have a footer for Location,
Employee, Project and Department. In each footer, I have a line starting
under that section of data all the way to the right of the report, to
separate the data and make it more readable.

My report looks something like this:
Department Project Employee Location Phone
Abc Xyz Doe, John Houston (123)
123-4567
--------
-----------------------
New
Orleans (987) 654-3210
--------
-----------------------
--------------------------------
---------------
Doe, Jane Houston
(123) 767-3483
--------
-----------------------
--------------------------------
---------------
-------------------------------------------------
----------
Mno Smith, Frank San Ramon (878)
484-3830
--------
-----------------------
--------------------------------
---------------
-------------------------------------------------
----------
----------------------------------------------------------------------------
-
Jkl Srt Smith, Fran Midland
(757) 343-9876


Now in my report, the space between lines isn't anything like it is here (I
can't get these lines closer in the msg). But you can see some of the
"extra" lines in my report. I have closed up each footer as much as
possible, so much so that if I close them even the tiniest bit farther, the
line in that footer vanishes all together.


While I want it to look like this:
Department Project Employee Location Phone
Abc Xyz Doe, John Houston (123)
123-4567
--------
-----------------------
New
Orleans (987) 654-3210
--------------------------------
---------------
Doe, Jane Houston
(123) 767-3483
-------------------------------------------------
----------
Mno Smith, Frank San Ramon (878)
484-3830
----------------------------------------------------------------------------
-
Jkl Srt Smith, Fran Midland
(757) 343-9876


So, if the Employee footer is printing, how can I hide the Location footer
(so the line in that footer doesn't print)? If the Project footer is
printing, I need to hide the Employee and Location footers, etc.

I hope that explains it better and that someone has some ideas.
 
I am having trouble making out the structure of the report. All you need to
type is about 20 characters per line that clearly identify which section of
the report contain the lines and which lines you want to get rid of. Is the
a rule like "don't print the lines in a section if..."
 
Ok, another try.

The report prints department information. Each department can have multiple
projects. Each project can have multiple employees. Each employee can be
co-located at multiple sites.

So I have the report grouping by Dept/Proj/Employee & Location. Each ones
has a footer (no header). In the footer for Location, I have a line drawn
under Location & Phone. In the footer for Employee, the line is drawn under
Employee, Location & Phone. In the footer for Project the line is drawn
under Project, Employee, Location & Phone. In the footer for Department the
line is drawn under all columns. So (a much paired down example) would look
something like the following, if I could get it to work correctly.

D P E L P
xxx yyy zzz aaa 123
----------
bbb 456
---------------
ccc ddd 789
---------------------
eee fff ggg 876
--------------------------
hhh iiii jjj kkk 543



The problem is, when a new employee is printed, the Location footer and the
Employee footer both print. Which prints two lines, instead of one. When a
new project prints, the footer line for Location and Eemployee also prints.
In the worst case, when a new Department is printed, the lines in each of
the previous group footers are all printed. What I need is to not print a
footer, if the next footer is being printed. So it would look something like
this (though the lines are very close together in an Access report).
lll 536
----------
---------------
---------------------
--------------------------
mmm nnn ooo ppp 543



I hope this makes since, because I can't define it any more than this.
 
Are you suggesting that the lines are the only controls in the group footer?
I'm not sure if this will help but you can write some code that will cancel
the printing of a section. You can add a text box in a section and set its
Control source to =1 and its Running Sum to Over Group. This will count the
number of sections repeated in the group above it. In the on format event of
a section, you can check the value of the text box with the running sum to
see if it is equal to 1 and possibly hide it:

Cancel = Me.txtGroupEmpRunningSum = 1

--
Duane Hookom
MS Access MVP


Larry said:
Ok, another try.

The report prints department information. Each department can have multiple
projects. Each project can have multiple employees. Each employee can be
co-located at multiple sites.

So I have the report grouping by Dept/Proj/Employee & Location. Each ones
has a footer (no header). In the footer for Location, I have a line drawn
under Location & Phone. In the footer for Employee, the line is drawn under
Employee, Location & Phone. In the footer for Project the line is drawn
under Project, Employee, Location & Phone. In the footer for Department the
line is drawn under all columns. So (a much paired down example) would look
something like the following, if I could get it to work correctly.

D P E L P
xxx yyy zzz aaa 123
----------
bbb 456
---------------
ccc ddd 789
---------------------
eee fff ggg 876
--------------------------
hhh iiii jjj kkk 543



The problem is, when a new employee is printed, the Location footer and the
Employee footer both print. Which prints two lines, instead of one. When a
new project prints, the footer line for Location and Eemployee also prints.
In the worst case, when a new Department is printed, the lines in each of
the previous group footers are all printed. What I need is to not print a
footer, if the next footer is being printed. So it would look something like
this (though the lines are very close together in an Access report).
lll 536
----------
---------------
---------------------
--------------------------
mmm nnn ooo ppp 543



I hope this makes since, because I can't define it any more than this.
 
Yes, the lines are the only controls in the footers.

Thanks Duane. This might be just what I wanted.
 
Back
Top