Testing subreport for HasData

  • Thread starter Thread starter WB
  • Start date Start date
W

WB

I am unclear where to place the code for testing HasData. Looking up
HasData online shows to place the test in Format or Print, but when the
report is executed the Format method is never called when no data is
present. I don't know what the appropriate place to make the HasData call
is supposed to be.

WB
 
WB said:
I am unclear where to place the code for testing HasData. Looking up
HasData online shows to place the test in Format or Print, but when the
report is executed the Format method is never called when no data is
present. I don't know what the appropriate place to make the HasData call
is supposed to be.


I depends on what you have in the report. If it's checking
if a subreport has data, then it gotes in the Format event
of the main report section that contains the subreport.

If you want to check if the main report has any data then
you should us the main report's Open event of it's Report
Header section's Format event.
 
Back
Top