Home
Intelligence (Analytics)
Report Engine multivalue parameters
intellinx
Hello,
I need to create a report based on severity.
lets say I have 4 roles - branch officer, branch manager, cluster manager & regional manager.
pending on account balance amount, certain roles need to be notified(by a report).
the logic for the notification level is done on my application side.
for example, branch officer needs to be notified about all irregular balances
while the branch manager will be notified only for those accounts with balance over 100,000 & cluster manager only for over 500,000 & regional only for over 1,000,000.
Now, I need to transfer to birt the notification level.
severity is defined as string in our DB & therefor in order to create a report that contains all accounts with severity Normal & up I need to pass multiple values - Normal,Major,Critical.
I've added to the data set query an 'IN' clause & I want to populate it with the list of values:
where severity in (trivial, minor, normal, major, critical)
or a subset of these based on the logic.
I'm using the report engine command line interface.
a - using beforeopen script: this.queryText = this.queryText.replace("****", params["my_param"].value.join("','" ));
is useful for web interface where the user can enter the necessary values. how do I use the multivalue parameter through the RE?
b - can I send one param as string & split it? "param=Trivial,Minor,Normal" & do some sort of manipulation in the beforeopen property?
c - how do I pass more than one value to the parameter given that my parameter in the design is defined to allow multiple values?
thanks in advance,
Avi
Find more posts tagged with
Comments
mwilliams
Hi Avi,
If you can pass in the comma separated string, you won't need to do much manipulation in the beforeOpen script. The IN clause takes a comma separated string of values. You'd essentially just have to add (' to the beginning, ') to the end, and replace each comma with ',' which is exactly what the line of code in your question a would do to a multi select parameter object.
Hope this helps.