Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Breaks - Help!

Status
Not open for further replies.

Binnit

Technical User
Apr 28, 2004
627
US
I have a report which contains a subreport.

The main report does not have Report Header/Footer, there is nothing in the Page header or Detail sections

There are 2 Groupfooters and the subreport is contained within one of these sections with Page breaks set "before and after" this footer section.

I need to be able to turn off the subreport footer section if there is no data in the actual subreport. I am hoping that by turning off the groupfooter the pagebreak settings will be ignored.

I have tried using various events with multiple code variants, the best one so far is the following:-

Code:
Private Sub GroupFooter1_Format(Cancel As Integer, FormatCount As Integer)
If Me.txtVariationsSchedule.Report.HasData Then

Me.Section(acGroupLevel1Footer).Visible = True
Else
Me.Section(acGroupLevel1Footer).Visible = False
End If
End Sub

However, this still produces a blank page at the end of the main report and the page count includes the blank.

Either I'm close to getting the required result, or, I'm on the wrong path completely!

Any assistance welcomed.
Thanks




If IT ain’t working Binnit and Reboot
 
sounds like the subreport itself needs to be cancelled when there's no data...

--------------------
Procrastinate Now!
 
Crowley
Yeah thats already in place, but still no joy.

Any other suggestions?


If IT ain’t working Binnit and Reboot
 
well, you said there were 2 group footers, maybe you should disable both...

or you can try getting rid of the pagebreak after property of the footers...

--------------------
Procrastinate Now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top