Duplicate parameter prompts using SP and a Command

Hello all,
I am using CRXI.

I have a report that is using a Command and also a Stored Procedure (some tables also but they are not important). The report has 2 parameters a varchar and a date. It runs just fine but each time I run the report I am prompted for the 2 needed parameters twice (so 4 total inputs), and that is just annoying and the users should not have to enter the parameters twice IMO.

The reason it is prompting this way is because the SP and the command both have the parameter values needed (but they will always be the exact same values).

Stored Proc – :param1, :param2
Command – ?param1, ?param2

I have tried to name them exactly the same but that doesn’t solve anything.
I have tried to use the SP syntax in the command
example SQL in CMD ->

where x >= :param1 

instead of

where  x >= ?param1

and Crystal did not like that. I hope my syntax is just wrong and that this can actually be done.

My question is…
Is it possible to use the values from one to populate the other and not make the user input 2 duplicate dates and 2 duplicate varchars?

Thanks for any help


gotocrystalguy (BOB member since 2012-11-16)

Normally the syntax for a param in a crystal command is {?param1}. For MS-SQL DB’s I have had to surround the param with single quotes (’{param1}’). And of course the param has to be defined in the command.

As far a linking a SP, stored procedure and tables. I hope it works.

I hope this helps.


kevlray :us: (BOB member since 2010-06-23)

Sorry I posted a sloppy example…
The param is posted as ‘{?param1}’ in the command.

In the SP to declare a variable it needs to be :param1

So in CR, they both work as expected and the report will run correctly, the problem is just that it is prompting me to enter the values twice.
One prompt with 4 input sections, such as…
Enter Varchar (only need this varchar)
Enter Date (only need this date)
Enter Varchar (duplicate and not wanted at run time)
Enter Date (duplicate and not wanted at run time)

I would like it to just ask for 1 varchar and 1 date being as they are really the same values.

I can’t just delete one set because I need to use the parameter created in CR for the command and the SP obviously needs its input params to work correctly.

Hope this clarifies the problem a little.


gotocrystalguy (BOB member since 2012-11-16)