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

stored proc with para and subreport 1

Status
Not open for further replies.

alank01

Programmer
Jun 11, 2001
21
US
crystal 8.5 sql 2000 stored procedure with para.

main report proc1 with p1,p2,p3
sub report 1 proc2 with p1,p2,p3
sub report 2 proc3 with p1,p2,p3

the question is how do you ensure that para sent to the main report are also received by sub reports? currently the report will print info on the main report but the sub report cursors/procedures are not showing any detail. is there a shared variable or some formula that can be used in the report so that the sub report para are automatically assigned their values and pick up data?

Any suggestions appreciated. [neutral]
 
Just link the subreport to the main report by the parms in the main report.

Right click the subreport and select Change Subreport Links.

You won't need parms in the sub unless you have something unique.

You *can* create shared variables, but they're not required in this instance.

-k kai@informeddatadecisions.com
 
If the subreports are based on stored procedures with input parameters, those parameters are passed back to the subreport design. In the Change Subreport Links dialog, take care to link the main report parameters to the stored-procedure parameters in the subreport and NOT to the default (?Pm-xxx) parameters that CR insists on creating. Click on the tiny scroll arrows on the right side of the "Subreport parameter field to use" list and scroll down to select the correct entries. The "Select data..." checkbox and list will be grayed out - selection is done in the SP.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top