Quantcast
Channel: Apps2Fusion Articles
Viewing all articles
Browse latest Browse all 930

Passing Multiple Values from Report Parameter

$
0
0

Introduction

Till now we have created a large number of BI Data Model Report (SQL as Data Source) and we have used passing either all the parameter values or a single specific value but at times there is a need to have multiple values passed.

In this article we will try to explore this specific feature where-in we can pass multiple values to a Report parameter.

Worked Out Example

We would create a very simple BI Report and try to demonstrate the same. The SQL query will fetch the person number field and the same would be used as a Parameter (Menu Type)

SQL Query

SELECT papf.person_number

FROMper_all_people_f papf

WHERE TRUNC(SYSDATE) BETWEEN papf.effective_start_date AND papf.effective_end_date

AND  (papf.person_number IN (:personnumber) OR 'All' IN (:personnumber || 'All'))

The Data Model once created would appear as below:

Creating Menu Type Parameter

We would need to create a Menu Type Parameter and for this we would need to perform the below steps:

  1. Creating a List of Value

  2. The following details would be required for the same:

Attribute Name

Attribute Value

*Name

PersonNumberLOV

Type

SQLQuery

Data Source

ApplicationDB_HCM

SQL Query

SELECT papf.person_number

FROM    per_all_people_f papf

WHERE TRUNC(SYSDATE) BETWEEN papf.effective_start_date AND papf.effective_end_date

Once the details are populated in the Application the screenshot would appear as below:

  1. Associating the List of Values to the Parameter

Now that we have created the List of Values we would need to associate the same with the Person Number parameter. The following details needs to be added in the parameter section:

Attribute Name

Attribute Value

*Name

personnumber

Data Type

String

Default Value

 

Parameter Type

Menu

Row Placement

1

Display Label

PersonNumber

List of Values

PersonNumberLOV

Number of Values to Display in List

100

Options: Multiple Selection

Checked

Options: Can select all: Null Values Passed

Checked

Options: Can select all: All Values Passed

 

Refresh Other Parameters on Change

Checked

The above details when captured in screenshot would appear as below:

Verification

Now we have completed all the required setups and as a last step we would try to run the report for the below three cases (which will cover all scenarios):

  1. Pass a Single Value

Although we have used the Parameter to allow multiple values to be passed to the report the same report should even work fine when we pass a single value.

  1. Pass Multiple Values

For this specific scenario we would pass multiple values and check how the report behaves.

  1. All Values

In this scenario we would try to run the report for “All” value

One important thing to note for this option is that one would need to change the value beside the Rows Attribute from the default value of 5 to a higher value ( I chose 100 for this example ) else it would only display 5 rows and one might feel that the report is not working as intended

Inference / Summary

With this I have come to the end of the article and hope that it was a nice feature to get ourselves familiar with. Now instead of running a report for a specific value we may run for multiple values and analyze the results at one go.

Thanks for your time have a nice day!


Viewing all articles
Browse latest Browse all 930

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>