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!
精彩评论