BIRT Multi Select Parameters
BIRT Multi Select Parameters
Parameters
The Safe and Easy Way
1
Source at:
http://longlake.minnovent.com/repos/birt_example/innovent.birt
BIRT Project
Our Involvement
Involved with project since
inception (2004)
OS BIRT & Actuate BIRT
BIRT PMC & BIRT Committers
BIRT World / BIRT Exchange
Our Focus
For your Product
For your Project
For Source
your at:
Enterprise 2
http://longlake.minnovent.com/repos/birt_example/innovent.birt
BIRT Services
Services
Best Practices
Design, Development &
Deployment
Remote Consulting and Support
BIRT Training
Selected Experience
Aldon
Blackboard
3
Source at:
http://longlake.minnovent.com/repos/birt_example/innovent.birt
Multi-Select the Easy Way
Multi-Select Parameters
Available in 2.2
Builds an array of values
Often Used with SQL
Constrain query to range of
values
Where state in (‘MN’, ‘NC’, ‘CA’)
4
Source at:
http://longlake.minnovent.com/repos/birt_example/innovent.birt
Implementation Techniques
JavaScript Event Handlers
DataSet Property Binding
Two Issues
Maintenance
(query & expression)
SQL Injection
5
Source at:
http://longlake.minnovent.com/repos/birt_example/innovent.birt
SQL Injection
select * from orders where
DON’T
state in (?)
? = “ ‘MN’);
DO
drop database;
select * from dual where 1 in
(‘1’ ”
THIS
select * from orders where
state in (‘MN’);
drop database;
Source at:
6
http://longlake.minnovent.com/repos/birt_example/innovent.birt
Parameter Binding
Supported by JDBC and all
Databases
Stops SQL Injection Attacks
8
Source at:
http://longlake.minnovent.com/repos/birt_example/innovent.birt
Can BIRT Do This Easily?
Absolutely
Use standard SQL Syntax
Use ScriptFunctionExtension
point
Build your own functions
Expose those functions in the UI
New to 2.3.1
9
Source at:
http://longlake.minnovent.com/repos/birt_example/innovent.birt
Standard SQL Syntax
Select *
From Orders
Where 0=0
-- and status in
(‘MS:parameterName’)
10
Source at:
http://longlake.minnovent.com/repos/birt_example/innovent.birt
Use the
ScriptFunctionExtension
The easiest BIRT extension
point
Extremely useful
Many simpler applications
Combining the DEAPI and
ScriptFunctions is more
difficult.
Don’t Let these examples scare
you away.
11
Source at:
http://longlake.minnovent.com/repos/birt_example/innovent.birt
DEMO Time
Simple DEAPI Example
Add a Label to a blank design
Multi-Select Example
In action
12
Source at:
http://longlake.minnovent.com/repos/birt_example/innovent.birt
Questions and Contact Info
Scott Rosenbaum
[email protected]
(763) 225-8418
Keith Mericle
[email protected]
(562) 698-8583
http://innoventsolutions.com
13
Source at:
http://longlake.minnovent.com/repos/birt_example/innovent.birt
Questions ?
Source in Subversion
http://longlake.minnovent.com/repos/birt
project: innovent.birt.functions
14
Source at:
http://longlake.minnovent.com/repos/birt_example/innovent.birt