Question

Quick report default values in parameters

  • 19 October 2023
  • 1 reply
  • 171 views

Badge +2

Hello community,

I need to set a default value in quick report parameter.

Here is my query in quick report:

                            “  select *
                               from customer_order 
                              where order_no = '12345'
                                   and customer_no like '&customer_order.customer_no' “

Result of “select *  from customer_order  where order_no = '12345'  “ in SQL :

When executing on ifs, I got the list of all customers, it doesn’t take the filter into consideration : 

 

Is there a solution for this please?

Thanks in advance!


1 reply

Userlevel 3
Badge +10

Hi @SKA123,

To set a default value refer below;

  • You can get the Quick Report parameter dialog to show default values such as enumerations for SQL type Quick Reports.
  • For this you need to specify the view name along with the column name for the parameter prompt e.g. &VIEW_NAME.COLUMN_NAME.
  • With the use of this you will get the default values and the translated prompt name for the parameter.
  • The following will show the enumerated values for the "Customer Category" and will have the translated parameter prompt.
SELECT * from customer_info where customer_category_db = '&CUSTOMER_INFO.CUSTOMER_CATEGORY_DB'

You can combine this with Query Flags as well.

SELECT * from customer_info where customer_category_db LIKE '&[-CS--]CUSTOMER_INFO.CUSTOMER_CATEGORY_DB'

More information is available in the F1 development guide : Ad hoc Report Development

Foundation1 > Development Guide > Business report and Analysis Sp

Reply