Software: Crystal Reports XI Release 1 with SP4, with MS SQL Server 2008
I've created a report that asks for three parameters, 2 dates, and a string which is dynamically populated at the time the report is run. The report has two tables added in the database expert.
The first table in the database expert is a command object which passes the two date parameters to a stored procedure:
exec sp_MyStoredProcedure {?startdate},{?enddate}
The second table in the database expert is a stored procedure object used to populate the string parameter {?_users}. The criteria for the string parameter are:
Prompt with Description only: False
Allow multiple values: True
Allow discrete values: True
Allow range values: False
This stored procedure object requires nothing to be passed, it was originally a view in the database, but the same problem occurs whether i dynamically populate the string parameter options from either a view or a stored procedure.
The string parameter is used for defining the record selection formula:
IF {Command.user_name} in {?_users} THEN true ELSE false.
The two table objects are not linked in the database expert, but linking them does not seem to solve the problem I am having with this report, the problem being this:
No matter which order I set the parameters, it always first displays a form showing only the prompts for the date values. After entering these, it then shows a form prompting for the date values again (the previously selected date information now cleared), along with the list of users from which to select. On this 2nd form, the parameters are displayed in the order I set using the field explorer option presented when I right click on the Paramter Fields heading. After entering the date parameter values a 2nd time, and selecting the users from the dynamically generated list, the report performs as intended. After subsequently running the report (prompting for new parameter values by pressing F5), it does not clear the date parameters on the 2nd form's appearance.
What I need is to be able to enter in these values the first time around, without having the date parameters cleared. Am i going about this incorrectly, or is this a bug?