Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
R: [birt-report-engine-dev] Problem with Setting Parameter from myjava progam.

Hello I solve the same problem with as Data source an XML File on this way:

 

IReportRunnable  design = engine.openReportDesign("C:/work/DetailByInvestmentAndCurrencyt.rptdesign");

 

HashMap parameters = new HashMap();

parameters.put("PARAM_1", "30001");

 

IRunTask task = engine.createRunTask(design);

 

task.setParameterValues(parameters);

 

 

Attention “PARAM_1” is the name of the parameter defined using the Design report! The 30001 is the value

 

I hope that works for you too

 

Happy code

 

 

-----Messaggio originale-----
Da: birt-report-engine-dev-bounces@xxxxxxxxxxx [mailto:birt-report-engine-dev-bounces@xxxxxxxxxxx] Per conto di Arvi
Inviato: venerdì, 28. luglio 2006 15:52
A: birt-report-engine-dev@xxxxxxxxxxx
Oggetto: [birt-report-engine-dev] Problem with Setting Parameter from myjava progam.

 


Hi,

I have created a rptdesign document using eclipse BIRT designer which accesses my database table called employees.

I have specified the dataset query as follows:

select * from employees where employee_id = ?

The place holder will be replaced by the parameter specified in the parameter column.

I can preview the things from the eclipse using BIRT report viewer.

My problem is when i try ot using the API.
How can I set the parameter value for employee_id from my class?

I have used IGetPara...Task.setValue("employee_id", "101");

But an exception occures. What must I do?

- Arvind.


Back to the top