Skip to main content
Solved

IFS Report Designer - Add Condition With Parameter


ismigulay
Do Gooder (Customer)
Forum|alt.badge.img+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..

Best answer by Tracy Norwillo

@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>)

View original
Did this topic help you find an answer to your question?

2 replies

Forum|alt.badge.img+14
  • Hero (Partner)
  • 192 replies
  • Answer
  • June 3, 2022

@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>)


ismigulay
Do Gooder (Customer)
Forum|alt.badge.img+3
  • Author
  • Do Gooder (Customer)
  • 5 replies
  • June 15, 2022

@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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings