SAP Knowledge Base Article - Public

1542962 - Null parameters give warning "Parameter does not have any value" when refreshing the report in Crystal Report 2008

Symptom

Null parameters value give a warning " Parameter does not have any value" when refreshing the report in Crystal Report 2008.

Environment

Crystal Report 2008.

Reproducing the Issue

  1. Create a Crystal Report having dynamic parameters in Crystal Report 2008.
  2. Create a record selection formula to check if the parameter is null or not.
  3. Try to refresh the report by not providing more than 1 parameter value.
  4. Warning received "Parameter does not have any value"

Cause

There is no value present when refreshing Crystal Report having dynamic parameter.

Resolution

  1. In Crystal Report 2008 select the option of making the parameter optional,however when you make the optional prompt true it gives us a warning “Changing a prompt to be optional may break existing formulas”.                                                            
  2. After making this change whenever you give no value to the parameter, it generates runtime error.
  3.  In order to resolve this issue, use not hasvalue(fld) function.                                                                                    
  4. Make the changes in the record selection formula as follows:                                                                
                                                                                                                                       
    (IF {?Debtor Selection} = 'ALL' THEN true                                                                                          
    ELSE                                                                                                                               
    IF (not hasvalue({?Debtor Name}) or isnull({?Debtor Name})) THEN false                                                            
    ELSE {?Debtor Name} = {INV062.DEBT_NUMBER})                                                                                       
    OR                                                                                                                                
    (IF {?Debtor Selection} = 'ALL' THEN true                                                                                          
    ELSE                                                                                                                               
    IF (not hasvalue({?Debtor SSN}) or isnull({?Debtor SSN}))THEN false                                                               
    ELSE {INV062P.DEBTOR_SSN} = {?Debtor SSN})                                                                                         
    OR                                                                                                                                 
    (IF {?Debtor Selection} = 'ALL' THEN true                                                                                          
    ELSE                                                                                                                               
    IF (not hasvalue({?Top Offset Cycle}) or isnull({?Top Offset Cycle})) THEN false                                                  
    ELSE {INV062.TOP_OFFSET_CYCLE} = {?Top Offset Cycle})

Keywords

Crystal Reports, null values, dynamic parameters. , KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , Problem

Product

Crystal Reports 2008 V0