Skip to Content
avatar image
Former Member

Multi Parameters only returning first criteria?

Hi,

I've create a report with multiple parameters but when the report is run it only returns the first parameter.

   

For example the code is:

If {?Supplier} = 'z' then {Supplier_Code} = {Supplier_Code} else {Supplier_Code} = {?Supplier} and

if {?Date} = 'z' then {Date_Field} = {Date_Field} else {Date_Field} = {?Date} and

if {?Stock} = 'z' then {Stock_Field} = {Stock_Field} else {Stock_Field} = {?Stock}

When the report runs it uses what I've entered in the supplier and only returns that supplier but returns all dates and all stock codes. If I swap date for example as the first line of the code that returns the date criteria but all suppliers and stock codes regardless if they've been entered or not.

I use the 'z' criteria to return all data even if nothing is specified.

If you can help that would be great.

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Oct 29, 2015 at 10:46 AM

    Hi Nick,

    Try:

    ({?Supplier} = 'z'  OR {Supplier_Code} = {?Supplier})

    AND

    ({?Date} = 'z' OR {Date_Field} = {?Date})

    AND

    ({?Stock} = 'z' OR {Stock_Field} = {?Stock})

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded