How do you change formatting at certain point in report?

  • Thread starter Thread starter Mike.Wolowicz
  • Start date Start date
M

Mike.Wolowicz

I'd like my report's background colour to change and/or a line to
appear at a certain point in my report. I've got 67 records to display.
After record 27 I want a line, a new page and grey background.

How do I do this? Thanks.
 
I'd like my report's background colour to change and/or a line to
appear at a certain point in my report. I've got 67 records to display.
After record 27 I want a line, a new page and grey background.

How do I do this? Thanks.

Add an unbound control to the detail section
Set it's control source to
=1
Set it's Running Sum property to Over All.
Name this control "RecCount".
You can make this control Not Visible.

Add a line near the bottom of the Detail section.
Name the Line control "ALine"
Add a PageBread control under the line.
Name the PageBreak control "Break"

Code the Detail Format event:

[ALine].Visible = [RecCount] = 27
[Break].Visible = [RecCount] = 27
If [RecCount] >= 28 Then
Me.Section(0).BackColor = 12632256
Else
Me.Sectionm(0).BackColor = 16777215
End If

Change the BackColors as wanted.
 
Thanks for that Fred. This worked quite well.

One more thing though...
I've got two sub reports in the main report. Is there a way to get the
sub reports to show white while the main report is above [RecCount] =
27 and grey below? The sub reports hold many records to the main
reports one. I think I could do this if I could set the background
colour of the sub report to transparent... but haven't seen where I can
do this. Is there another way?
 

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

Back
Top