I have a parameter (checked the multiple values box), I am not able to retrieve the record with NULL on that column. here is the sample code
SELECT * FROM WORKORDER
WHERE
(1=
( CASE
WHEN workorder.crewid in {?CREWID} then 1 else 0
END)
OR
workorder.crewid like
(CASE
WHEN workorder.crewid in {?CREWID} then ‘’ else ‘%’
END)
)[/b]
Thanks for your response, fyi I have CR 2008.
When I select the Option Prompt = TRUE, and leave the prompt blank at run time, it does not retrive any data. here is my selecttion on parameter
Look at the HELP files in CR-2008 to see more details on using the HasValue() function to check if that parameter has a value before evaluating it in your SELECT formulas.
I guess The HasValue function is used inside report, I am trying to pass the parameter values into command object query, I am not sure if I can, If you can show me an example, it will be appreciated. I have been using the HasValue function in select record, group record etc …
add record selection as follow:
(not HasValue({?CREWID}) OR {Command.CREWID} IN {@ff_crewid})
I am expecting NOT HasValue() function will remove the Where clause ‘CREWID in {?CREWID)’ in command object, it does not. I don’t get any record since it does not remove where clause.
The CR version is 2008 SP1, Anything I missed in the above steps?