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

Crystal Report prompts for stored proc parameters for subreport

Status
Not open for further replies.

cabcodespring

Programmer
May 10, 2005
1
US
I am using the Crystal Reports that came bundled with Visual Studio .NET 2003 and I have a main report that uses links to pass two parameters, an int, location_id and an nvarchar tour_id to a subreport that has a data source that is an msde/sql server stored procedure that takes those two parameters.
If I bring up "change links" for the sub report in the main report I see the two fields, location_id and tour_id in the right column as Field(s) to link to.
in the box beneath to the left that says "subreport parameter fields to use" I have the two parameters. There is also the "select data in subreport based on field" that I'm pretty sure I don't need because the data set returning from the stored procedure does not need to be filtered in any way and will be shown in it's entirety, but it doesn't seem to matter if it's checked or not.

This is the sql query for the subreport: "inmatedb"."dbo"."exceptions";1 NULL, NULL
The stored proc is names "exceptions" and there are two parameters, @location_id and @tour_id.
Here are the link windows:



What happens when I run it is two big ugly dialog boxes come up asking for the two parameters that are supposed to be supplied from the main report.
All I have found is this very discouraging article, I don't know is this is 8.5 or not that comes bundled with VS.NET 2003, but the situation is very similar.

I also tried putting a formula in the subreport record selection formula in the subreport:
{?@location_id} = {exceptions;1.location_id} and {?@tour_id} = {exceptions;1.tour_id}

but it still prompts.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top