Solved

Quick report parameters

  • 22 January 2024
  • 5 replies
  • 177 views

Badge +2

Hi, we have recently updated to apps10 U20 and have noticed some of our quick reports that use a wildcard inside a parameter no longer works and returns no data found. before this update the user could leave a parameter blank when using the quick report. 

 

I.e WHERE  T.SHIPMENT_ID LIKE '%&SHIPMENT_ID%'

 

is there a system setting to allow this search function to work? as a work around we have removed the % wildcards for now. 

icon

Best answer by Jonas Feigl 22 January 2024, 14:10

View original

5 replies

Userlevel 6
Badge +15

@Graeme.C you could use Query Parameters with Quick Reports → then the filtering will be done exactly as if the user is seraching directly in a standard IFS Page (multi-value / partial value / no value)

See more details in the post below:

Is there a way to allow multiple end user inputs for Quick Report Parameters? | IFS Community

and ifsapp.report_sys.parse_parameter(i.company,'&[-C--L]Company_ID')='TRUE'

 

Badge +2

@Graeme.C you could use Query Parameters with Quick Reports → then the filtering will be done exactly as if the user is seraching directly in a standard IFS Page (multi-value / partial value / no value)

See more details in the post below:

Is there a way to allow multiple end user inputs for Quick Report Parameters? | IFS Community

and ifsapp.report_sys.parse_parameter(i.company,'&[-C--L]Company_ID')='TRUE'

 

i don’t have access to that post but i will try using query parameters, thank you for the reply 

Userlevel 5
Badge +17

In IFSAPP10 per default the framework expects a value for a all Quick Report Parameters. If you want a parameter to be nullable you have to use “Query Flags” as described here:

https://docs.ifs.com/techdocs/default.htm?openpage=https://docs.ifs.com/techdocs/foundation1/050_development/026_br_and_a/005_adhoc_reporting/070_dev_qrep/default.htm#Deployment

 

In your particular example you simply have to change the WHERE-condition to

WHERE T.SHIPMENT_ID LIKE '%&[-CS-L]SHIPMENT_ID%'

The first character in the query flags can be “M” (mandatory) or “-” (not mandatory). It should then work again.

To achieve even better performance I would also recommend that you structure the condition like this by checking if the parameter is NULL first before checking the actual column values:

WHERE ('&[-CS-L]SHIPMENT_ID' IS NULL OR T.SHIPMENT_ID = '&[-CS-L]SHIPMENT_ID')

 

@Marcel.Ausan Report_SYS.Parse_Parameter, while giving the best user experience, should only be used when that functionality is explicitly required. Otherwise it can have a significant negative impact on performance.

Badge +2

Perfect, thank you Jonas. this is very helpful and gets around the issue we’ve seen since using Update 20

Userlevel 5
Badge +10

The issue for UPD20 is caused by a new system parameter ‘"Enable bind variables for SQL Quick Reports in IFS EE"’ - by default it is set to YES. You need to change to NO to get to work.

I suppose it depends if you want to rewrite all your Quick Reports?

Reply