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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Record selection formula question

Status
Not open for further replies.

crystaldev1

Programmer
Nov 6, 2003
232
US
Hello, I'm using CR11 and Sql Server 2008.

I am using a formula in record selection to check the parameter and filter data based on the parameter. If the parameter is blank, then I want the report to run as if the record selection is blank. If I remove the formula from record selection, the report works fine. If I use the formula, the report produces 0 record when the paramter is blank. Our application stores the parameter into a formula if you are wondering I'm using a formula instead of parameter. This is the record selection formula:

if not isnull({@ParamFormula}) and trim({@ParamFormula})<>"" then ({Table.Name} in {@ParamFormula})

Thanks.
 
I would change it to something like this:

IsNull({@ParamFormula} or
{@ParamFormula} = "" or
({table.Name} in {@ParamFormula})

-Dell


A computer only does what you actually told it to do - not what you thought you told it to do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top