YOU ARE DOWNLOADING DOCUMENT

Please tick the box to continue:

Transcript
Page 1: BIRT Multi Select Parameters

1

Source at: http://longlake.minnovent.com/repos/birt_example/innovent.birt.functions

Enabling Intelligent Decisions©

BIRT Multi-Select Parameters The Safe and Easy Way

Page 2: BIRT Multi Select Parameters

2

Source at: http://longlake.minnovent.com/repos/birt_example/innovent.birt.functions

BIRT Project

Our InvolvementInvolved with project since inception (2004)OS BIRT & Actuate BIRTBIRT PMC & BIRT CommittersBIRT World / BIRT Exchange

Our FocusFor your ProductFor your ProjectFor your Enterprise

Page 3: BIRT Multi Select Parameters

3

Source at: http://longlake.minnovent.com/repos/birt_example/innovent.birt.functions

BIRT Services

ServicesBest PracticesDesign, Development & DeploymentRemote Consulting and SupportBIRT Training

Selected ExperienceAldonBlackboard

Page 4: BIRT Multi Select Parameters

4

Source at: http://longlake.minnovent.com/repos/birt_example/innovent.birt.functions

Multi-Select the Easy Way

Multi-Select Parameters Available in 2.2Builds an array of values

Often Used with SQLConstrain query to range of valuesWhere state in (‘MN’, ‘NC’, ‘CA’)

Page 5: BIRT Multi Select Parameters

5

Source at: http://longlake.minnovent.com/repos/birt_example/innovent.birt.functions

Implementation Techniques

JavaScript Event HandlersDataSet Property Binding

Two Issues Maintenance

(query & expression)SQL Injection

Page 6: BIRT Multi Select Parameters

6

Source at: http://longlake.minnovent.com/repos/birt_example/innovent.birt.functions

SQL Injectionselect * from orders where state in (?)

? = “ ‘MN’); drop database;select * from dual where 1 in (‘1’ ”

select * from orders where state in (‘MN’);drop database;select * from dual where 1 in (‘1’)

DON’T

DO

THIS

Page 7: BIRT Multi Select Parameters

7

Source at: http://longlake.minnovent.com/repos/birt_example/innovent.birt.functions

Parameter Binding

Supported by JDBC and all DatabasesStops SQL Injection Attacks

select * from orders wherestate in (?,?,?)

Each parameter value requires a binding

Page 8: BIRT Multi Select Parameters

8

Source at: http://longlake.minnovent.com/repos/birt_example/innovent.birt.functions

Can BIRT Do This?

AbsolutelyDesign Engine API

Read QueryTextFind Parameter Names / ValuesModify SQL Text to add ‘?’ Add Parameter Binding to DataSet

Page 9: BIRT Multi Select Parameters

9

Source at: http://longlake.minnovent.com/repos/birt_example/innovent.birt.functions

Can BIRT Do This Easily?

AbsolutelyUse standard SQL Syntax Use ScriptFunctionExtension point

Build your own functionsExpose those functions in the UINew to 2.3.1

Page 10: BIRT Multi Select Parameters

10

Source at: http://longlake.minnovent.com/repos/birt_example/innovent.birt.functions

Standard SQL Syntax

Select * From OrdersWhere 0=0-- and status in (‘MS:parameterName’)

Page 11: BIRT Multi Select Parameters

11

Source at: http://longlake.minnovent.com/repos/birt_example/innovent.birt.functions

Use the ScriptFunctionExtension

The easiest BIRT extension pointExtremely useful Many simpler applications

Combining the DEAPI and ScriptFunctions is more difficult.

Don’t Let these examples scare you away.

Page 12: BIRT Multi Select Parameters

12

Source at: http://longlake.minnovent.com/repos/birt_example/innovent.birt.functions

DEMO Time

Simple DEAPI ExampleAdd a Label to a blank design

Work with ParametersDynamically show parameters in design

Multi-Select ExampleIn action

Page 13: BIRT Multi Select Parameters

13

Source at: http://longlake.minnovent.com/repos/birt_example/innovent.birt.functions

Questions and Contact Info

Scott [email protected](763) 225-8418

Keith [email protected](562) 698-8583

http://innoventsolutions.com

Page 14: BIRT Multi Select Parameters

14

Source at: http://longlake.minnovent.com/repos/birt_example/innovent.birt.functions

Questions ?

Source in Subversionhttp://longlake.minnovent.com/repos/birt_exampleproject: innovent.birt.functions


Related Documents