Enabling Drop-down for Stored Procedure Input Parameters
To enable drop-downs for stored procedure input parameters for 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 report configuration in Studio.
For example, the following Sigma Application screen shot shows drop-down values for Currency input parameter for a report:
Let's see how to configure drop-downs for stored procedure input parameters for reports.
To fetch the grid widget data for the stored procedure input parameters in reports, perform the following steps in Studio:
- On the home page of Sigma Studio, right-click an existing database connection and select the Create Data Source option.
Note: 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.
- 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 other necessary configuration as needed.
- Select the Default Configuration tab and then click the Primary Ds Procedure Parameters icon.
- In the Procedure Parameters Configuration pop-up window, 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.
- Select the filter criteria of your choice from the Apply Mandatory Filter As drop-down list.
Note: 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. You can notice in the following screen shot these three parameters are mapped to their respective columns in the grid widget, whereas the FD and TD parameters have been given default values.
The Equals filter criteria is applied for the listed procedure parameters. By making use of the Apply Mandatory Filter As field, the Equals filter criteria is applied as a mandatory data filter for the listed procedure parameters. However, the Apply Mandatory Filter As is an optional field.
Once you apply the procedure parameter configurations, a toast message appears, indicating a successful save of the applied procedure parameter configurations.
Note: Click outside the Procedure Parameters Configuration window, so that the configured procedure parameters get saved.
- Click Save to save the report.
- Access the relevant report (e.g. REPORT) in the Sigma Application.
The FD and TD parameters display the default values, which can be changed by the end-user, whereas the other three parameters display drop-downs from which the end-user can select 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