Jump to content
Changes to the Jaspersoft community edition download ×

exporting charts for reports in xls


Recommended Posts

By: shaji - shaji123

exporting charts for reports in xls

2006-06-05 23:33

Hi,

 

I've been trying to generate a chart in excel using jasper. The report displays table data but the chart area is empty. I use ireport 1.2 as the design tool. I am able to generate the chart in pdf. Is there any solution to this problem?

 

 

 

 

By: waterloo - waterlooz

RE: exporting charts for reports in xls

2006-06-06 23:37

hi,i am also confronted by this problem,my code is as follow:

 

res.setContentType("application/vnd.ms-excel;charset=UTF-8");

res.setHeader("Content-Disposition","attachment;filename="" + fileName + ".xls"");

JExcelApiExporter exporter = new JExcelApiExporter();

exporter.setParameter(JExcelApiExporterParameter.JASPER_PRINT, rptPnt);

exporter.setParameter(JExcelApiExporterParameter.OUTPUT_STREAM, httpOut);

exporter.setParameter(JExcelApiExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS,Boolean.TRUE);

exporter.setParameter(JExcelApiExporterParameter.IS_ONE_PAGE_PER_SHEET,Boolean.FALSE);

exporter.setParameter(JExcelApiExporterParameter.IS_WHITE_PAGE_BACKGROUND,Boolean.FALSE);

exporter.exportReport();

 

i have placed png-encoder-1.5.jar in lib directory,but when code comes to new JExcelApiExporter(),a Exception is throwed:

 

exception

 

javax.servlet.ServletException: Servlet execution threw an exception

db.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:122)

org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)

 

 

root cause

 

java.lang.IllegalAccessError: tried to access field com.keypoint.PngEncoder.encodeAlpha from class com.keypoint.PngEncoderB

com.keypoint.PngEncoderB.<init>(PngEncoderB.java:127)

com.keypoint.PngEncoderB.<init>(PngEncoderB.java:78)

net.sf.jasperreports.engine.export.JExcelApiExporter.<init>(JExcelApiExporter.java:127)

db.ReportManager.doGet(ReportManager.java:155)

javax.servlet.http.HttpServlet.service(HttpServlet.java:689)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

db.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:122)

org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)

 

this is really strange, in the package com.keypoint i find this: public class PngEncoderB extends PngEncoder

and the field com.keypoint.PngEncoder.encodeAlpha is protected: protected boolean encodeAlpha

so PngEncoderB of course can access field encodeAlpha, i am confused

 

Can someone give some advice,thank you

i am sorry for my poor english,i am from east asia

 

 

 

 

 

 

By: dave - prestinman

RE: exporting charts for reports in xls

2006-06-13 08:17

I too am having the same problem. I believe I have the up to date jars, but I get the same error

.....

java.lang.IllegalAccessError: tried to access field com.keypoint.PngEncoder.encodeAlpha

 

anyone with any ideas to what is occurring?

 

Thanks.

Dave

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...