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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New page for report footer subreport IF it isn't blank

Status
Not open for further replies.

jenlion

IS-IT--Management
Nov 13, 2001
215
I have a report with a subreport in my last report footer.

Often, this report is blank. However, if it is not blank, I need it to start on a new page.

Since it's at the end of the report, I don't want a new page if there is no data in this subreport! Then I get a new page with the page header info, but nothing else.

How can I do new page after/before only if my subreport has data? I don't think I can do whileprintingrecords variables because I need to know before the subreport prints whether to start a new page.

Any help is appreciated.
 
Unfortunately the answer is ugly as the report footer doesn't know what's in the subreport until it's fired...

So you would have to prefire the subreport (or one which uses similar SQL to return if there are any rows) in a previous section, and use a shared variable to make the suppression formula.

I know, it's an awful solution.

Depending upon your version of Crystal/database, there may be other options, such as eliminating the subreport (optimal).

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top