subreports will not print when no data (They should)

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

Guest

The main report is unbound with a page header & footer. The detail is 2
almost identical reports with a new page control in between. It is a Bank
reconciliation that prints Month to date and year to date reconciliation.
Each report has a dummy group for the static data. The detail is for
unpresented transactions. This means that often there is no qualified data to
print except the Static data. Each Subreport prints fine when there is no
data on there own but inside the main Report they dont print. The only print
is the main report page header and footer. The whole thing works fine when
there is data. The on no data is not raise in any report.
Please help as i stuck on this.
thanks
 
Yep, you are correct, if the subreport doesn't have data it will never
display or print. There's really only one work around for this, that is to
copy your subreport to a new report and unbind it to the data source. Call
it something like YourExistingSubNameNoData

Then, overlay that sub report on your existing sub report and from the
Format menu, choose send to back, so that your "active sub" sits squarely on
top of the NoData sub, obscuring it when there's actual data. Then, when
there's no data and your active sub report doesn't display the unbound copy
of the sub with the static data will be shown in its place.

Regards
 
Thanks that was very helpful and it gave me an idea which was a bit simpler.
I just removed the recordsource in the on open of the 2 subforms and it
works fine.
Thanks again for your help
 
Back
Top