No Data Event

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report and in the report header section exists a subreport that will
print company-wide reports for a client that has multiple projects. If I
print a report for a client that doesn't have multiple projects to report
then I have the following event placed in the On Format control of the Report
Header section

Me.COWIDEREPORTS.Visible = Me.AT_COWIDE_subreport.Report.HasData

This works in so far as the reports are not visible, however I still get a
blank page as the first page of my report. Can Shrink settings are set to
YES for the Report Header section as well as the subreport itself. Force new
page is also set to NONE.

Driving me crazy!
 
Can Shrink works as you desire in the Detail section only. Change your code
to this:

Me.COWIDEREPORTS.Visible = Me.AT_COWIDE_subreport.Report.HasData
Me.ReportHeader.Visible = Me.AT_COWIDE_subreport.Report.HasData
 
As you told in the prev post the Report Header Doesn't shrink.
If you have other information that you want to be displayed even when there
is no data in the Sub report, then you can change the height of the report
header to the height it would have been without the sub report

IF Me.AT_COWIDE_subreport.Report.HasData = False then
Me.COWIDEREPORTS.Visible= False
Me.ReportHeaderName.Height = 2
End If
 
Back
Top