Skip to Content
Former Member
May 31, 2013 at 09:08 AM

Crystal Reports - Optional Parameters


Dear Crystal Reports Gurus,

I am trying to create the following optional parameters:

1. Employee code (Ma@from OHEM) - Is defined as a string parameter even though it is a number. The way the parameter is labelled allows for me to select the code from the List of employees. If i was to define this parameter as a number, i would lose this option of selection and would have to enter the code manually when generating the report.

2. Department - This field is also a number value. When i define this parameter as a number and attempt to generate my report with only parameter 1 (above), i get the error message 'Optional Parameter not support; enter valid value'. I get this message despite defining both paramters (Employee code+department) as optional parameters.

Both parameters should subsitute one another i.e. either Employee code or Department should be selected. I have a third parameter - Year which is a number value.

Below are my record selection formulas with the respective error messages.

{_HRMATRIXL.U_Year} = {?Year} and

(not HasValue({?Ma@from ohem}) OR {_HRMATRIX.U_EmpId} = Tonumber({?Ma@from ohem})) and

(not HasValue({?Department}) OR {OHEM.branch} = {?Department})

Error message (in german so i'll try my best to translate)

ERROR: String is not numerical

Details: ErrorKind

Error in file """crw{C84.....}.rpt Error in formula