views:

23

answers:

1

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 value of emp_id in Java class from script.

Thanks in advance :)

A: 

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!

MystikSpiral
Hi, Thank you so much :).. Its Working :)
wiki.horizon
Please let me know how to fetch the values of arraylist in Script.method: public class sal { public ArrayList<SalaryVO> getSal(String e) {}}SCRIPT:open - p= new Packages.joe.birt.action.sal(); var s=p.getSal(params["emp_id"]); Fetch- done=false;if( s!=null row["ID"] = s.getEmpId(); s=null; done=true; } return done;
wiki.horizon