Jump to content
Changes to the Jaspersoft community edition download ×

Problem while converting to excle file from jasper


jobz.joseph
Go to solution Solved by Ankur Gupta,

Recommended Posts

Hi all,

I have created a jasper template file for generating excel report. I want to query some data from DB and dispay it in my generated excel file. I can able to generate the file but the problem is there is somuch of blank spaced in the page. I am generating the report for department wise. so, if only one member is present in the department, I need the full page for that department and the remaining details will load to the next page. These all are working.

Attached a screenshot of the file.

From the image, you can see that the report starting from the position A and ends up in cell position CS.

It is not loaded in continuous cells. I can see that so many blank cells in the generated file. How can I create the excle by loading the values in continuous cell.

Regards,

Joby Joseph
 

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Solution

Hi Joby ,

This is happening because, the excel export takes the white space in the report as a column, as you say that there is an requirement of Header also, that will contain columns which correspond to whitespaces.

It is adviced, that the reports exported in Excel should rather shred the header, and the text feilds placed in the detail section or anywhere for that matter should be continuous in nature

 

Hope that this helps

Thanks
Ankur Gupta
http://ankurthetechie.blogspot.in/

Link to comment
Share on other sites

Hi Ankur,

I need a small help. I am trying to remove the spaces between the data in Jasper report. suddenly, I got an error.

 

500 Internal Server Error

java.lang.IllegalArgumentException: The 'to' row (20) must not be less than the 'from' row (36) at org.apache.poi.hssf.model.Sheet.addMergedRegion(Sheet.java:445) at org.apache.poi.hssf.usermodel.HSSFSheet.addMergedRegion(HSSFSheet.java:561) at net.sf.jasperreports.engine.export.JRXlsExporter.createMergeRegion(JRXlsExporter.java:611) at net.sf.jasperreports.engine.export.JRXlsExporter.initCreateCell(JRXlsExporter.java:560) at net.sf.jasperreports.engine.export.JRXlsExporter.createTextCell(JRXlsExporter.java:550) at net.sf.jasperreports.engine.export.JRXlsExporter.exportText(JRXlsExporter.java:410) at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportPage(JRXlsAbstractExporter.java:590) at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportReportToStream(JRXlsAbstractExporter.java:463) at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportReport(JRXlsAbstractExporter.java:186) at pkgIncentiveWeb.EmpIncentiveDvnReportAction.execute(EmpIncentiveDvnReportAction.java:235) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65) at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) at java.lang.Thread.run(Thread.java:534)

 

What is this error. any idea?

 

Regards,

 

Joby Joseph

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...