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

Problem supressing a Sub Report using Shared Variables

Status
Not open for further replies.

SamanthaW

IS-IT--Management
Aug 26, 2002
15
0
0
AU
Hi

I have created a sub report that sits within the details section of the main report. I have also created a shared variable which passes the total from the sub report to a formula in the main report's group footer.

This works sucessfully until I supress the details section on the main report. I am presuming it is doing this because once supressed the subreport is not actually running and is not passing any values to my main report formula.

If I move the sub report to the main report group footer this works for most records but due to the grouping levels applied some records are only showing the total of the last record and not all records in that grouping category.

Is there any way around this?? My reading of previous messages on the forum suggests that placing a sub report within the subreport itself may be the way to go.

Any help would be appreciated.

Thanks

Sam
 
Two comments: First Crystal doesn't allow nested subreports. Second, in my experience a subreport at the detail level is usually (at least 90% of the time) an indicator that the report is not using efficient joins to collect the data. It's very possible you actually need the subreport to accomplish the goal of the report, but it's much more likely you don't. Please post more info about your problem, in particular what your data looks like in terms of tables and joins, what the layout of your report is, why you are using a shared variable (what info are you passing back to the main report) and what version of Crystal you are using.
 
You can't suppress the printing of a section using a value returned by a subreport in that section. Crystal does things in a fixed order, and the decision to print or not happens before the subreport is evaluated.

There is a work-round, see thread782-477236

Madawc Williams
East Anglia, Great Britain
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top