cancel
Showing results for 
Search instead for 
Did you mean: 

Multi Parameters only returning first criteria?

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Nick,

Try:

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

AND

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

AND

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

-Abhilash

Former Member
0 Kudos

That worked a treat!

Thanks for all your help and quick response!

Answers (0)