anon
anon

Reputation: 865

Birt Report Multiple Parameter

Currently I'm using Birt Report to generate report from my system. I'm using input parameter to send parameter from my system to Birt Report. The problem is when I'm trying to send multiple parameter from my system.

Example: SQL statement at Birt Report for one parameter

select column1 from table1 where column2 = ?

When I use this query for one parameter, it work.

What I'm trying to achieve now,

select column1 from table1 where column2 = ? AND column1 = ?

I tried SQL like this

select column1 from table1 where column2 = params["column2"].value AND column1 = params["column1"].value

I already created parameter at data set and report parameter but it's still can't gets to work

Upvotes: 2

Views: 3220

Answers (1)

bw_üezi
bw_üezi

Reputation: 4564

No difference if you have one or multiple parameters. In the 'Edit Data Set' dialog add your query in the 'Query' section with ? then switch to the 'Parameters' section and add parameters with 'Default Value' params["prmName"].value or even simpler 'Linked To Report Parameter' prmName

e.g. for your example

Query

select column1 from table1 where column2 = ? AND column1 = ?

Parameters

Name      Data Type     Direction     Default Value       Linked To Report Parameter  
column2   Decimal       Input                             column2
column1   Decimal       Input                             column1

You can move the parameters up and down. Parameters are matched to the ? in your query by this order. The Name is irelevant...

Upvotes: 3

Related Questions