Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
|
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 21st, 2007, 03:49 AM
Registered User
 
Join Date: May 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Passing Paramter-Stored Procedure

I have one main report and few subreports..All the Subreports take 2 parameters which are passed through (Have used subreport links) ..The parameters are getting passed correctly where my subreports use command/query from the Universe ..But One of my Subreport is using Stored Procedure having same number of paramters. But When I run the whole report ..I am again prompted for the stored procedure parameter... What I am doing wrong here? I am not able to achieve What I want to achieve :( Passing parameters from Main report(running it through Info view) and make it accessible to all of the subreports...Please advise. Thanks
 
Old May 22nd, 2007, 11:21 AM
Registered User
 
Join Date: May 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have the same issue. My main report uses a simple table, however, the subreport uses a stored proc. If I use a table instead of a stored proc, I can link the parameters up just fine and I'm not prompted multiple times for the same parameter.

Crystal XI.

 
Old May 22nd, 2007, 11:34 AM
Registered User
 
Join Date: May 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Oops, I had to change my Parameter in the stored proc to match that of the original parameter's type (string = varchar).

Primary report parameter = CustID (string).
Stored Proc now has CustID (varchar).

Verified my subreport to pick up the change.
On main report, right click subreport and choose Change Subreport Links.
In available fields, select the formula field you made that reflects the value of your primary report parameter (CustID).
In the 'Subreport Parameter field to use' select the parameter from your subreport. (?@CustID, NOT ?Pm-CustID!).

That should do it. At least it did for me. Hope that works!






Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing Array to Oracle Stored Procedure kulkarnimonica Oracle ASP 1 August 6th, 2007 02:22 AM
Passing an "IN" clause to a stored procedure atcs2152 SQL Server 2000 5 February 7th, 2006 10:55 PM
Passing datasource to a stored procedure ctranjith SQL Server 2000 2 October 7th, 2004 01:49 PM
Passing a parameter value to Stored Procedure mcinar SQL Server 2000 9 October 3rd, 2004 09:42 PM
passing stored procedure shoakat SQL Server 2000 1 July 15th, 2004 09:20 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.