Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Problem in showing records
rohitmali
Hi,<br />
<br />
I am trying to get the List of records from DB using java web application. The List has 20 records, but when when i am trying show these records in excel reports, it shows only 6 records.<br />
<br />
<strong class='bbc'>Note : I am using javascript in reports to get List from Service Method, then using count I am iterating over list and assigning values to columns. </strong>
Find more posts tagged with
Comments
Chintan
Hello Rohit,
You mean to while you export data into excel format at that time it only shows 6 records?
Regards
Chintan
rohitmali
<blockquote class='ipsBlockquote' data-author="'Chintan'" data-cid="96991" data-time="1330514229" data-date="29 February 2012 - 04:17 AM"><p>
Hello Rohit,<br />
<br />
You mean to while you export data into excel format at that time it only shows 6 records?<br />
<br />
Regards<br />
Chintan<br /></p></blockquote>
<br />
Yes Chintan.<br />
<br />
I have List of 20 records and when i tried to show records in excel reports, it only shows 6 records.
Chintan
Can you send me Images of questions? or birt rpt file.
So i can go thru the image or report and let you know if possible.
Regards
Chintan
rohitmali
<blockquote class='ipsBlockquote' data-author="'Chintan'" data-cid="96994" data-time="1330515808" data-date="29 February 2012 - 04:43 AM"><p>
Can you send me Images of questions? or birt rpt file.<br />
<br />
So i can go thru the image or report and let you know if possible.<br />
<br />
Regards<br />
Chintan<br /></p></blockquote>
<br />
Hi Chintan,<br />
<br />
This is my DAO method. <br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
public List<Employee> getTeamDetailsList(Connection connection, ReportBean reportBean) throws SQLException, TechnicalException
{
List<Employee> employeeList = new ArrayList<Employee>();
PreparedStatement statement = null;
ResultSet resultSet = null;
Employee employee;
DateConverter converter = new DateConverter();
String query;
try {
if (reportBean.getGcmLevel() != null) {
query = TEAM_DETAILS_LIST + " where GCM_TABLE.GCM_LEVEL like '%" + reportBean.getGcmLevel() + "%'";
}
else {
query = TEAM_DETAILS_LIST;
}
statement = connection.prepareStatement(query);
resultSet = statement.executeQuery();
while (resultSet.next()) {
employee = new Employee();
employee.setEmpId(resultSet.getInt("EMP_ID"));
employee.setDasId(resultSet.getString("EMP_DAS_ID"));
employee.setGender(resultSet.getString("GENDER"));
employee.setEmpName(resultSet.getString("EMPLOYEE_NAME"));
employee.setAoiJoiningDate(resultSet.getString("EMP_AOI_JOINDATE"));
employee.setProjectJoiningDate(resultSet.getString("EMP_PROJECT_JOININGDATE"));
employee.setPreviousExperience(resultSet.getInt("PREV_EXPERIENCE"));
// Calculate experience in Atos
if (employee.getAoiJoiningDate() != null) {
int months = converter.getMonths(employee.getAoiJoiningDate(), converter.getStrDate(new Date()));
employee.setExperienceInAtos(months);
}
employee.setEmpType(resultSet.getString("EMPLOYEE_TYPE"));
employee.setLocation(resultSet.getString("EMP_LOCATION"));
employee.setReportingManager(resultSet.getString("REPORTING_MANAGER"));
employee.setSalaryCode(resultSet.getInt("EMP_SC_CODE"));
employee.setGcmLevel(resultSet.getString("GCM_LEVEL"));
employee.setGcmGrade(resultSet.getString("GCM_GRADE"));
employee.setGcmDesignation(resultSet.getString("GCM_DESIGNATION"));
employee.setPrimarySkill(resultSet.getString("PRIMARY_SKILL"));
employee.setBillableGcm(resultSet.getString("EMP_BILLABLEGCM"));
employee.setTransferredFromDate(resultSet.getString("EMP_TRNS_FROM_DATE"));
employee.setTransferredToDate(resultSet.getString("EMP_TRNS_TO_DATE"));
employee.setPrimaryContactNumber(resultSet.getString("CONTACT_NUMBER"));
employee.setPermanetAddress(resultSet.getString("EMP_PERMANENT_ADDRESS"));
employee.setCertificationName(resultSet.getString("CERTIFICATION_NAME"));
employee.setAoiDesk(resultSet.getString("AOI_DESK"));
employee.setIpn(resultSet.getString("IPN"));
employee.setActiveCardNumber(resultSet.getString("ACTIVECARD_ID"));
employee.setVisaType(resultSet.getString("VISA_TYPE"));
employee.setVisaCountry(resultSet.getString("VISA_COUNTRY"));
employee.setVisaValidFromDate(resultSet.getString("VISA_VALID_FROM_DATE"));
employee.setVisaValidToDate(resultSet.getString("VISA_VALID_TO_DATE"));
employee.setPurposeOfTravel(resultSet.getString("PURPOSE_OF_TRAVEL"));
employeeList.add(employee);
}
}
finally {
closeDBResources(statement, resultSet);
}
return employeeList;
}
</pre>
<br />
Below is my Action Method from which I called dao method for getting the List and I am calling this method from open method of script of report(teamdetailsReport.rptdesign attached here) and iterating the List in fetch method.<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
public List<Employee> getTeamDetailsList(String gcmLevel)
{
ReportSrv reportSrv = new ReportSrvImpl();
List<Employee> teamDetailsList = new ArrayList<Employee>();
ReportBean reportBean = new ReportBean();
reportBean.setGcmLevel(gcmLevel);
try {
teamDetailsList = reportSrv.geTeamDetailsList(reportBean);
}
catch (TechnicalException e) {
LOGGER.info("ReportAction exception :" + e.getMessage());
e.printStackTrace();
}
catch (SQLException e) {
LOGGER.info("ReportAction exception :" + e.getMessage());
e.printStackTrace();
}
for (Iterator iterator = teamDetailsList.iterator(); iterator.hasNext();) {
Employee employee = (Employee) iterator.next();
System.out.println("SC=" + employee.getSalaryCode() + "\tName=" + employee.getEmpName());
}
return teamDetailsList;
}
</pre>
Chintan
Hello Rohit,
My question is...
1. In getTeamDetailsList method the size of the teamDetailsList.size() getting 20? If no then need to check method and if Yes then you may have to check for null values.
rohitmali
<blockquote class='ipsBlockquote' data-author="'Chintan'" data-cid="96999" data-time="1330518316" data-date="29 February 2012 - 05:25 AM"><p>
Hello Rohit,<br />
<br />
My question is...<br />
1. In getTeamDetailsList method the size of the teamDetailsList.size() getting 20? If no then need to check method and if Yes then you may have to check for null values.<br /></p></blockquote>
<br />
Yes, size of the teamDetailsList.size() is getting 20.<br />
Ok I will check for null values and let you know.<br />
<br />
Thanks.