Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create a optional parameters in the report

Status
Not open for further replies.

bandarna

Programmer
Jan 2, 2003
122
US
Hi,
I have a 5 parameters (all are allow range).
right now report is running fine only if I enter valid values for all parameters. all are mandatory.
how can I make them make them optional?


see the code below:
{coa_elem_desc.element_id} = {?P_Element_1} or
{coa_elem_desc_1.element_id} = {?P_Element_2} or
{coa_elem_desc_2.element_id} = {?P_Element_3} or
{coa_elem_desc_3.element_id} = {?P_Element_4}

example: I can enter P_Element_1 values as 1100 to 1103
and P_Element_2 values as 2100 to 2200
and P_Element_3 Values as null to null
and P_Element_4 values as null to null

report should run for a given parameters. can any one help?

Thansks
nb
 
Hi bandarna

What version of CR are you using? Otional Parameters were not introduced until CR 2008 (I think).

In earlier versions, if the Parameter types are String, parameters can be left blank and your data selection coded to deal with empty strings (which is how Crystal sees parameters with no data).

If you are using an earlier CR version and the data on which the parameters are based are not strings, the options are to use a SQL Expression to convert that data to a string (at the database level), or pick obscure default parameters that your record selection is coded to ignore.

Hope this helps.

Cheers
Pete.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top