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

Unrelated subreport does not show if no data on main report 1

Status
Not open for further replies.

SuperTime

Programmer
Dec 21, 2004
183
US
Crystal 9


I have a main report and one subreport. They are not related. I dont have and subreport links. If i dont have data from the stored proc. on the main report, but I have data on the sub report stored proc. then the subreport does not show.
Is that the way crystal supposed to behave, i.e. not show the unrelated subreport if there is no data on the main report?

Please advice..
 
Which section? Does it have a suppression formula? If so, does it include an ISNULL test?

A work-round would be to create a 'shell' report that does something simple and calls both the subreport and the current main report redefined as a subreport. Note that you can get the equivalent of 'page headers' using a group for the whole subreport and group header on each page.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 


The subreport currently is in the Report Footer Section. And there is no suppression formula on it.

Rather than creating a shell report that contains my current main report as the subreport alongwith the other subreport. May be I can simply insert the stored proc of the subreport in the main report , will that work? cause i have seen posts where it says that CR cannot have multiple results.. i.e. two sets of results from two unlinked stored procs.?
 
Sorry, I don't know. I'd have expected a subreport to show if it was in the report footer. You could try the report header instead. (If that would make it out-of-sequence, include a suppression for that section when the main report does have data.)

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
In File ->Options on the Reporting Tab there is a check box
Suppress printing if no records returned

Make sure this is unchecked

There is a similar check box in File ->Report options , again for main report make sure this is unchecked.

Ian
 


That did the trick....In File ->Options on the Reporting Tab there is a check box Suppress printing if no records returned . I unchecked it and boom.. there my subreport showed up :)

In File ->Report options , it was already unchecked.

Awesome! thanks a lot.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top