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

Subreport blang if main report blank

Status
Not open for further replies.

ErnstNoto

Programmer
Dec 20, 2009
48
SE
Hi!

I am having a little problem with one of my reports. Mainly it works just fine, but if the main report dont get any result, wich may happen, it wont show any result from the sub-report even if there is a result to be shown.

It seems as though crystal dont se any reason to refresh/run the subreport if the main report dont get any data.

Ideas?

Best Regards
Ernst Noto
 
Are you passing some value from the main report? If so, the subreport will use it for selection, unless you remove the selection. If a record is missing it is counted as Nulls, and Nulls stop everything unless an IsNull test is used first.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
If main report is blank then there is no link to pass data to subreport and thus it is blank.

If the SR is independent of main report then build a container report which has no database connection.
Add the SR and Main report as two Sub Reports (you must remove SR from Main report before you do this)

Data will now be returned from even if one is blank

Ian
 
ah! No the subreport is not independent - I do pass values from main report and these are needed to make out a whole. Dont think I will bother with it.

Thank you for a very speedy respons though :)



Best Regards
Ernst Noto
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top