Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Dynamic Parameters and Stored Proceedures Post Reply Post New Topic
Author Message
SDB2
Newbie
Newbie
Avatar

Joined: 08 Apr 2009
Online Status: Offline
Posts: 17
Quote SDB2 Replybullet Topic: Dynamic Parameters and Stored Proceedures
     Posted: 07 May 2009 at 4:12pm
I'm using a stored proceedure to define a custom set of choices delivered to a dynamic parameter. Works like a charm in standard reports. The problem is when I run it against a report that uses another stored proceedure, it wants me to fill in the parameters for the other proceedure before it will give me the pick list. This is user unfriendly so I'm trying to find a way around it. Any ideas?
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 08 May 2009 at 7:01am
nothing comes to mind.  I may be wrong, but I don't think that this how Crystal was designed to work.  Usually a stored proc is used retrieve data for a report.  So 2 stored procs would both need to be 'answered' before Crystal can get the data for the report.
IP IP Logged
SDB2
Newbie
Newbie
Avatar

Joined: 08 Apr 2009
Online Status: Offline
Posts: 17
Quote SDB2 Replybullet Posted: 08 May 2009 at 9:27am

So are you saying I would need to incorporate the SP parameter into the main Stored Proceedure in the report? (I think this is a new feature added in the 2008 version)

IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 11 May 2009 at 6:26am
No, I am just saying that you are using Crystal in a way that it was not designed.  Crystal doesn't call stored procs to populate parameters, at least I don't think that is what the designers had in mind.  They created cascading parameters for that.  Stored procs were designed to retrieve data for a report.
 
this is all my opinion, but going back to Crystal 7, you couldn't build a dynamic table for parameters, but you could use a stored a proc to drive a report.
 
That's all I am saying...that there probably isn't a work around because it wasn't designed to be used the way you want it function.
IP IP Logged
SDB2
Newbie
Newbie
Avatar

Joined: 08 Apr 2009
Online Status: Offline
Posts: 17
Quote SDB2 Replybullet Posted: 11 May 2009 at 8:43am
again, this is a newer feature designed into the 2008 version.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 12 May 2009 at 6:24am
ok, out of my experience, I am only on XI
IP IP Logged
SDB2
Newbie
Newbie
Avatar

Joined: 08 Apr 2009
Online Status: Offline
Posts: 17
Quote SDB2 Replybullet Posted: 12 May 2009 at 8:09am
Thanks for giving it a shot.
IP IP Logged
SDB2
Newbie
Newbie
Avatar

Joined: 08 Apr 2009
Online Status: Offline
Posts: 17
Quote SDB2 Replybullet Posted: 12 May 2009 at 2:27pm

Got an answer that worked. I just wanted to share in case someone else tries this.

Create a blank report and supress everything except the details line, bring in your stored proceedure and set up the parameter.
Insert another report (fully formatted) as a sub-report and create parameters that match your stored proceedure in your sub report. Use the data from the first parameter to link to a field in the sub report and link all other parameters in the shell to the sub report parameters. Now all parameters fire together.
 
I was able to duplicate this in IX as well!
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum