开发者

Passing parameter to Java class using scripted DS in Birt

I have a method RunReport( rptfile, o/p path, emp_id); which generate the report using scripted Data Source. I need to pass emp_id to the script

Open():             
count = 0;

// Create instance of my class
p= new Packages.joez.sal();

//Load the List
s = p.getSal(emp_id); 

where based on emp_id, the report is generated. Please let me know how to set the valu开发者_运维百科e of emp_id in Java class from script.

Thanks in advance :)


In the script you cite above, you simply need to properly reference the parameter so it can be passed in by value.

Change you call to getSal(...) to look like this:

s = p.getSal(params["emp_id"]);

That should be the only change you need.

Good Luck!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜