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

Subreport not displaying when no records in main report.

Status
Not open for further replies.

isoft

Programmer
Apr 3, 2001
14
AU
Hi,
I have a report that contains a subreport that is used to show full descriptions of the parameters passed into the main report. When the report returns some data the subreport also is displayed, however when no data is returned in the main report the subreport is not shown. Even though it should as it is meant to show the full details of the parameters passed in. This works when designing the report in preview, but not when compiled. Any ideas?
 
see faq149-237.
What section of the report is the subreport placed in?
Can you make the subreport be the main report, and insert a subreport to show the data? Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Hi Ken,
I'm using v8.5 of CR, VB6 and am using RDC to integrate.
Both main and subreport run SQL2000 stored procedures and use ODBC to connect to the underlying database.
The subreport is placed into a page header section, the other page headers above and below the subreport display, (a title and an underline), and have no conditional formatting.

Swapping the reports would be a bit of work, but do-able i guess, ideally i will be using the subreport to handle displaying parameter information on a number of different reports.
 
Is the subreport linked to a value in the main report?
I don't think a linked subreport will run, because it doesn't have a link value from the main report. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
yes the subreport is linked, and returns all the correct data when there are records in the main report, but if there are no records returned in the main report then the subreport doesnt display. However it always works in preview mode when developing regardless of records returned or not.
 
Is the subreport linked ONLY to parameter fields in the main report? I guess then it would have values.

I cant think of a reason why it would behave differently in the RDC, but obviously it is. You may be stuck with flipping them over. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top