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

Using a subreport based on a stored procedure to pass values to main

Status
Not open for further replies.

elsenorjose

Technical User
Oct 29, 2003
684
US
I have an interesting dilemma which I can't figure a solution for. A web based application our company uses does not support the '@parameter' format in stored procedures in Crystal Reports since it uses some sort of style sheet that parses the '{?parameter}' format of Crystal to generate a parameter selection page. What I'm wondering is if it is possible to use a subreport as some sort of container for the data and pass the values up to the main report with the main report parameters using the Crystal parameter format. Basically, I'm hoping the web application will only look at the main report and see the '{?parameter}' and work properly.

I am using Crystal Reports XI on a SQL Server 2005 backend.

Thanks.
 
Subreports can pass back individual fields using Shared Variables. But not a complete file.

You might use a subreport to get at the parameter and then pass up its value.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 10 & 11.5 with Windows XP [yinyang]
 
Thanks Madawc. I'll search the site for the exact way to do that.
 
Hoping someone can help with this still. I'm not clear on how I would select a data source in the main report. I tried creating a blank report with a subreport which used the stored procedure as the data source. Then I created my parameters in the main report and linked them to the stored procedure parameters in the subreport. However, I can't insert my crosstab in the main report because there's no datasource. Am I approaching this wrong?

Thank you.
 
Can you put the crosstab in the subreport? If not, you might need to use two subreports, each using the same Stored Procedure to get the same data.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 10 & 11.5 with Windows XP [yinyang]
 
Tried that. Turns out the application has some 'undocumented feature' that is causing the subreport to be truncated. It only displays 4 pages then stops. This is really an application issue, but I'm trying to find workarounds in CR before escalating to the vendor.
 
You could try a new thread in Forum 3, Integrate. Maybe someone else has had the same problem.

Or you could try exporting, maybe to Excel. See if that stops the truncation.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 10 & 11.5 with Windows XP [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top