Quantcast
Channel: SCN : Discussion List - SAP Crystal Reports - Data Connectivity
Viewing all articles
Browse latest Browse all 269

How Would I Do This Record Selection Formula?

$
0
0

Hi.  I have 3 parameter fields.  There is {?Customer No}, {?Location} and {?date range}  For customer no and location, I have a default of "all customers" or "all locations".  The formula editor is complaining and I'm not sure how to fix it.  My record selection formula is

 

if ( {?Customer Number} <> "All Customers") or

({?Location} <> "All Locations") then

(

 

    if ( {?Customer Number} <> "All Customers") then
     {
       ({Command.CUSTOMERNO} like {?Customer Number}) and
     }


   if ({?Location} <> "All Locations") then
     {
        ({Command.LOCATION} like {?Location}) and
     }

 

    ({Command.DATECOMPLETED} = {?Date Range})

)

else

{Command.DATECOMPLETED} = {?Date Range}

 

The date range is always going to be mandatory. If the string parameter value is <> "all customers"  or "all locations", then I need to filter based on that chosen value. 

 

In other words, if {?Customer Number} = "All Customers" and {?location} = 3, I need the formula to be

 

{command.location} like {?location} and

{command.datecompleted} = {?date range}

 

Any help, of course, will be appreciated. 


Viewing all articles
Browse latest Browse all 269

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>