To enable drop-downs for stored procedure input parameters in reports, the following are necessary:
- A grid widget (App) that displays the data needed for the input parameters must be created in Studio.
- The grid widget and the column need to be specified for the input parameter during the report configuration in Sigma Studio.
For example, the following Sigma Application screen shot shows drop-down values for the Currency input parameter in a report:
Let's see how to configure drop-downs for stored procedure input parameters in reports.
To fetch the grid widget data for the stored procedure input parameters in reports, perform the following steps in Sigma Studio:
On the home page of Sigma Studio, click the Data Source icon on an existing database connection.
It is necessary that you create separate data sources for the grid widget and the report. In the given example here, the data source for the grid widget is a DB table data source (SP DS), whereas the data source for the report is a DB stored procedure (SP DS 6).
- Create the DB table data source for the grid widget. For example, SP DS.
- Create the DB stored procedure data source for the report. For example, SP DS 6.
- Access App Designer and create a grid widget with the DB table data source (SP DS).
- Click Proceed to configure the grid widget.
- Click Proceed to configure the grid widget.
- Drag and drop the required data columns to the design area and click the Save icon to save the widget (e.g. ACCOUNTS).
- Create a report with the DB stored procedure data source (SP DS 6) and provide the necessary configuration details as per your needs and requirements.
Click the Parameters Configuration icon to configure the applied procedure parameters for the report.
In the Params Configuration screen, the applied procedure parameters of ACCOUNT_NO, AVAI_BALANCE, FD, TD and CURRENCY appear.In this example, the DB stored procedure data source has following five input parameters:
- ACCOUNT_NO (Account Number)
- AVAI_BALANCE (Available Balance)
- FD (From Date)
- TD (To Date)
- CURRENCY (Currency)
Among these five parameters, the values for the ACCOUNT_NO, AVAI_BALANCE, and CURRENCY parameters must be fetched from the grid widget, ACCOUNTS, whereas the FD and TD parameters should be provided with the custom date values in accordance with the data sets. The parameters can be made mandatory by making use of the Is Mandatory option and the Equals filter criteria is applied as the Mandatory Filter Operator for the listed procedure parameters. However, both the Is Mandatory and Mandatory Filter Operator are optional fields.
- Click the ACCOUNT_NO parameter and select the appropriate grid widget (e.g. ACCOUNTS) from the Load data from Widget lookup field and choose the appropriate key and description columns from the Key Column and Description Column lookup fields. Proceed to click Update to update the parameter configurations.
Click the AVAI_BALANCE parameter and select the appropriate grid widget (e.g. ACCOUNTS) from the Load data from Widget lookup field and choose the appropriate key and description columns from the Key Column and Description Column lookup fields. Proceed to click Update to update the parameter configurations.
Click the FD (From Date) parameter and select Custom from the Source drop-down list to provide the relevant date of your choice. In the Parameter Value field, select the relevant date, e.g. 02/02/2022. Proceed to click Update to update the parameter configurations.
You can provide the minimum and maximum value date expressions in the Min Value Expression and Max Value Expression fields respectively. Both the Min Value Expression and Max Value Expression fields are optional. The minimum and maximum date ranges will be set on providing the minimum and maximum value expressions. For instance, if the current date is 01 July 2022 (01/07/2022) and if the Min Value and Max Value Expressions are set as -1m and +1m respectively, then the maximum date range cannot be selected beyond the period of one month, which is 31 July 2022, while the minimum date range cannot be selected beyond the one month period, which is 01 June 2022. So, the end users in Sigma Application can select the dates only between the specified date ranges, as per the provided values in the Min Value Expression and the Max Value Expression fields for the configured date parameters in a stored procedure report.
On using a couple of date parameters in a stored procedure report, the Dependency, Validation and Dependency Range fields appear, which can be used to assign the dependencies and validations for the date parameters. In the provided example, the TD (To Date) parameter is selected as a dependent parameter for the FD (From Date) parameter from the Dependency drop-down list. Only the date parameters will get listed in the Dependency drop-down list. The Less Than condition is selected from the Validation Condition drop-down list, indicating that the FD parameter should always be lesser than the TD parameter value and in all cases, the TD parameter value must be greater than the FD parameter value. The Dependency Range is an optional field. If required, you can assign the dependency date range for the FD (From Date) parameter so as to select the date only within the specified date range. For instance, if the current date, fetched from the app or widget (DETAILS_APP) is 01 July 2022 (01/07/2022) and if the Dependency Range is set as 1m, then the FD parameter cannot be selected beyond the period of one month, which is 31 July 2022. So, on making use of the Dependency Range field, the selected date cannot exceed the specified date range period.
Click the TD (To Date) parameter and select Custom from the Source drop-down list to provide the relevant date of your choice. In the Parameter Value field, select the relevant date, e.g. 04/02/2022. Proceed to click Update to update the parameter configurations.
On using a couple of date parameters in a stored procedure report, the Dependency, Validation and Dependency Range fields appear, which can be used to assign the dependencies and validations for the date parameters. In the provided example, the FD (From Date) parameter is selected as a dependent parameter for the TD (To Date) parameter from the Dependency drop-down list. Only the date parameters will get listed in the Dependency drop-down list. The Greater Than condition is selected from the Validation Condition drop-down list, indicating that the TD parameter should always be greater than the FD parameter value and in all cases, the FD parameter value cannot be greater than the TD parameter value. If required, you can assign the dependency date range for the TD (To Date) parameter so as to select the date only within the specified date range. For instance, if the current date, fetched from the app or widget (DETAILS_APP) is 01 July 2022 (01/07/2022) and if the Dependency Range is set as 1m, then the TD parameter cannot be selected beyond the period of one month, which is 31 July 2022. So, on making use of the Dependency Range field, the selected date cannot exceed the specified date range period.
Click the CURRENCY parameter and select the appropriate grid widget (e.g. ACCOUNTS) from the Load data from Widget lookup field and choose the appropriate key and description columns from the Key Column and Description Column lookup fields. Proceed to click Update to update the parameter configurations.
Click the Save icon to save the configured procedure parameters.
Once you apply the procedure parameter configurations, a toast message appears, indicating a successful save of the applied procedure parameter configurations.
- Click Save to save the report.
- Access the relevant report (e.g. REPORT) in the Sigma Application.
The FD and TD parameters display the custom date values, which can even be changed by the end-user, whereas the other three parameters display drop-downs from which the end-user can select the values. - For the Account No procedure parameter, click the parameter value drop-down list and select an account number, e.g. 5500000848.
- For the Balance procedure parameter, click the parameter value drop-down list and select the balance amount, e.g. 15476.00.
- For the Currency procedure parameter, click the parameter value drop-down list and select a currency value, e.g. INR.
- After you provide the relevant parameter values for the applied procedure parameters, you can proceed to click Run to generate the report.
- Access the Generated Reports tab and then download the generated report.
The fetched data of the report, with the relevant data values provided to the applied procedure parameters, is displayed in the PDF file, as shown in the following screen shot:
Add Comment