I'm new with Crystal ( one week) and I'm tied up here
and would love some help.
An HTML form collects three params from client,
one text, two numeric values captured by the form.
Any one, or two or all three can be null, i.e. if client
selection is for "All" options in any of the three selections
then a null is resented from the form.
In my .rpt file I have three params, text,numeric,numeric,
no default values.
In my Report/Edit Selection Formula/Record I have code as below,
with the intent being to return across ALL Divisions or Status where the client
has indicated a 'don't care' by not selecting in the html form.
Report works fine when the two numeric params receive a value from the html form.
If either param is null, (i.e. client doesn't make a selection), absolutely
nothing turns up in the report.
Changing values or output from the html form is not an option
- I have to find a solution from within CR.
What do I need to do here to say...
"If this param is null then get all value for this param"
My selection code is (...I'll use IIF later)
// Title is text
(If isnull({?TitleParam})
Then {?TitleParam} = "*"
Else {Projects.Project_title} like '*'+{?TitleParam}+'*')
AND
// Division is numeric
(If isnull({?DivisionParam})
Then True
Else {divisions.divid} = {?DivisionParam})
AND
// Status is numeric
If isnull({?StatusParam})
Then True
Else {status.statid} = {?StatusParam})
TIA
Keith
and would love some help.
An HTML form collects three params from client,
one text, two numeric values captured by the form.
Any one, or two or all three can be null, i.e. if client
selection is for "All" options in any of the three selections
then a null is resented from the form.
In my .rpt file I have three params, text,numeric,numeric,
no default values.
In my Report/Edit Selection Formula/Record I have code as below,
with the intent being to return across ALL Divisions or Status where the client
has indicated a 'don't care' by not selecting in the html form.
Report works fine when the two numeric params receive a value from the html form.
If either param is null, (i.e. client doesn't make a selection), absolutely
nothing turns up in the report.
Changing values or output from the html form is not an option
- I have to find a solution from within CR.
What do I need to do here to say...
"If this param is null then get all value for this param"
My selection code is (...I'll use IIF later)
// Title is text
(If isnull({?TitleParam})
Then {?TitleParam} = "*"
Else {Projects.Project_title} like '*'+{?TitleParam}+'*')
AND
// Division is numeric
(If isnull({?DivisionParam})
Then True
Else {divisions.divid} = {?DivisionParam})
AND
// Status is numeric
If isnull({?StatusParam})
Then True
Else {status.statid} = {?StatusParam})
TIA
Keith