• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Java & Crystal Reports

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I posted this question on Crystal Reports forum, but didn't get any answer.
Hope, that someone with knowledge on how to deal with Crystal + Java can reply me here. This is the problem I am dealing with:

I am trying to export Crystal Report to Excel format in my JSP...
It works for PDF, RTF, MSWord formats, but when I'm trying to do the same for Excel - I am getting "Invalid post back event : {0}" message coming from com.crystaldecisions.report.web.viewer.ReportExportControl
Can not understand what I am doing wrong... Please, help! Thanks!
This is my JSP code:

<%@ page
import="com.crystaldecisions.reports.reportengineinterface.*,
com.crystaldecisions.report.web.viewer.*,
com.crystaldecisions.sdk.occa.report.exportoptions.*,
com.crystaldecisions.sdk.occa.report.data.*,
com.crystaldecisions.sdk.occa.report.reportsource.*" %>

<%
ReportExportControl exportControl = new ReportExportControl();

IReportSourceFactory2 rptSrcFactory = new JPEReportSourceFactory();
exportControl.setReportSource(rptSrcFactory.createReportSource(
"ReportForTst.rpt", request.getLocale()));

ExportOptions exportOptions = new ExportOptions();
exportOptions.setExportFormatType(ReportExportFormat.MSExcel);

ExcelExportFormatOptions xlexpopts = new ExcelExportFormatOptions();
xlexpopts.setStartPageNumber(1);
xlexpopts.setEndPageNumber(1);
exportOptions.setFormatOptions(xlexpopts);

exportControl.setExportOptions(exportOptions);
exportControl.setExportAsAttachment(true);
exportControl.processHttpRequest(request, response, application, null);

exportControl.dispose();
%>
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am facing the same problem




If any solution please inform


Thanks in advance

Regards
Sandeep Nayak
 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello there,
Used to use inet crystal clear for pumping out reports long time ago.

In the current project
We are using Crystal dev edition XI and no JSP's
So far all the documentation and examples are related to how things can be done in JSP+Crystal

Would sincerely appreciate if you could provide any pointer on how things can be moved forward with out the enterprise edition and a server but just a standalone app producing reports

Best regards,
Parthi
 
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well I am using JasperReports and not facing any problems.
[ July 07, 2005: Message edited by: Chetan Parekh ]
 
parthiban subramaniam
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good for you, unfortunately i'm stuck with crystal..and your pointer does not help in me progressing further .. more of rubbing salt in the wound

Thanks for your help anyways

Cheers,
Parthi
 
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you do not want to use Crystal reports in a J2EE environment the above example seems to be easy enough to convert.

I once used Crystal Reports in a Java/AWT application and do not remember having troubles with lacking documentation.

Seems to me that you can just use some code like in the example above (or any other JSP example) and
replace the call with something that writes to a FileOutputStream or something. The Crystal reports installation must come with an API description (Javadoc) or something like that.
 
parthiban subramaniam
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for teaching me that,

Like I said I�m stuck with crystal for this.

Tried doing all that the api documentation that they have give is a crap oh well guess I have to learn how to suck egg all over again
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic