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

Subreports and parameters

Status
Not open for further replies.

simpelli

Programmer
Jul 2, 2003
30
US
Greetings,

I have a report that contains two subreports. The main report is essentially a container to hold the two subreports. The subreports are identical in the data used, but sort and group differently depending on one of the parameters selected from the main report. Based on this boolean selection one subreport is displayed and the other disabled.

The main report only has the SP and its parameters - no data fields

All three reports use the same stored procedure with parameters.

The boolean parameter that controls which subreport that is displayed is a report parameter on the main report.

The subreports are linked to the main report on the SP parameters (Main sp param = sub sp param)

Problem:
When running in Crystal designer, all works fine.
When running in CE, ALL parameters are presented - Main and both Subs.

Any ideas on what the cause is?

Using:
Crystal 9
CE 9
Informix db
 
Unfortunately, Stored Procedures must be executed prior to any Crystal Reports processing in order for data to be returned. Code in the Record Selection Criteria won't be processed until after the Stored Procedures execute. If the Stored Procedures are parameterized, then you'll have to enter parameters for each subreport's Stored Procedure in order for them to execute. This means that you can't really link subreports that are based on Stored Procedures in a manner that would eliminate the duplicate parameters.

In your case, I'd try to redesign the report in such a way that no subreports are used. You can control the sorting and grouping through formulas and conditional formatting. This way, the Stored Procedure only executes once and, therefore, you eliminate the duplicate parameters.


~Kurt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top