Solved

IFS Report Designer - Add Condition With Parameter


Badge +3

Hello,

I have a report that returns data results by entering parameters.

In other words, the report result is displayed when you enter a parameter.
If no value has been entered for the parameter, the report should still be displayed.
When the parameter is used as a condition in the query sentence where the report draws data, the rows that do not contain data in the column will not appear in the report.

I couldn't find how to display them.
How should I write the condition in the query sentence?

 

Can anyone help with this please?

Sincerely..

icon

Best answer by Tracy Norwillo 3 June 2022, 16:52

View original

2 replies

Userlevel 4
Badge +11

@ismigulay 

To make the parameter optional, use the parameter query flags described here:

https://docs.ifs.com/techdocs/Foundation1/050_development/025_operational_reporting/045_report_modeling/200_model_syntax//100_keywords/100_keywords_itd/100_parameter.htm

 

To handle the optional parameter in your SQL-Statement, you have a few choices depending on how you’re evaluating the parameter.

You can use report_sys.parse_parameter(<column to compare to>, parameter) = ‘TRUE’

Or I do this if I have to use greater/less than:

<column to compare to> >= NVL(parameter,<column to compare to>)

Badge +3

@Tracy Norwillo

 

Hi,

I assigned the incoming value to a variable.

IF project_id_ IS NOT NULL AND project_id_ != '%' THEN 
       project_ := project_id_;
    ELSIF project_id_ = '%' OR project_id_ IS NULL THEN 
       project_ := '%' ;
END IF;

Then i solved the problem by using the condition like this.

nvl(t.project_id,'%') LIKE upper(project_)

Thank you for your help.

Reply