Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Crystal dynamic parameter - filter stored procedur Post Reply Post New Topic
Author Message
CarlGanz
Newbie
Newbie


Joined: 21 Mar 2013
Online Status: Offline
Posts: 1
Quote CarlGanz Replybullet Topic: Crystal dynamic parameter - filter stored procedur
     Posted: 22 Mar 2013 at 3:42am

I have a series of standalone Crystal 2011 reports that will display a list of venues in a parameter. The parameter is bound to a  stored procedure and that nicely fills the parameter list box. However, I now need to pass a parameter to the stored procedure so it can get a subset of venues that will vary by report. I'm thinking of something like this

 

CREATE PROCEDURE spc_GetVenues

 

@ReportID int

 

AS

 

IF @ReportID = 1

     SELECT * FROM Venues WHERE VenueID IN (1,2,3)

 

ELSE IF @ReportID = 2

     SELECT * FROM Venues WHERE VenueID IN (4,5,6)

 

I'd like to embed a value in each Crystal Report that I could pass to spc_GetVenues so only a filtered list is returned to the report and presented to the user in the parameters screen.

 

How can I accomplish this?

 

Thanks

 

Carl



Edited by CarlGanz - 27 Mar 2013 at 3:11am
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