running crystal report 5/6 in java

hi, how can i run crystal report 5 and 6 in java. i've java code w

Page 1 of 1

1 Replies - 3149 Views - Last Post: 01 March 2009 - 05:46 PM Rate Topic: -----

#1 ehfajkhan  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 01-March 09

running crystal report 5/6 in java

Posted 01 March 2009 - 12:42 PM

hi, how can i run crystal report 5 and 6 in java. i've java code which runs crystal repo 9/10/11 but when i tried to open report 5/6 ver it gave error

its giving error that you have older version file can't open. is there any way to open crystal report 5/6 file using java/jsp code?


code:

<%@ page import="com.crystaldecisions.sdk.occa.report.application.*,com.crystaldecisions.reports.reportengineinterface.*,
com.crystaldecisions.report.web.viewer.*, com.crystaldecisions.sdk.occa.report.data.*, com.crystaldecisions.sdk.occa.report.reportsource.*, com.crystaldecisions.sdk.occa.report.exportoptions.*" %>
<%
ReportClientDocument clientDoc = new ReportClientDocument();
//open the Report
//clientDoc.open("Crystal Report - Converting Number to Words.rpt", 0);

CrystalReportViewer crv = new CrystalReportViewer();
JPEReportSourceFactory jrsf = new JPEReportSourceFactory();
IReportSource reportSource = (IReportSource)jrsf.createReportSource("Crystal Report - Converting Number to Words.rpt",request.getLocale());
crv.setReportSource(reportSource);
//crv.setReportSource(jrsf.createReportSource("RevAnalAdvice of Credit - Meter Pay & Display Rpt.rpt",request.getLocale()));
//crv.setReportSource(jrsf.createReportSource("AutoPound.rpt",request.getLocale()));

ReportExportControl exportControl = new ReportExportControl();
ExportOptions exportOptions = new ExportOptions();
exportOptions.setExportFormatType(ReportExportFormat.PDF);
PDFExportFormatOptions pdfexpopts = new PDFExportFormatOptions();
exportOptions.setFormatOptions(pdfexpopts);
exportControl.setReportSource(reportSource);
exportControl.setExportOptions(exportOptions);

//crv.processHttpRequest(request, response,application, null);
//exportControl.dispose();
crv.showFirstPage();
crv.dispose();

%>

thanx in advance

Is This A Good Question/Topic? 0
  • +

Replies To: running crystal report 5/6 in java

#2 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8324
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: running crystal report 5/6 in java

Posted 01 March 2009 - 05:46 PM

Are you sure you are talking Java here ?
Looks more to me like a Javascript problem
Are you sure you are in the good forum ? This is the Java forum not the Javascript forum.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1