I am very new in birt reporting,Give me a proper solution for my problem.I am Generating a report(.pdf) using birt tool,in which user select the employee by check box and report for that employee is generated. now ,problem is that function getemployeeData() which fetch the employee data calling multiple times even if i select the one employee, I try hard but not get a proper solution. I am describing my problem using code below.
script function which calling multiple times
count=0;
objBIRTController = contractandInvoice.model.BIRTConnection();
month=params["monthId"].value;
year=params["year"].value;
empId=params["empId"].value;
listMainData= objBIRTController.**getemployeeData**(month,year,empId);
Here getemployeeData() is calling multiple times.
In fecth where listMainData data is iterated.
if(count < listMainData.size()){
row["empName"] = listMainData.get(count).getEmpName();
row["DOJ"] = listMainData.get(count).getDOJ();
row["empCode"] = listMainData.get(count).getEmpCode();
count++;
return true;
}
return false;
BirtConnection.java
public List<EmployeeDataVO> getemployeeData(String monthId1,
String yearId1, String empId1) {
In this method I am retriving list which contains the employee data.
}