Link to home
Start Free TrialLog in
Avatar of varunogili
varunogili

asked on

Need null values for parameters

Hi all i am having this formulae in my record selection expert

(if {?Node}="" then true else
{REPORTER_STATUS.NODE} = {?Node}) and
( if isnull({?Date}) then true else
{REPORTER_STATUS.FIRSTOCCURRENCE} = {?Date}) and
( if {?Manager}="" then true else
{REPORTER_STATUS.MANAGER} = {@UPPERCASEMANAGER}) and
(if (isnull({?Severity})) then true else
{REPORTER_STATUS.SEVERITY} = {?Severity}) and
( if {?Remedy}="" then true else
{REPORTER_STATUS.IMPACT9}={?Remedy}) and
(if {?Summary}="" then true else
{REPORTER_STATUS.SUMMARY} startswith {?Summary}) and
(if  isnull({?Userid}) then true else
{REPORTER_STATUS.OWNERUID} = {?Userid})

when i am trying to view the report in the browser it is prompting me to enter the date range fot the date paramter and a number value for the severity and userid parameter(Here it is asking to enter a number value for these parameters if i am leaving the text balnk).

I dont want to enter any value, some times . If i am not entering any value in the text box it should assume as null and should take all the values of that paramter.

The above formulae is working fine for the node,manager parameter. Can any one help me with this tooo.

Thankyou,
Reddy.
Avatar of Mike McCracken
Mike McCracken

Unfortunately, CR expects values for all parameters.  You can provide a default value say -1 for numeric, "" for character/strings and then test for them.

mlmcc
Avatar of varunogili

ASKER

Even i tried giving -1 for numeric it is still prompting me to enter a value.

But my requiremnt was to not to enter any value and leave the field blank.

Thankyou,
Reddy.
Try changing the parameter into string. String data type allows null values. Then you can convert the string into date or numeric by using totext or tonumber formula
Good idea.

If you don't want to enter any data then have the program do it for you.  How are you calling the report?

mlmcc
Hi Saxonwica and mlmcc can you guys please tell me how to convert the below  datetime and number formulaes fields to string as you said. Please let me know. Hope you guys do reply me as soon as possible coz i am already late submitting this.

( if isnull({?Date}) then true else
{REPORTER_STATUS.FIRSTOCCURRENCE} = {?Date}) and
if (isnull({?Severity})) then true else
{REPORTER_STATUS.SEVERITY} = {?Severity}) and
(if  isnull({?Userid}) then true else
{REPORTER_STATUS.OWNERUID} = {?Userid})

Thankyou,
Reddy.
ASKER CERTIFIED SOLUTION
Avatar of SaxonWica
SaxonWica

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Glad I could help =)