Exporting Crystal Report 2008 under java

I'm in the process of converting a desktop application from VB6 to Java
I am also upgrading Crystal Reports from version CR10 to CR2008.
The application executes and exports the report to a PDF file.
I cannot get past the error :
.getPrintOutputController().export(ReportExportFormat.PDF);
Am I using the correct CR packages? All examples I've found refer
to CR XI version or lower
Below is the code supposedly used to execute and create the output file.
import com.crystaldecisions.reports.sdk.*;             
import com.crystaldecisions.reports.sdk.*;    
import com.crystaldecisions.sdk.occa.report.exportoptions.*;    
import com.crystaldecisions.sdk.occa.report.lib.*;    
//Java imports.  
import java.io.*;
* @author wr0848
public class JRCExportReport {
     static final String REPORT_NAME = "Employees.rpt.rpt";
     static final String EXPORT_FILE = "C:\\myExportedReport.pdf";
     public static void main(String[] args) {
          try {
               //Open report.
               ReportClientDocument reportClientDoc = new ReportClientDocument();
               reportClientDoc.open(REPORT_NAME, 0);
               //NOTE: If parameters or database login credentials are required, they need to be set 
before.
               //calling the export() method of the PrintOutputController.
               //Export report and obtain an input stream that can be written to disk.
               //See the Java Reporting Component Developer's Guide for more information on the 
supported export format enumerations
               //possible with the JRC.
            ByteArrayInputStream byteArrayInputStream = (ByteArrayInputStream)reportClientDoc.getPrintOutputController().export(ReportExportFormat.PDF);
               //Release report.
               reportClientDoc.close();
               //Use the Java I/O libraries to write the exported content to the file system.
               byte byteArray[] = new byte[byteArrayInputStream.available()];
               //Create a new file that will contain the exported result.
               File file = new File(EXPORT_FILE);
               FileOutputStream fileOutputStream = new FileOutputStream(file);
               ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream
(byteArrayInputStream.available());
               int x = byteArrayInputStream.read(byteArray, 0, byteArrayInputStream.available());
               byteArrayOutputStream.write(byteArray, 0, x);
               byteArrayOutputStream.writeTo(fileOutputStream);
               //Close streams.
               byteArrayInputStream.close();
               byteArrayOutputStream.close();
               fileOutputStream.close();
               System.out.println("Successfully exported report to " + EXPORT_FILE);
          catch(ReportSDKException ex) {
               ex.printStackTrace();
          catch(Exception ex) {
               ex.printStackTrace();

Download and use the Crystal Reports for Eclipse CRJ runtime:
[http://www.businessobjects.com/campaigns/forms/downloads/crystal/eclipse/datasave.asp]
Sincerely,
Ted Ueda

Similar Messages

  • How to integrate Crystal Report 2008 with java

    Currently we are using Crystal Report XI with our application, it is working fine. Now we are updating to Crystal Report 2008.
    We have build our application in enterprise archive file. There is a web archive file(.war) file in the EAR file which contains the crystal report. Inside the .war file we have reports folder which contain jsps and rpt folder. the jsps folder contains the crystalreportviewers12 folder and .jsp files. The rpt folder contain the.rpt files. The WEB-INF which is at the reports folder leavel contains the classes and lib folder.  The crystal report jars are in the lib folder and the CRConfig.xml file inside the classes folder.  I replaced all the crystal report jar with Crystal Report 2008 jars, modified the web.xml and the CRConfig.xml file accordingly. When I opened the report it gave me an error.
    When the following line was execuated in the jsp:
    reportClientDocument.open(report, 0);
    it gave me following error:
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: There is no server specified.---- Error code:-2147217390 Error code name:serverNotFound
    at com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException.throwReportSDKServerException(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportAppSession.do(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportAppSession.int(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportAppSession.initialize(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ClientDocument.new(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.new(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ClientDocument.open(Unknown Source)
         at com.ibm._jsp._MessageStatusRpt.jbInit(_MessageStatusRpt.java:196)
         at com.ibm._jsp._MessageStatusRpt._jspService(_MessageStatusRpt.java:313)
         at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:87)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:592)
         at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:524)
         at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:122)
         at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:232)
         at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3548)
         at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:269)
         at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:818)
         at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1478)
         at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:125)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
         at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
         at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
         at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
         at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
         at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
         at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
         at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
         at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
         at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)
    [1/15/10 17:37:40:703 IST] 00000026 ServletWrappe E   SRVE0068E: Uncaught exception thrown in one of the service methods of the servlet: /reports/jsps/MessageStatusRpt.jsp. Exception thrown : java.lang.NullPointerException
         at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.f(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.getReportSource(Unknown Source)
         at com.ibm._jsp._MessageStatusRpt._jspService(_MessageStatusRpt.java:314)
         at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:87)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:592)
         at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:524)
         at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:122)
         at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:232)
         at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3548)
         at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:269)
         at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:818)
         at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1478)
         at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:125)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
         at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
         at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
         at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
         at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
         at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
         at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
         at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
         at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
         at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)
    [1/15/10 17:37:40:703 IST] 00000026 WebApp        E   [Servlet Error]-[/reports/jsps/MessageStatusRpt.jsp]: java.lang.NullPointerException
         at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.f(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.getReportSource(Unknown Source)
         at com.ibm._jsp._MessageStatusRpt._jspService(_MessageStatusRpt.java:314)
         at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:87)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:592)
         at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:524)
         at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:122)
         at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:232)
         at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3548)
         at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:269)
         at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:818)
         at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1478)
         at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:125)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
         at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
         at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
         at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
         at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
         at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
         at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
         at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
         at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
         at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)

    Hello Ted,
    As per the samples in the link provided by you I identified that the following statement was missing.
    reportClientDocument.setReportAppServer(ReportClientDocument.inprocConnectionString);
    After adding this statement the jsp was not able to compile, it gave me an error:
    ReportClientDocument.inprocConnectionString cannot be resolved
    Now my queries are:
    1. What is Report Application server(RAS)?
    2. Is it required to set Report application server in JSP page? It was not required in Crystal Reports XI. If YES, then how to configure RAS inside our applications WAR file?
    3. I am using WebSphere Application Server for deploying the WEB Archive file (WAR file). The Crystal Reports 2008  library (JARS) are embedded inside the WEB-INF/lib folder. How to specify the RAS server inside thhe WAR file? Is it some XML configuration file which we have to keep at WEB-INF level? Or we have to modify the existing CRConfig.xml file?
    4. I would like to mention here that we have bundled crystalreportviewers12/ folder in our WAR file at the same level where reports JSP pages exits.
    Thanks in advance.

  • Crystal Reports 2008 export to PDF does not render Japanese fonts

    Hello,
    I have searched the forums for this issue, and there does not seem to be a clear resolution to this problem.  We are using CR2008 to create RPT files that are bundled with our custom .NET 2005 application, which then generates reports in PDF format by running the RPT files against an access mdb database using the CR2008 runtime (our application is deployed on a different machine than the one that is used to create the RPT files).  The issue we are having occurs when data in the access mdb file contains Strings with Japanese characters.  The system that our application is running on does contain the eastern asian language fonts so if a user opens the mdb file using access, they can see the Unicode strings in the database rendered properly (rather than the usual boxes and garbage).  However, once our application generates the report filling in the rpt file with data from the mdb and exporting the report to pdf format, the entries that should contain Japanese font data, which leads me to believe the problem is in the export pdf function of the crystal reports 2008 runtime.  Is there anyway we can configure the runtime to properly embed the fonts in the PDF so that the users can view the Japanese content from the database.  Our users end up viewing reports on both OSX and Windows using Adobe Acrobat Reader.
    Thank you very much in advance

    Thanks for the quick reply!
    1) Exact version of Crystal Reports. (Open Crystal Developer. Go to Help> About Crystal Reports).
    12.0.0.683
    Type: Full
    2) What happens if you export the report to PDF format from the standalone Crystal Reports Designer?
    Same result.  The entry shows up as giberish in the report designer preview...however, by doing this I stumbled upon something.  See below
    3) Are you able to export the report to other formats without any issue?
    See Note below
    NOTE:
    In another part of the report, I just put the fields in question directly in the report (that is, not embedded in a text object).  That part of the report when run produces the correct non-gibberish, properly rendered Japanese result (in the CR designer preview).  The same field, however, when embedded in a text object, results in the gibberish being shown in the designer preview as well.
    Now when I export this to PDF, that ends up turning both areas into the incorrect, gibberish result.  Both the one that did properly render in the preview (field not embedded in text object) and the one in the text object.
    Exporting to any other format (tried xls, rtf and html) results in correct rendering for the field not embedded in the text object and incorrect rendering for the field embedded in a text object.
    Hope this helps with the problem, and I think it means this thread probably still belongs under this current forum.
    Cheers

  • Crystal Report 2008 SP2 & InfoView: Custom XML Export doesnt work

    Hi,
    I have created a Crystal Report .rpt and want to use the custom xml export function to output a custom xml file. For that, I created a custom transformation file (xsl) and imported it into the .rpt . On the client machine, if I open the .rpt with Crystal Reports 2008 SP2, and select to export it using the custom xml output, all runs fine. (under SP1, only half the file was created...)
    If I upload the .rpt file to Infoview (server-side: BO Enterprise 3.1, SP2 as well) and schedule it, I can select xml, and then my custom xml as output format, but I am getting the error message u201EUngültige Exportoptionen" (="invalid export options"), in the instance history. No output file is created. I use file system as destination. Other output formats like .pdf and .rpt work fine and files are created.
    Ideas:
    -Are there any more settings needed on the server (e.g.CMC - Crystal Server Jobs, other Processes, ...) so I can schedule the report and successfully create the custom xml format file as output?
    -Do I need to upgrade to a specific SP or FP on server-side so everything runs smooth?
    Thanks for your help!

    Hi Florian,
    I'm having the same problem, have you by any chance found a solution?
    Gajus.

  • Crystal Reports 2008 fails when called from e Web Service under 64bit OS

    I have discovered that Crystal Reports 2008 doesn't work when called from a Web Service running under 64bit Windows platforms (in my case Windows 2003 Server and Windows XP 64bit); practically no object is instantiated. I've tried several solutions without success.
    Before creating a wrapper component to use under COM+, is there anybody who has a better and cheaper solution than creating another component to wrap CR 2008 ?

    Hi Sergio,
    Before I mark this post as assumed answered I would just like to say and re-iterate that at this time there is no one answer and we fully understand your concerns. As you know in CR 6.0 it came in 16 and 32 bit versions because at the time 32 bit was relatively new but 16 bit was the norm. This is also true for 32 to 64 bit, 32 is the norm and 64 bit is relatively new. We know and are well aware 64 bit is the future and we are working as quickly as we can to move in that direction. Because of the complexity of the Product it's not simply a matter of re-compiling all of our dll's in 64 bit format. The core of our data connectivity with our database drivers which are dependant on third party clients must also need to support 64 bit modes. This as well as Printer drivers also need to be 64 compatable, there are a multitude of dependencies that we rely on that must add 64 bit support. As a programmer you are well aware of the issues around Thunking back and forth between 32 to 64 bits, it can cause delays and potentially loss of data which is a whole other issue. Not to mention also that we would have to ship both versions potentially doubling the size of the distribution packages or doubling the size of the dll's to have the ability to work in both modes. Relatively speaking of course, it would not be double the size but the variables would need to be able to allocate 32 or 64 memory blocks.
    The other option is to produce 2 separate versions, this alone is a massive project. Any issue would need to be fixed in separate code streams.
    So I'm sure you can see it's not simply a matter of saying yes we support 64 bit. It's a massive project that is going to take time to do and we have to wait for the third party drivers to commit also.
    Visual Studio .NET 2005 and 2008 is the only option if you want true 64 bit but you will be limited on what DB's you can support and export formats you can export to. They are the only drivers we did convert to 64 bit.
    Thank you for your understanding
    Don

  • Internet Explorer7 Blocking Crystal Reports 2008 CrystalReportViewer Export

    Visual Studio 2008 (VS 2008)
    Crystal Reports 2008 (CR 2008)
    Production Server: Windows Server 2003
    Internet Browser: Internet Explorer 7 (IE7)
    Crystal Reports Version: 12.0.2000.0  on both development and production
    IE7 message: To help protect your security, Internet Explorer blocked this site from downloading files to your computer. Click here for options.
    I am in the process of updating my websites from Visual Studio 2005 and Crystal Reports.NET 2005 to Visual Studio 2008 and Crystal Reports 2008.
    In VS 2005, when creating a PDF or exporting from the CrystalReportsViewer, IE7 does not block the creation/download of the PDF, nor the download of an export.
    Whereas, with VS 2008 and CR 2008 using the CrystalReportViewer  in IE7 blocks the creation/download of the PDF, and the download of an export.
    The message returned in the yellow box at the top of IE7 display window:   To help protect your security, Internet Explorer blocked this site from downloading files to your computer. Click here for options.
    If I select down Download Fileu2026  from the options, I must restart the PDF or export. 
    If I show another report, I have the same problem, even if I have stated to download the fileu2026.
    1. What is different between the CrystalReportViewer versions?
    2. What is recommended to avert this problem without having users change their IE7 settings?
    I found this settings change at: http://support.dell.com/support/topics/global.aspx/support/dsn/en/document?journalid=63F807B28AEC39CEE040AE0AB6E15FC5&docid=182320
    Turn off the Information Bar for file downloads
    This procedure will allow Web sites to automatically prompt you when downloading files, bypassing the Information Bar.
    1. Open Internet Explorer.
    2. Click Tools on the menu bar.
    3. Click Internet Options...
    4. At the Internet Options window, click the Security tab.
    5. Click the Custom Level... button.
    6. Security Settings window Security Settings window, scroll down to Downloads in the Settings: list.
    7. Click to select Enable under Automatic prompting for file downloads.
    8. Click the OK button.
    9. At the Warning! message, click the Yes button to change the security settings for the zone.
    10. Click the OK button.
    You will now receive prompts directly from a Web site if it needs to download a file to your computer.

    Hi Don:
    Yes, this is an https:// site.
    This is using X500 accounts for security. Once logged in, the site is running on an anonymous local user account.
    On Internet Options | Security | Internet | Setting the security level as medium  on (the lowest I was able to go) in  IE7 does not allow the user to download without the message coming up. It even states on the side (- Prompts before downloading potentially unsafe content)
    Workaround has been:
    1. Set the site as a trusted site (Internet Options | Security | Trusted Sites | Sites | Add )
    2. On the Trusted Sites Zone | Security level of this zone | Custom levelu2026
    3. Downloads | Automatic prompting for file downloads u2013 change to Enable
    Thanks for your input.  I would like to resolve this issue. CrystalReportsViewer - Crystal Reports Exports/Printing methodology has been changed since Visual Studio 2005 .NET version. 
    Thank you for your input.
    Patti

  • Exporting Options in Crystal Reports 2008

    I am using Crystal Reports 2008 to make my report for my users.   I am also programming a viewer in vb 2005 so the users can view the report without changing it.  In the viewer I need to be able to export to excel or pdf or any other format.  I want the user to be able to specify where and how to export the report.  However when they press on the export button it is giving a save as dialog box, which, while it gives options to save as excel or pdf, it does not give the options such as to application, or to file, which are there in the full crystal report product. 
    My form gets the report name, sets up the data source and then displays it in a
    CrystalReportViewer object. 
    CrystalViewer.ReportSource = MyReportDocument
            CrystalViewer.DisplayToolbar = True
            CrystalViewer.ShowRefreshButton = False
            CrystalViewer.DisplayStatusBar = True
            CrystalViewer.EnableDrillDown = True
            CrystalViewer.EnableRefresh = False
            CrystalViewer.EnableToolTips = True
            CrystalViewer.ShowExportButton = True
    The export button is there, it just does not give all of the options that I would have expected.  I see there are ways to programatically use the options, however the export dialog box that appears in crystal reports 2008 would be useful to the user here.  Is there a way to make that box show up.  Perhaps it should be and I am doing something wrong.  I am very new to .net and crystal 2008, we used to use crystal 8.0 with vb6 for a viewer.  In that version the export dialog box showed up correctly.  Thank you for your help.  Also, if i am posting this in the wrong forum area please let me know so i can post it where it should be.

    You are doing things the correct way, unfortunately the export dialog is very basic.  If you want this extra functionality, you will have to code it yourself.

  • Help needed  while exporting crystal reports to HTML file format using java

    Help needed  while exporting crystal reports to HTML file format using java api(not using crystalviewer).i want to download the
    html file of the report
    thanks

    the ReportExportFormat class does not have HTML format, it has got to be XML. Export to HTML is available from CR Designer only.
    Edited by: Aasavari Bhave on Jan 24, 2012 11:37 AM

  • Crystal Report 2008 export to text problem

    Hello,
    I am using Crystal Reports 2008 for generating reports in our WPF application. In this application, we are exporting the report to txt file on a button click. Now the application contains a form called u2018Print Manageru2019, through which the user can print the exported report(text files). Now the issue, when we try to the any of the exported report file through the application, the printer leaves alternate blank pages. The printer used in this case is DOT MATRIX EPSON LQ-1150II ESC/P2. We even tried printing the text file on HP Laser jet 4600, but the same issue is faced.
    Also, please note that when I try to read the exported txt file, a formfeed(u2018\fu2019 page break) character  can be seen  at the place where the printer leaves a blank page. Hence, my concern is, Is there any property of crystal report that I am missing on or is this a printer driver issue? But if it would have been a driver issue, then changing the printer might have solved the issue.
    I also  tried  doing u2018Keep Togetheru2019 property = false of all the sections of the report. Also, I found that the u2018New Page Afteru2019 property = true and disabled for the u2018Page Footeru2019 section. So I set u2018New Page Afteru2019 property = false programmatically as
    rdTest.ReportDefinition.Sections["Section5"].SectionFormat.EnableNewPageAfter = false;
    but no luck.
    If anyone has faced similar problem or have any clues, please help!
    Any kind of help in solving this issue will be highly appreciated.
    Thanks in anticipation!

    Good morning.
    We've got something to get straight first
    When you say "...from the Report Viewer. The report printed as expected on HP printer...", do you mean the viewer of the .NET app, or the viewer of the CR designer?
    And version 12.0.0.683, is very old (well as far as CR is concerned anyhow   ). That version is SP 1, we are now on SP 2. So that will be the place to start. Get to SP 2 which can be downloaded from here;
    https://smpdl.sap-ag.de/~sapidp/012002523100009038092009E/cr2008win_sp2.exe
    Ludek

  • Crystal Report 2008 doesn't set  page size when export to excel file

    Hi,
    I am using Crystal Report 2008 Developer edition.
    At Crystal report design time setting the below page setup:
    Page Options -
       to A3(297X420 mm)
    Orientation --- Landscape
    and using the following code in .net (c#)
    I am using below format options to export in excel in .net 2005
    ReportDocument oReport = new ReportDocument();
    oReport.FormatEngine.PrintOptions.PaperOrientation = PaperOrientation.Landscape;
    oReport.FormatEngine.PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.PaperA3;
    if (aParamlist.ReportFormat == ReportFormatEnum.MicrosoftExcel)
    ExcelFormatOptions excel = new ExcelFormatOptions();
    excel.ExcelUseConstantColumnWidth = false;
    // Use detail section one as a guideline to determine column width
    excel.ExcelAreaGroupNumber = 1;
    //excel.ExcelAreaType = AreaSectionKind.Detail;
    excel.ExcelAreaType = AreaSectionKind.Detail;
    // Prepare exporting options
    ExportOptions export = oReport.ExportOptions;
    export.FormatOptions = excel;
    export.ExportFormatType = ExportFormatType.Excel;
    oReport.Export();
    when export to excel it doesn't set the Paper Size to  A3(297X420 mm).
    Is there any way to set the paper size while export to excel or in other formats also????
    Thanks & Regds,

    Hi,
    thanks for your email.
    This is not happening in development environment.It is setting the paper size anf paper orientation properly.
    this is happening in the production environment where only redist installation is done.
    thanks

  • Invalid export DLL or export format" with Crystal Reports 2008 to Excel xls

    We are experiencing the same issue as reported in the sticky thread. I answered in that thread, but thought that I woudl open a new thread to keep track of this issue.  I can give you the responses to your questions you have requested in that thread:
    Server Operating System - MS Windows Server 2003 R2 Enterprise Edition SP2
    Version of the .NET Framework - MS .NET Framework 3.5 SP1
    How did you deploy? - Installed CR 2008 SP1 runtime with msi package
    If you deployed with CRRuntime_12_0_mlb.msi - what was the date of the file and its size? CRRuntime_12_1_mlb.msi dated Sept. 16, 2008 12:55:00 PM, size: 56,717,824 bytes
    What is the file version of crpe32.dll on your server? You'll find this in the C:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86 directory - File was created 9/13/08 11:21AM, 9451KB File Version: 12.1.0.882
    How many libpng10.dll files are on your system? List all instances. - 1 instance is on the system located in C;\Program Files\Business Objects\Business Objects Enterprise 12.0\win32_x86 directory. It is dated 9/13/08 8:52:26AM 132KB version 1.0.30.1
    Any additional comments - We have tried to export to PDF and this works successfully. However, we can not export to xls or rft formats.
    CRXF_XLS.dll is 905KB 9/13/08 9:38AM Version 12.1.0.882
    CRXF_RTF.dll is 509KB 9/13/08 9:35AM Version 12.1.0.882
    We also have the CR XIR2 server runtime installed side by side on the server as we migrate from CR 2008 to CR XIR2 SP4 ( where this function does work currently).
    Please let me know if you need anything additional.
    Phil
    "Invalid export DLL or export format" with Crystal Reports 2008
    Posted: Sep 27, 2008 12:36 AM       E-mail this message      Reply 
    I've included this sticky because we are seeing many posts in this forum regarding the error Invalid export DLL or export format when exporting to Excel and RTF in .NET applications using the Crystal Reports 2008 .NET SDK.
    Issue
    Exporting a Crystal Report to Excel or RTF format
    .NET application using the Crystal Reports 2008 runtime (version 12.0)
    error Invalid export DLL or export format
    We've been doing some testing in-house and haven't reproduced this behavior. In order to figure this issue out we will need your help. If you are getting this error please reply to this post with the following information:
    Server Operating System
    Version of the .NET Framework
    How did you deploy?
    If you deployed with CRRuntime_12_0_mlb.msi - what was the date of the file and its size?
    What is the file version of crpe32.dll on your server? You'll find this in the C:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86 directory
    How many libpng10.dll files are on your system? List all instances.
    Any additional comments
    What We Know
    The error invalid export DLL or export format may occur when exporting to Excel and RTF formats in .NET applications utilizing the Crystal Reports 2008 runtime (v 12.0)
    Other export formats like Adobe PDF, Crystal Reports, CSV all export with no error
    Some customers have resolved this by adding C:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86 to their environment path variables
    This may have something to do with the file libpng10.dll. Both crxf_xls.dll and crxf_rtf.dll are dependent on it.
    Thanks in advance for your co-operation. We hope to figure out what is causing this issue soon.

    Hi,
    I am also having the same problem, except that I am not using Crystal Report 2008 runtime but the actual Crystal Report 2008 installation on Windows XP SP2 with VS Studio 2005 (VC++). MS .NET Framework 2.0.
    Cyrstal Report XIR2 was installed on the same machine but uninstalled before installing Crystal Report 2008.
    So only one instance of libpng10.dll and found in C:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86
    Crpe32.dll        3/1/2008 version 12.0.0.683
    Crxf_xls.dll       3/1/2008 version 12.0.0.683
    Crxf_rtf.dll         3/1/2008 version 12.0.0.683
    crdb_oracle.dll  3/1/2008 version 12.0.0.683
    libpng10.dll       3/1/2008 version 1.0.30.0             122880 bytes
    There is no problem for exporting to pdf, html, word, csv, Crystal Report. If I create a testing report without any data from database, the testing report can then be exported also to rtf and xls.
    Oracle 11.1.0.6 is the DB for the reports.
    Adding C:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86 to the path did not resolve my problem.
    Any idea to fix this issue?
    Thanks
    Kin H Chan

  • CR2008 Not enough memory while exporting reports from Crystal Reports 2008

    I have recently upgraded our Crystal Reports version from Crystal Reports Basic for Visual Studio 2008 to Crystal Reports 2008. After upgradation I am facing the problem "Memory full.OtherErrorFailed to export the report. Not enough memory for operation" when I am trying to export the report from Crystal Reports 2008 Report viewer, or directly from the code behind. The application is hosted application. The problem occurs in our production environment.
    Server details:
    OS: Windows 2003 Enterprise Edition R2 with SP2
    IIS: IIS 6
    .Net Framework: 3.5
    Application details:
    Hosted application using Crystal Reports 2008 SP 3
    Crystal Reports Viewer version: 12.0.2000.0
    The data binding of the report object is done through an ADODB dataset.
    Web.Config:
    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
      <configSections>
        <sectionGroup name="businessObjects">
          <sectionGroup name="crystalReports">
            <section name="printControl" type="System.Configuration.NameValueSectionHandler" />
            <section name="crystalReportViewer" type="System.Configuration.NameValueSectionHandler" />
          </sectionGroup>
        </sectionGroup>
      </configSections>
      <businessObjects>
        <crystalReports>
          <printControl>
            <add key="url" value="http://myserver/mysite/PrintControl.cab" />
          </printControl>
          <crystalReportViewer>
            <add key="documentView" value="weblayout" />
          </crystalReportViewer>
        </crystalReports>
      </businessObjects>
      <appSettings>
        <add key="CrystalImageCleaner-AutoStart" value="true" />
        <add key="CrystalImageCleaner-Sleep" value="60000" />
        <add key="CrystalImageCleaner-Age" value="120000" />
      </appSettings>
      <system.web>
        <httpHandlers>
          <add path="CrystalImageHandler.aspx" verb="GET" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
        </httpHandlers>
        <compilation debug="false">
          <assemblies>
            <add assembly="CrystalDecisions.Data.AdoDotNetInterop, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
            <add assembly="CrystalDecisions.Shared, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
            <add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
            <add assembly="CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
            <add assembly="CrystalDecisions.Enterprise.InfoStore, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
            <add assembly="CrystalDecisions.Enterprise.Framework, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
            <add assembly="CrystalDecisions.ReportSource, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
            <add assembly="CrystalDecisions.CrystalReports.Engine, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
          </assemblies>
      </system.web>
      <system.webServer>
         <handlers>
             <add name="CrystalImageHandler.aspx_GET" verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" preCondition="integratedMode" />
         </handlers>
      </system.webServer>
    </configuration>
    Sample Code:
    Report = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
    Report.Load(Server.MapPath(strReportPath));
    Report.SetDataSource(dsReport);
    Creportviewer.ReportSource = Report;
    For exporting the report to PDF
    string Filename = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.InternetCache).ToString(), Guid.NewGuid().ToString() + ".pdf");
    Report.ExportToDisk(ExportFormatType.PortableDocFormat, Filename);
    Clean Up Code: (Page_UnLoad event)
    if (Report != null)
         Report.Close();
         Report.Dispose();
    Creportviewer.ReportSource = null;
    Creportviewer.Dispose();
    dsReport = null;
    GC.Collect();
    GC.WaitForPendingFinalizers();
    Can someone help me resolve the issue.

    The .rpt file size is 14MB with the Data Save option enabled, 12MB without Data Save.  Presumably the 12MB file size is because of the 24bit PNG we have as our background.
    The Designer executes the report in less than a second and we can scroll through all pages and see the image fields perfectly.
    When we Export to PDF, the Designer takes a long time, eventually gets to the 77%, the 7th record and returns "Export report failed" followed by "Memory full".  If we export only page 1 of the 3 pages, it also returns a Memory full error.  However, when the same report is run with only 1 page, that page exports to PDF but with a ridiculously large size and export time.
    The machine has 2GB of physical memory with an 8GB pagefile with Windows 2003 (latest everything).  The process runs up to about 1GB before reporting the memory full error.
    We've also tried a variety of other suggestions posted in the other thread with no success.
    We're happy to provide the RPT file to the Report Team to diagnose the problem.  Ultimately, we need to be able to produce a 15 page report with approximately 45 images.
    Our preferred scenario is fixing problem 2.  The CR Designer seems quite capable of rendering our report and printing it to our third party PDF printer in a timely manner with small size.  However, the API reports memory full.
    The API resides in a dedicated reporting web service with NO other code except for loading the report, setting parameters and printing.  When executing, it uses up to about 1.1GB before reporting the error.
    Are there any other suggestions for fixing what we have?  Are there known problems with large images in reports?  Do we need to lodge a formal support request?
    Regards,  Grant.
    PS.  Grr and my message formatting is lost when I edited this message!!!
    There is a 1500 character limit and then all formatting is removed to save space. Break you posts into separate entries.
    Edited by: grantph on Sep 30, 2009 2:49 AM

  • How to export subreports along with main reports in crystal reports 2008

    Hi
    I am having serious issues in Crystal Reports 2008. While I was trying to export one of my reports(having 3 subreports) in to a pdf file,well only the main report data is getting exported.
    My subreports are  ON DEMAND SUBREPORTS.
    Kindly help me in resolving this issue.
    Thanks in advance
    Sam_dwh

    Thanks Debi for your answer.
    Well now I am thinking of publishing the reports which I have generated ,so that client need not have to install crystal reports individually in their computers.But I don't have BO portal as such for publishing.
    What will I do?

  • Font style issue with exporting report in Crystal Reports 2008

    Hi,
    I got stuck on the below issue for a while. Please can anyone help on this?
    When I designed and executed a report in Crystal Reports 2008 on my local PC, the font style and size used in charts were exactly what I was expecting.
    However, after I exported the report to our BusinessObjects CMC and displayed it in InfoView, the font style and size in charts looked quite different from what they were in CrystalReports.
    Any ideas of how to fix this issue?
    Thanks!
    BAI

    Hi Nanda Kishore,
    This is because you do not have proper rights on Business View Manager.  Whenever you create a dynamic parameter in crystal and try to save the report on BO, it creates a Business view automatically.  Now in your case, it is unable to create a business view due to insufficient rights.
    Go in Business View Manager u2013 Repository exploreru2014You will find Dynamic Cascading Prompts folderu2014Right click on that and go in rights and add your user information and give full rights.
    Also make sure that your BO and CR designer on same version and patch level.
    Thanks,
    Sastry

  • Failed to export the report in Crystal Reports 2008

    I am using Crystal Reports 2008 version 12.1.0.892, when i try to export data to Microsoft Excel(Data Only) it's failing with the error "Failed to export the report.", please help in resolving this issue.

    Hi Abhilash,
    I tried suppressing the report header and page header it was working fine, but previously i used to export with all the headers. Without page headers the output file is of no use. I was facing the same issue on one of the local desktops too then i uninstalled the software and installed it again then it was working fine but its not the solution.
    -Srikar

Maybe you are looking for

  • E90 Using Nokia Maps without using Data from mobil...

    Is it possible to use the integrated GPS in the E90 with Nokia Maps WITHOUT connecting through mobile data and incurring data cost? Is there any other 3rd party GPS navigation software that would work like Nokia Maps, using stored maps et al, so you

  • How to fix column width in a report

    Hi all, i have to set the width of a column of a report of mine fixed and to have text wrapping inside of it. i would prefer to avoid to modify the theme (that might involve other item) and i wanna work just on that report. i've tried to create a new

  • Log file size in Sun Directory Server

    Does anyone have an idea about the how the Sun Directory Server's log file size will increase in size with respective to the actions performed? Can someone give a data regarding this? If someone has a better scenario and the supportive data w.r.t log

  • Where to place .ini file?

    Hello All, I have a file "trap.ini" now where i should this file so that properties.load(new FileInputStream("trap.ini")); should be able to read it. m i making any mistake?

  • Set A Message Respond via WF API

    Hi, In  E-Business Suite R12 we are asked to develop an ADF application where users can manage all notifications through WebCenter portal without navigating to EBS Notification pages so without leaving portal, users will be able to manage all their n