Export Report to PDF after user has entered parameters

Hi All,
I have a problem exporting a report to PDF using "ReportExportControl" after a user has entered parameters, instead of showing the download prompt, it displays the report using the parameters as if it was using "CrystalReportViewer"
If I program the input fields using "ParameterFieldController" then the exporter works as expected.
Is there anything in particular needed in order to export a report with user inputted parameters?
Thanks in advance.
Michael

Hi Ted, thanks for your reply,
What I am seeing at the moment is as follows
The report requires parameters from the user in order to generate the report, and a webpage asking the user to inputs is shown, the same one that is shown by "CrystalReportViewer" function, once the user has inputted the parameters they click the "OK" button and the report generates on screen, using the parameters entered, behaving like "CrystalReportViewer" function, what I need is once the user click "OK" it will prompt for download as attachment, which is not happening.
For your suggestion, I already have that coded and its still not working, Please find my code attached
// Create a exporter object
ReportExportControl exportControl = new ReportExportControl();
exportControl.setReportSource(clientDoc.getReportSource());
// Exporter Options
ExportOptions exportOptions = new ExportOptions();
exportControl.setExportOptions(exportOptions);
exportControl.setExportAsAttachment(true);
exportOptions.setExportFormatType(ReportExportFormat.PDF);
// Process the http request to export the report
exportControl.processHttpRequest(request, response, getServletConfig().getServletContext(), null);
// Dispose of the exporter object
exportControl.dispose();
with the above code the report will display on screen, but if i include this before the code
//Use the ParameterFieldController to pass parameter values to the report
ParameterFieldController paramController;
paramController = clientDoc.getDataDefController().getParameterFieldController();
paramController.setCurrentValue("", "Parameter name", Val);
the report doesnt show the input screen and generates as attachment
Hope this makes my situation abit clearer
Thanks and regards
Michael

Similar Messages

  • IllegalArgumentException error while exporting report in PDF format

    Hi all,
    we are using Crystal Report 2008, Java 1.5.22 and JRC 11.8.4.1094 to export reports in pdf format within java.
    It is working fine for all reports except for a specific report where it gives IllegalArgumentException while exporting the PDF.
    Below the error occurred:
    12:39:16,875 ERROR [c] Disk Exporter: no output file was created by an exporter
    12:39:16,875 ERROR <b> PdfExporter: caught Exception in PDFFormatter.finalizeFormatJob (from destination?); aborting export
    java.lang.IllegalArgumentException
         at com.crystaldecisions.reports.exporters.destination.disk.c.a(Unknown Source)
         at com.crystaldecisions.reports.exporters.format.page.pdf.b.a(Unknown Source)
         at com.crystaldecisions.reports.a.e.if(Unknown Source)
         at com.crystaldecisions.reports.formatter.a.c.if(Unknown Source)
         at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
         at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.export(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource.export(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.NonDCPAdvancedReportSource.export(Unknown Source)
         at com.crystaldecisions.reports.reportengineinterface.JPEReportSource.export(Unknown Source)
         at com.crystaldecisions.report.web.event.br.a(Unknown Source)
         at com.crystaldecisions.report.web.event.w.a(Unknown Source)
         at com.crystaldecisions.report.web.event.b7.broadcast(Unknown Source)
         at com.crystaldecisions.report.web.event.av.a(Unknown Source)
         at com.crystaldecisions.report.web.WorkflowController.do(Unknown Source)
         at com.crystaldecisions.report.web.WorkflowController.doLifecycle(Unknown Source)
         at com.crystaldecisions.report.web.ServerControl.a(Unknown Source)
         at com.crystaldecisions.report.web.viewer.ReportExportControl.a(Unknown Source)
         at com.crystaldecisions.report.web.ServerControl.getHtmlContent(Unknown Source)
    12:39:16,875 INFO  [c] Disk Exporter: finalizing export to destination
    12:39:16,875 ERROR [JRCCommunicationAdapter] Failed to export report
    com.crystaldecisions.reports.exporters.format.page.pdf.a.a: Unknown exception is thrown
         at com.crystaldecisions.reports.exporters.format.page.pdf.b.a(Unknown Source)
         at com.crystaldecisions.reports.a.e.if(Unknown Source)
         at com.crystaldecisions.reports.formatter.a.c.if(Unknown Source)
         at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
         at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.export(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource.export(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.NonDCPAdvancedReportSource.export(Unknown Source)
         at com.crystaldecisions.reports.reportengineinterface.JPEReportSource.export(Unknown Source)
         at com.crystaldecisions.report.web.event.br.a(Unknown Source)
         at com.crystaldecisions.report.web.event.w.a(Unknown Source)
         at com.crystaldecisions.report.web.event.b7.broadcast(Unknown Source)
         at com.crystaldecisions.report.web.event.av.a(Unknown Source)
         at com.crystaldecisions.report.web.WorkflowController.do(Unknown Source)
         at com.crystaldecisions.report.web.WorkflowController.doLifecycle(Unknown Source)
         at com.crystaldecisions.report.web.ServerControl.a(Unknown Source)
         at com.crystaldecisions.report.web.viewer.ReportExportControl.a(Unknown Source)
         at com.crystaldecisions.report.web.ServerControl.getHtmlContent(Unknown Source)
    Caused by: java.lang.IllegalArgumentException
         at com.crystaldecisions.reports.exporters.destination.disk.c.a(Unknown Source)
         ... 56 more
    Have an idea?
    Thanks

    Hello Andrea.
    I searched through the SAP Notes for the error that you are encountering.  There is an SAP Note that exists titled the following:
    1332907 - Report being exported to PDF format using the Crystal Reports for Eclipse 1.x runtime, errors with the exception: PdfExporter: caught Exception in PDFFormatter.finalizeFormatJob
    Since you may not have access to the SAP Notes, I will extract the details that are mentioned in the note here:
    =============================================
    Symptom
    Attempting to export a report to Adobe PDF format using the Crystal Reports for Eclipse 1.x runtime results in an exception.
    The exception indicates "PdfExporter: caught Exception in PDFFormatter.finalizeFormatJob"
    Environment
    Windows 2003
    Apache Tomcat 5.0
    Crystal Reports for Eclipse version 1.x
    Reproducing the Issue
    Using the Crystal Reports for Eclipse runtime version 1.x attempt to export a report to PDF format that has the "Repeat Group Header on Each Page" option enabled.
    Note: This does not occur if this option is enabled in a subreport.
    Cause
    When the "Repeat Group Header on Each Page" is enabled for a group in a main report the Crystal Reports for Eclipse 1.x runtime is unable to correclty format the PDF document which results in an exception.
    Resolution
    Updating the application to use Crystal Reports for Eclipse version 2.x runtime will resolve the issue.
    The most recent updates to the Crystal Reports for Eclipse runtime can be freely downloaded from the SAP SDN Website. 
    http://www.sdn.sap.com/irj/boc/crystalreports-java
    =============================================
    Since you are on JRC 11.8.4.1094 which is Crystal Reports for Eclipse 1.x, this may be the cause of your problem.
    I hope that this helps.
    Regards.
    - Robert

  • Unable to export reports to PDF in BI portal.

    Hello All,
    I am facing problem when trying to export reports to PDF in BI portal. It gives the error message "Error while generating the PDF".
    ADS BI export library is enabled in R/3 as suggested in SNOTE 1836587 and 944221.
    I have replicated the issue in the development portal, the export to PDF functionality is working fine for few user ID's. i checked the authorisation trace for the user ID's facing the issue, but no error was found in the trace.
    This is the detailed error message. Please suggest on this.
    Log ID:
    C0000A0C0502004A0000000300002023
    Initial cause
    Message: PDFDocument Processor failed to process GetColumnDataRequest Due to
    the following Reason
    can't parse argument number urn: AdobeDocumentServicesWsd/AdobeDocumentServicesVi/document
    Stack trace:
    com.sap.tc.adobe.pdfdocument.base.core.PDFDocumentRuntimeException: PDFDocument
    Processor failed to process GetColumnDataRequest Due to the following Reason
    can't parse argument number
    urn:AdobeDocumentServicesWsd/AdobeDocumentServicesVi/document
    at
    com.sap.tc.adobe.pdfdocument.base.core.PDFDocumentProcessor.process(PDFDocumentProcessor.java:55)
    at com.sap.tc.adobe.pdfdocument.base.core.PDFDocumentColumnDataContext.execute(PDFDocumentColumnDataContext.java:70)
    at
    com.sap.tc.adobe.pdfdocument.sapinternal.impl.PDFColumnDataContextImpl.execute(PDFColumnDataContextImpl.java:22)
    at
    com.sap.ip.bi.export.xfa.impl.Document.writeWidthsAsXmlToStream(Document.java:362)
    at
    com.sap.ip.bi.export.xfa.widthcalc.WidthCalculator.<init>(WidthCalculator.java:55)
    at com.sap.ip.bi.export.xfa.impl.SizeCalculator.calc(SizeCalculator.java:103)
    at
    com.sap.ip.bi.export.impl.ExportController.calculateAndSetSizes(ExportController.java:158)
    at
    com.sap.ip.bi.export.impl.ExportController.doExportPrep(ExportController.java:503)
    at
    com.sap.ip.bi.export.impl.ExportController.convert(ExportController.java:336)
    at
    com.sap.ip.bi.export.controller.ExportResult.createExport(ExportResult.java:68)
    at
    com.sap.ip.bi.webapplications.pageexport.impl.PageExportRenderingRootNode.createPDF(PageExportRenderingRootNode.java:556)
    at
    com.sap.ip.bi.webapplications.pageexport.impl.PageExportRenderingRootNode.doExport(PageExportRenderingRootNode.java:142)
    at com.sap.ip.bi.webapplications.pageexport.impl.PageExportRenderingRootNode.processRendering(PageExportRenderingRootNode.java:389)
    at
    com.sap.ip.bi.webapplications.pageexport.impl.PageExportRenderingRootNode.processSnippetRendering(PageExportRenderingRootNode.java:274)
    at
    com.sap.ip.bi.webapplications.runtime.impl.page.Page.buildRenderingTree(Page.java:1329)
    at
    com.sap.ip.bi.webapplications.runtime.impl.page.Page.processRenderingRootNode(Page.java:4938)
    at com.sap.ip.bi.webapplications.runtime.impl.page.Page.processRendering(Page.java:4904)
    at
    com.sap.ip.bi.webapplications.runtime.impl.page.Page.doProcessRequest(Page.java:2803)
    at
    com.sap.ip.bi.webapplications.runtime.impl.page.Page._processRequest(Page.java:744)
    at com.sap.ip.bi.webapplications.runtime.impl.page.Page.processRequest(Page.java:4960)
    at
    com.sap.ip.bi.webapplications.runtime.impl.page.Page.processRequest(Page.java:4953)
    at
    com.sap.ip.bi.webapplications.runtime.impl.controller.Controller.doProcessRequest(Controller.java:1234)
    at com.sap.ip.bi.webapplications.runtime.impl.controller.Controller._processRequest(Controller.java:1083)
    at
    com.sap.ip.bi.webapplications.runtime.impl.controller.Controller.processRequest(Controller.java:1049)
    at com.sap.ip.bi.webapplications.runtime.impl.controller.Controller.processRequest(Controller.java:72)
    at
    com.sap.ip.bi.webapplications.runtime.jsp.portal.services.BIRuntimeService._handleRequest(BIRuntimeService.java:462)
    at
    com.sap.ip.bi.webapplications.runtime.jsp.portal.services.BIRuntimeService.handleRequest(BIRuntimeService.java:365)
    at
    com.sap.ip.bi.webapplications.runtime.jsp.portal.components.LauncherComponent.doContent(LauncherComponent.java:26)
    at
    com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:213)
    at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:129)
    at
    com.sap.portal.prt.core.RequestDispatcherFactory$PortalComponentRequestDispatcher$5.service(RequestDispatcherFactory.java:308)
    at com.sap.engine.services.servlets_jsp.server.deploy.impl.module.IRequestDispatcherImpl.dispatch(IRequestDispatcherImpl.java:270)
    at
    com.sap.portal.prt.core.RequestDispatcherFactory$PortalComponentRequestDispatcher.service(RequestDispatcherFactory.java:298)
    at com.sap.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:229)
    at
    com.sap.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:107)
    at
    com.sap.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:141)
    at
    com.sap.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:206)
    at com.sap.portal.prt.pom.PortalNode.service(PortalNode.java:588)
    at
    com.sap.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:233)
    at
    com.sap.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:107)
    at
    com.sap.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:141)
    at com.sap.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:520)
    at
    com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:201)
    at
    com.sap.portal.prt.dispatcher.DispatcherServlet.service(DispatcherServlet.java:132)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
    at
    com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.runServlet(FilterChainImpl.java:202)
    at
    com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:103)
    at com.sap.portal.http.EnrichNavRequestFilter.doFilter(EnrichNavRequestFilter.java:49)
    at
    com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:79)
    at com.sap.portal.prt.dispatcher.CustomHeaderFilter.doFilter(CustomHeaderFilter.java:58)
    at
    com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:79)
    at
    com.sap.portal.http.EnrichNavRequestFilter.doFilter(EnrichNavRequestFilter.java:49)
    at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:79)
    at
    com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:432)
    at
    com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:210)
    at
    com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:441)
    at
    com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:430)
    at com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:38)
    at
    com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at
    com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:81)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at
    com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:278)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at
    com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:81)
    at
    com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at
    com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
    at
    com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at
    com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
    at
    com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at
    com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
    at
    com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at
    com.sap.engine.services.httpserver.filters.SessionSizeFilter.process(SessionSizeFilter.java:26)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at
    com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at
    com.sap.engine.services.httpserver.filters.MemoryStatisticFilter.process(MemoryStatisticFilter.java:57)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at
    com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at
    com.sap.engine.services.httpserver.filters.DSRHttpFilter.process(DSRHttpFilter.java:43)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at
    com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at
    com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:475)
    at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.process(Processor.java:269)
    at
    com.sap.engine.services.httpserver.server.rcm.RequestProcessorThread.run(RequestProcessorThread.java:56)
    at com.sap.engine.core.thread.execution.Executable.run(Executable.java:122)
    at com.sap.engine.core.thread.execution.Executable.run(Executable.java:101)
    at
    com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:328)
    Caused by: java.lang.IllegalArgumentException: can't parse argument number urn:AdobeDocumentServicesWsd/AdobeDocumentServicesVi/document
    at java.text.MessageFormat.makeFormat(MessageFormat.java:1339)
    at java.text.MessageFormat.applyPattern(MessageFormat.java:458)
    at java.text.MessageFormat.<init>(MessageFormat.java:350)
    at java.text.MessageFormat.format(MessageFormat.java:811)
    at
    com.sap.tc.adobe.pdfobject.base.core.PDFObjectRuntimeException$DummyLocalizableTextFormatter.<init>(PDFObjectRuntimeException.java:43)
    at com.sap.tc.adobe.pdfobject.base.core.PDFObjectRuntimeException.<init>(PDFObjectRuntimeException.java:26)
    at
    com.sap.tc.adobe.pdfobject.base.core.PDFObjectDII.invoke(PDFObjectDII.java:393)
    at
    com.sap.tc.adobe.pdfobject.base.core.PDFObjectDII.doSoapCall(PDFObjectDII.java:91)
    at com.sap.tc.adobe.pdfobject.base.core.PDFObject.execute(PDFObject.java:194)
    at
    com.sap.tc.adobe.pdfdocument.base.core.PDFDocumentColumnDataHandler.handle(PDFDocumentColumnDataHandler.java:93)
    at
    com.sap.tc.adobe.pdfdocument.base.core.PDFDocumentProcessor.process(PDFDocumentProcessor.java:52)
    ... 89 more
    [email protected]

    Hi Gaurav,
    Check if the URL in the ConfigPort_Document SOA destination is correct. Also, check if the os_libs directory under the /usr/sap/SID/JXX/j2ee directory. If it does, then stop the SAP system, rename the os_libs directory, and restart the system.
    Try generating a PDF report.
    Cheers!
    Hemanth

  • Exporting Report to PDF in Landscape

    Hello All,
    After my Hyperion report finished, I exported the result into PDF. Due to having too many rows, HTML and Excel are not viable options. After the export finished writing to a PDF file, I checked the report and realized that unless I find a way to save the result in a Landscape mode, each page of the report will be broken into two pages. Does anyone know how to export reports in PDF format in a Landscape mode?
    Thank you,
    Seyed

    Hello Ameuras,
    Thank you for your help. I was able to use the information in your response and then save the PDF report in a Landscape format. However, this still prints each row on two pages. Next, I will try your other suggestion to see if using 'Scale To Fit' would solve this problem.
    Thanks again,
    Seyed

  • Cisco ISE Failure: 24408 User authentication against Active Directory failed since user has entered the wrong password

    Hi,
    Since we implemented Cisco ISE we receive the following failure on several Notebooks:
    Authentication failed : 24408 User authentication against Active Directory failed since user has entered the wrong password
    This happens 2 or 3 times per Day. So basically the authentications are working. But when the failure appears, the connection is lost for a short time.
    The Clients are using PEAP(EAP-MSCHAPv2) for Authentication. We've got a Cisco Wireless Environment (WLC 5508).
    Why is this happening?
    Thanks,
    Marc

    The possible causes of this error message are:
    1.] If the end user entered an incorrect username.
    2.] The shared sceret between WLC and ISE is mismatched. With this we'll see continous failed authentication.
    3.] As long as a PSN not receiving a response from the supplicant within this limit during an EAP conversation, it will throw this error code. In majority of cases it says eap session timed out.
    In your cases, the 3rd option seems to be the most closest one.
    Jatin Katyal
    - Do rate helpful posts -

  • I have adobe acrobat  pro xi and im doing encrypting end same pdf after encrypt has damege

    i have adobe acrobat  pro xi and im doing encrypting end same pdf after encrypt has damege / i re install the adobe acrobat but it's not help / i up date to and it's not help . what to do?

    th

  • Help me, I have a problem with font when export report to PDF?

    Hi everyone! Help me
    I have a problem with font when export report to PDF
    My report uses template .rtf with font Times New Roman (Unicode), language is VietNamese.
    when desige template no problem, error only happen when view report by PDF.
    Edited by: user10236405 on Oct 15, 2008 11:23 PM

    give it time to boot. the time depends on yr memory size n data. soon a process bar will appear indicating the boot process. if still this doesnt work. try formating the phone. but this ways u lose all data on the phone (unless u backed it). relax! the data on the memory card is safe.

  • Compare all values that user has enter or not.

    Hi experts and abap lovers!!!
    I like to CHECK THAT ALL FIELDS WHEATER THE USER HAS ENTERED OR NOT. IF YES I HAVE TO INSERT THE VALUES IN THE TABLE..
    For eg.
    IF ZTABLENAME-FIELD1 <> '0'  AND ZTABLENAME-FIELD2 <> '0' AND ZTABLENAME-FIELD3 <> '0'.
    INSERT ZTABLENAME.
    ELSE.
    MESSAGE 'FILL IN ALL REQUIRED FIELDS' TYPE 'E'.
    END IF.
    Am searching answer for long time. above mentioned when i execute it says
    RELATIONAL OPERATOR  AND IS NOT USED.
    Kindly help me out in this regard.

    HI,
    Instead of comparing with 0 check with Initial value
    IF NOT ZTABLENAME-FIELD1 IS INITIAL AND
        NOT ZTABLENAME-FIELD2 IS INITIAL AND
        NOT  ZTABLENAME-FIELD3 IS INITIAL .
    INSERT ZTABLENAME.
    ELSE.
    MESSAGE 'FILL IN ALL REQUIRED FIELDS' TYPE 'E'.
    END IF.
    As per your code your missing relational operator
    IF ZTABLENAME-FIELD1 NE '0' AND
       ZTABLENAME-FIELD2 NE '0' AND
       ZTABLENAME-FIELD3 NE '0'
    INSERT ZTABLENAME.
    ELSE.
    MESSAGE 'FILL IN ALL REQUIRED FIELDS' TYPE 'E'.
    END IF.

  • SSRS should directly upload my report to PDF after taking parameters from user

    Hi
    I have a client requirement where 6 paramaters are declared in a report. And these parameters are explicitly entered by user who accesses the report. After entering parameters user clicks on "View Report".
    Requirement is "View Report" should directly export the report to PDF. Instead of showing it in default viewer.
    Some one please help.
    It is very critical and urgent requirement which I should complete.
    Thanks in Advance!!

    Ok, then I hope only by using the SSRS tool we can't redirect as per your requirement. Once it is rendering only we can export to few formats.
    Alternatively you can try Data Driven Subscriptions. It can directly send the PDF's. Even there is having some limitations. If your requirement is suitable within those limitations then u can use right ?
    Try it! .... All the best
    Sridhar

  • Error in exporting data to any format after user has cancelled the request

    Hi all
    I have a scenario with crystal report when open from SAP B1 for which I need your expertise guidance.
    The situation is as follows.
    After I enter parameters to a report, its opens up. When I export the data to pdf, the data is correct.
    Now, I press the refresh button on the report. Now the parameter screen opens up but I dont change any values, and press CANCEL.
    If I export my report (which has been open since the first time I opened from SAP screen), the data exported is different (The data shown on report is different).
    After running the SQL profiler, I observed that the crystal report is actually executing the procedure with NULL PARAMETERS when I CANCEL and export the data though the parameters passed to the already open report is different.
    Any inputs to solve the above problem is really appreciated.
    Environment----
    SAP B1 version 2005B, patch 41
    Crystal report version 9
    VB 6
    Thanks
    Rashmi

    Please note;
    This forum is dedicated to topics related to custom application development or deployment with Crystal Reports in .Net. This includes full versions of Crystal Reports as well as those versions of Crystal Reports bundled with Microsoft Visual Studio .Net.
    As you do not appear to be using Crystal Reports, please repost to a correct forum.
    Ludek

  • Problem to export a report (to PDF) after converting my reports to CR13

    I have an old project with reports developped using Crystal Reports for Visual Studio 2003 (.NET 1.1). I want to convert them so I can now use Crystal Reports for Visual Studio 2010 (with .NET 3.5).
    I installed Crystal Reports for VS2010 and I converted my reports to the new format. Unfortunately, one of my reports is not working anymore.
    My ASP.NET application generate the report and export it as a PDF. I use CrystalDecisions.CrystalReports.Engine.ReportDocument.Export().
    Everytime I run this method, an exception is thrown...
    System.Exception was unhandled by user code
      Message=System.Runtime.InteropServices.COMException (0x80041004):
    Mémoire insuffisante pour l'opération.
       à CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
       à CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
       à CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
       à CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext)
       à CrystalDecisions.CrystalReports.Engine.FormatEngine.Export()
       à CrystalDecisions.CrystalReports.Engine.ReportDocument.Export()
       à
      Source=GSPRapport
      StackTrace:
    I also tried to export the report (using PDF format) at design time with the "Export Report" button in Preview mode. It didn't work. But, I can export the report at design time using another format type (like XML).
    The old version of te report (using .NET 1.1, CR9) work fine. As I said, other reports in that same project work perfectly.
    Is someone have an idea of what's wrong!
    Thanks!
    Max.

    The most common cause of this problem is having very large detailed images, or lots and lots of images in your report. The Crystal Report engine changed a lot from 9.1 to 13. The big change was from 9.1 to 10 though when we started using the RAS InProc engine.
    The Crystal reporting engine is not efficient at handling the images and it can cause memory issues like you are seeing. As a test, try suppressing the images that show up frequently in your report and retry your export. If it works you'll have your answer and you'll need a new creative way to design your report without so many images.

  • "Memory full." error while exporting report to PDF format - CR2008SP2

    <br>
    Hello,<br>
    <br>
    I am developing a C#.NET application that uses the CR2008 SP2 .NET libraries. This application performs some database updates and uses CR2008 SP2 to run 7 different reports and export the results to PDF files. This application is a console application that only uses Crystal to export the rendered reports - it does not use previews or printing.<br>
    <br>
    The specific pattern of this application is as follows:<br>
    <br>
    - perform some database updates<br>
    - render report #1 and export it as a PDF file<br>
    - perform some database updates<br>
    - render report #2 and export it as a PDF file<br>
    ... pattern repeats to report #7 ...<br>
    <br>
    This application works fine as long as I run only one instance of it at a time. The problem occurs when I try to run multiple instances of this application at the same time. When I run multiple instances of this application at the same time (against totally different databases) each instance will start up happily and begin running through the process described above. After a few moments one or more instances will fail during the report export. The specific error is as follows:<br>
    <br>
    "Memory full. Failed to export the report. Not enough memory for operation."<br>
    <br>
    The error always comes from the call to:<br>
    <br>
    CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToDisk(Format, FileName)<br>
    <br>
    I have watched the memory consumption of these instances of my application while they are running. They never seem to exceed approximately 52MB each. At this time task manager reports over 1GB of physical memory free. These numbers lead me to believe that memory is not actually "full".<br>
    <br>
    Here are some specifics about the environment:<br>
    <br>
    Dell Vostro 1720 / P8600 / 4GB<br>
    Windows 7 Ultimate x64<br>
    SQL Server 2008 SP1 x64<br>
    Crystal Reports 2008 SP2<br>
    <br>
    Specifics about the C# application:<br>
    <br>
    IDE: Visual Studio 2008 SP1<br>
    Type: Console Application<br>
    Target platform: x86<br>
    .NET Framework: 3.5 SP1<br>
    Crystal References:<br>
    - CrystalDecisions.CrystalReports.Engine (v12.0.2000.0)<br>
    - CrystalDecisions.Shared (v12.0.2000.0)<br>
    <br>
    Specifics about the report templates:<br>
    <br>
    The report templates are RPT files saved from CR2008 SP2. They are relatively simple. A few of them (maybe 3) contain a single subreport.<br>
    <br>
    Specifics about the database:<br>
    <br>
    Each database is approximately 1GB in size. The database contains many tables but the reports only access a handful of tables. Each table that the reports access have maybe a few hundred rows tops. Most have less than 100. Likewise, when the reports perform their selections the resulting rowset for the reports is anywhere from about 20 records to a few hundred records tops.<br>
    <br>
    A few items to note:<br>
    <br>
    - Multiple instances of my application need to be able to run on a single machine at the same time. It is a specific design requirement.<br>
    - My application works fine as long as I run only one instance of it at a time.<br>
    - My application works fine when I run multiple instances if I comment out the Crystal part of it.<br>
    - My application works fine when I run multiple instances if I change the export format from PDF to HTML32 or HTML40 (have not tried any others)<br>
    - The machine has over 1GB of physical memory free when this error occurs.<br>
    - I have taken steps to ensure that I am properly disposing of my CrystalDecisions.CrystalReports.Engine.ReportDocument instance just after each export is complete. I have tried to use the "using" keyword, as well as explicitly setting the instance to null and calling the .NET framework garbage collector. This did not seem to help.<br>
    <br>
    Any assistance with this issue would be greatly appreciated.<br>
    <br>
    Steve<br>
    <br>
    Edited by: scbraddy on Mar 11, 2010 1:53 AM

    <br>
    Jonathan & Ludek,<br>
    <br>
    Thanks for the timely response and good suggestions guys!<br>
    <br>
    I have performed a few more tests today in order to help answer some of your questions.<br>
    <br>
    Below are my responses. Some of them are answers to questions and some of them are observations based on tests I have performed today.<br>
    <br>
    - The database system is SQL Server 2008 SP1 Developer Edition x64.<br>
    <br>
    - The C# application connects to the database using the native .NET SQL client (System.Data.Sql).<br>
    <br>
    - During runtime I connect the report to the database by looping through the ReportDocument.Database.Tables collection. For each Table found I create a CrystalDecisions.Shared.TableLogOnInfo instance, fill in the table name, server name, database name, user ID, and password, and use Table.ApplyLogOnInfo() to apply it. I do the same thing for the subreports collection if there are any. Like I said, about half of the reports contain a single subreport.<br>
    <br>
    - The report templates are currently set to use the "SQLOLEDB" Provider. The Database Type is set to "OLE DB (ADO)". I am not entirely sure what you mean by trying a different database driver. I assume you mean to change the provider? If so, given the fact that we are using SQL Server 2008, what would I change it to?<br>
    <br>
    - If I do not perform the database updates during application runtime (instead, perform them ahead of time and then allow the application to only render the reports) then I still have the same problem. Nothing changes.<br>
    <br>
    - I installed the Fix Pack 2.5, rebooted, and tried again. Same problem.<br>
    <br>
    - I do not beleive that I am using XML transforms. How would I know?<br>
    <br>
    - Regarding fragmented memory: It is hard for me to believe that, given the amount of memory free on the machine once all processes are up and running (1GB+), and the size of the processes (~50MB), that a contiguous block could not be found. Maybe there is some Crystal process that is attempting to balloon out of control, but as far as I can tell my application is not getting very big. I will not rule this out of course because I don't know for sure.<br>
    <br>
    - Regarding killing the process once a report is rendered: The problem with this is that the application needs to perform these 7 groups of updates and render these 7 reports in a specific sequence all as part of one complete "pass". Also, this application needs to be able to be able to handle a scneario where one or more instance of the application is started on a single machine at roughly the same time (pointed at different databases). The application actually does work fine in this regard (staying well within the capabilities of my 4GB laptop even when 8 of them are running) except that I always get the same error when I choose PDF as my export format.<br>
    <br>
    - I ran a test today where I changed the export format to HTML40 and started 8 instances of the application at the same time, each working from a different copy of the database. The instances ran a little slow but did complete in good time with no errors. Please note that changing the export format to PDF will cause the application to fail with the "memory full" error if even only 2 instances are running at the same time. The only way I can successfully complete a run with the export format set to PDF is to run only 1 instance at a time. I can run it over and over all day long and it will not fail, as long as only 1 instance is running at a given time. As of yesterday I had only proven that the application would complete when using the HTML40 export format when 2 or 4 instances are running, but today I doubled it again (to 8) and still no failure while using HTML40. This is possibly the most interesting fact about this problem, and is another reason why I am skeptical that memory fragmentation is the culprit.<br>
    <br>
    We would like to solve this problem because we would like to continue to target the PDF format. It is the standard report export format for our applications. If we cannot solve this problem we may call a meeting and decide whether to proceed with the HTML40 export format, or possibly dump Crystal from this project altogether.<br>
    <br>
    Thanks again for your interest in our problem and your timely and helpful responses. I'm really not sure where to go next ... maybe change the database provider in the templates? I will need some specific advice in this area because I'm not sure what to do. Any more ideas you guys have will be greatly appreciated on this end!<br>
    <br>
    Steve<br>
    <br>
    Edited by: scbraddy on Mar 12, 2010 2:18 AM

  • How to regenerate additional rows after user clicks enter?

    Hi all,
              I am outputing the data through internal table(contains two fields 'Country' and 'Test')using ALV Classes.
    My requirement is user can add another row.And
    after appending another row user will enter country(say India) against the country
    field and clicks enter.Then the program has to fetch all the tests(say 'test1' and 'test2'  are there
    for India) described for India from the database table and refresh the screen
    with this additonal 2 rows(India, Test1 and India,Test2).
    Can anyone please let me know how to do it?Remember I am using ALV Classes.
    Thanks,
    Balaji.

    Hello Balaji
    I would use a simplified approach by storing the PBO output before displaying the editable ALV list. As soon as the user wants to save the data (enter 'SAVE' in command window) the report compares the PBO data with the current PAI data.
    To see the effect simply add a single row as previously described (resulting in three new rows) and delete two other rows. Inserted and deleted rows will be displayed afterwards.
    *& Report  ZUS_SDN_ALVGRID_EDITABLE_7
    REPORT  zus_sdn_alvgrid_editable_7.
    TYPE-POOLS: abap.
    INCLUDE <icon>.  " NOTE: replace by TYPE-POOLS: icon. on >= 6.20
    DATA:
      gd_repid         TYPE syrepid,
      gd_okcode        TYPE sy-ucomm,
      gs_layout        TYPE lvc_s_layo,
      gt_fcat          TYPE lvc_t_fcat,
      go_docking       TYPE REF TO cl_gui_docking_container,
      go_grid          TYPE REF TO cl_gui_alv_grid.
    TYPES: BEGIN OF ty_s_outtab.
    INCLUDE TYPE knb1.
    TYPES: END OF ty_s_outtab.
    TYPES: ty_t_outtab    TYPE STANDARD TABLE OF ty_s_outtab
                          WITH DEFAULT KEY.
    DATA:
      gt_outtab        TYPE ty_t_outtab,
      gt_outtab_pbo    TYPE ty_t_outtab.
    *       CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS:
          handle_data_changed
            FOR EVENT data_changed OF cl_gui_alv_grid
            IMPORTING
              er_data_changed
              e_onf4
              e_onf4_before
              e_onf4_after
              e_ucomm
              sender,
          handle_data_changed_finished
            FOR EVENT data_changed_finished OF cl_gui_alv_grid
            IMPORTING
              e_modified
              et_good_cells,
          handle_user_command
            FOR EVENT user_command OF cl_gui_alv_grid
            IMPORTING
              e_ucomm,
          handle_toolbar
            FOR EVENT toolbar OF cl_gui_alv_grid
            IMPORTING
              e_object
              e_interactive.
    ENDCLASS.                    "lcl_eventhandler DEFINITION
    *       CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
      METHOD handle_data_changed.
    *   define local data
    **    cl_gui_cfw=>set_new_ok_code( 'REFRESH' ). " not possible on 4.6c
        CALL METHOD cl_gui_cfw=>set_new_ok_code
          EXPORTING
            new_code = 'REFRESH'
    *      IMPORTING
    *        RC       =
      ENDMETHOD.                    "handle_data_changed
      METHOD handle_data_changed_finished.
    *   define local data
        DATA:
          ls_outtab      TYPE ty_s_outtab,
          ls_cell        TYPE lvc_s_modi.
      ENDMETHOD.                    "handle_data_changed_finished
      METHOD handle_user_command.
      ENDMETHOD.                    "handle_user_command
      METHOD handle_toolbar.
    *   define local data
        DATA:
          ls_button    TYPE stb_button.
        ls_button-function  = 'DEFAULT'.
        ls_button-icon      = icon_mass_change.
        ls_button-quickinfo = 'Set default value for column'.
        APPEND ls_button TO e_object->mt_toolbar.
      ENDMETHOD.                    "handle_toolbar
    ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
    START-OF-SELECTION.
      SELECT * FROM knb1 INTO TABLE gt_outtab UP TO 20 ROWS
        WHERE bukrs = '1000'.
      gt_outtab_pbo = gt_outtab.  " store PBO data
    * Create docking container
      CREATE OBJECT go_docking
        EXPORTING
          parent                      = cl_gui_container=>screen0
          ratio                       = 90
        EXCEPTIONS
          OTHERS                      = 6.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Create ALV grid
      CREATE OBJECT go_grid
        EXPORTING
          i_parent          = go_docking
        EXCEPTIONS
          OTHERS            = 5.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Build fieldcatalog
      PERFORM build_fieldcatalog.
      PERFORM set_layout.
      SET HANDLER:
        lcl_eventhandler=>handle_toolbar               FOR go_grid,
        lcl_eventhandler=>handle_data_changed          FOR go_grid,
        lcl_eventhandler=>handle_data_changed_finished FOR go_grid.
    * Display data
      CALL METHOD go_grid->set_table_for_first_display
        EXPORTING
          is_layout       = gs_layout
        CHANGING
          it_outtab       = gt_outtab
          it_fieldcatalog = gt_fcat
        EXCEPTIONS
          OTHERS          = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      go_grid->set_toolbar_interactive( ).
      CALL METHOD go_grid->register_edit_event
        EXPORTING
          i_event_id = cl_gui_alv_grid=>mc_evt_enter
        EXCEPTIONS
          error      = 1
          OTHERS     = 2.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Link the docking container to the target dynpro
      gd_repid = syst-repid.
      CALL METHOD go_docking->link
        EXPORTING
          repid                       = gd_repid
          dynnr                       = '0100'
    *      CONTAINER                   =
        EXCEPTIONS
          OTHERS                      = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * ok-code field = GD_OKCODE
      CALL SCREEN '0100'.
    * Flow logic (no elements on screen):
    *  PROCESS BEFORE OUTPUT.
    *    MODULE STATUS_0100.
    *  PROCESS AFTER INPUT.
    *    MODULE USER_COMMAND_0100.
    END-OF-SELECTION.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'STATUS_0100'.
    *  SET TITLEBAR 'xxx'.
      CALL METHOD go_grid->refresh_table_display
    *      EXPORTING
    *        IS_STABLE      =
    *        I_SOFT_REFRESH =
        EXCEPTIONS
          finished       = 1
          OTHERS         = 2.
      IF sy-subrc <> 0.
    *     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      TRANSLATE gd_okcode TO UPPER CASE.
    * Fetch changes on ALV grid
      go_grid->check_changed_data( ).
      CASE gd_okcode.
        WHEN 'BACK' OR
             'END'  OR
             'CANC'.
          SET SCREEN 0. LEAVE SCREEN.
        WHEN 'REFRESH'.
          PERFORM refresh_outtab.
        WHEN 'SAVE'.
          PERFORM save_data.
        WHEN OTHERS.
      ENDCASE.
      CLEAR: gd_okcode.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  BUILD_FIELDCATALOG_KNB1
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM build_fieldcatalog .
    * define local data
      DATA:
        ls_fcat        TYPE lvc_s_fcat.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
    *     I_BUFFER_ACTIVE              =
          i_structure_name             = 'KNB1'
    *     I_CLIENT_NEVER_DISPLAY       = 'X'
    *     I_BYPASSING_BUFFER           =
    *     I_INTERNAL_TABNAME           =
        CHANGING
          ct_fieldcat                  = gt_fcat
        EXCEPTIONS
          inconsistent_interface       = 1
          program_error                = 2
          OTHERS                       = 3.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      " Set required fields editable
      LOOP AT gt_fcat INTO ls_fcat
                      WHERE ( fieldname = 'ZUAWA'  OR
                              fieldname = 'BUSAB' ).
        ls_fcat-edit    = abap_true.
        MODIFY gt_fcat FROM ls_fcat.
      ENDLOOP.
      DELETE gt_fcat WHERE ( fieldname = 'ZINRT' ).
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  SET_LAYOUT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM set_layout .
      CLEAR: gs_layout.
      gs_layout-cwidth_opt = abap_true.
      gs_layout-zebra      = abap_true.
    **  gs_layout-stylefname = 'CELLTAB'.
    ENDFORM.                    " SET_LAYOUT
    *&      Form  REFRESH_OUTTAB
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM refresh_outtab .
    * define local data
      DATA:
        ld_idx       TYPE i,
        ls_outtab    TYPE ty_s_outtab,
        ls_tmp       TYPE ty_s_outtab,
        lt_tmp       TYPE ty_t_outtab.
      " Simulate selection of data depending on value of ZUAWA
      ls_tmp-zuawa = '003'.
      ls_tmp-busab = 'K1'.  APPEND ls_tmp TO lt_tmp.
      ls_tmp-busab = 'K2'.  APPEND ls_tmp TO lt_tmp.
      ls_tmp-busab = 'K3'.  APPEND ls_tmp TO lt_tmp.
      LOOP AT gt_outtab INTO ls_outtab
                        WHERE ( zuawa = '003'
                        AND     busab IS INITIAL ).
        ld_idx = syst-tabix.
        LOOP AT lt_tmp INTO ls_tmp.
          ls_outtab-busab = ls_tmp-busab.
          IF ( syst-tabix = 1 ).
            MODIFY gt_outtab FROM ls_outtab INDEX ld_idx.
          ELSE.
            APPEND ls_outtab TO gt_outtab.
          ENDIF.
        ENDLOOP.
      ENDLOOP.
    ENDFORM.                    " REFRESH_OUTTAB
    *&      Form  SAVE_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM save_data .
    * define local data
      DATA:
        ls_outtab    TYPE ty_s_outtab,
        ls_pbo       TYPE ty_s_outtab,
        lt_insert    TYPE ty_t_outtab,
        lt_delete    TYPE ty_t_outtab.
    " Compare PBO with PAI -> find deleted records
      LOOP AT gt_outtab_pbo INTO ls_pbo.
        READ TABLE gt_outtab INTO ls_outtab
             WITH KEY table_line = ls_pbo.
        IF ( syst-subrc NE 0 ).
          APPEND ls_outtab TO lt_delete.
        ENDIF.
      ENDLOOP.
    " Compare PAI with PBO data -> find new records
      LOOP AT gt_outtab INTO ls_outtab.
        READ TABLE gt_outtab_pbo INTO ls_pbo
             WITH KEY table_line = ls_outtab.
        IF ( syst-subrc NE 0 ).
          APPEND ls_outtab TO lt_insert.
        ENDIF.
      ENDLOOP.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
        EXPORTING
          i_structure_name = 'KNB1'
          i_grid_title     = 'New Records'
        TABLES
          t_outtab         = lt_insert
        EXCEPTIONS
          program_error    = 1
          OTHERS           = 2.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
        EXPORTING
          i_structure_name = 'KNB1'
          i_grid_title     = 'Deleted Records'
        TABLES
          t_outtab         = lt_delete
        EXCEPTIONS
          program_error    = 1
          OTHERS           = 2.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      gt_outtab_pbo = gt_outtab.  " do not forget !!!
    ENDFORM.                    " SAVE_DATA
    Regards
      Uwe

  • Exporting report to PDF error

    This code has worked for years, but now I'm getting the following error when programmatically exporting a report to PDF:
    "File does not begin with %PDF-"
    My environment info:
    Crystal Reports Developer XI Release 2 sp1
    VS 2005 - .NET 2.0
    IIS 6
    Few lines of code used to export:
    Response.ClearContent()
    Response.ClearHeaders()
    Response.ContentType = "application/pdf"
    ' Export the document to PDF
    oRpt.ExportToHttpResponse(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, Response, False, "")
    Response.Flush()
    Response.Close()
    One of the common answers that I've seen is uncheck the "display in browser" option in Acrobat, but that doesn't work and isn't really a viable solution anyway. I'm looking for a real permanent solution if one exists. TIA.
    Michael

    Hi folks, you're never gonna guess in a million years what the issue was. Yes, I finally found the problem. In my code where the db connection properties are set for the Crystal report document, it gets the values from the app's db connection string in the web.config (the one that ISD creates). It parses that string to set the properties, but it doesn't handle a "trusted connection" setting in that string. Well, some time ago, I set that db connection string to a "trusted connection" setting (to test something), so the app continued to work fine, and I never set it back to a fixed user id and pw. So, the actual problem was that the Crystal report was encountering a db connection problem, but it was spitting out a bogus message of "File does not begin with %PDF-". The strange thing, that isn't resolved yet, is why is the "problem" not throwing an exception or causing an error prior to the export/stream process. The only logical conclusion is that Crystal doesn't attempt to connect to the database until the export/stream process begins, and then it's too late and spits out an error message in the stream that is not in a proper PDF file format.
    These issues are the kinda things that make you want to throw your monitor out the window. Once again, my love/hate relationship with Crystal Reports over the past 12 years has gone to the "hate" side. Thanks for your willingness to help.
    BTW, the way I figured it out was to use the CrystalReportViewer and run the report - sure enough, it displayed the db connection error message, which led me down the right path.
    Edited by: Michael Sumption on Aug 7, 2008 5:54 PM

  • Issue while exporting report in PDF using crystal report XI

    Hello,
    I am facing issue while exporting a report to PDF through crystal report XI. Reports are generating properly in the crystal report browser but when I am exporting the reports in PDF or trying to get print by clicking on print button, reports not generating properly.
    Allignment in the exported PDF reports getting changed and reports margin is also changes. Due to this some part of report is chopped and printed on the next page.
    I have deployed my application on IBM WebSphere 6.1 server and I am getting following error which might help to identify this issue.
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: The response has already been commited.---- Error code:0 Error code name:succeeded
         at com.crystaldecisions.sdk.occa.report.lib.ReportSDKException.throwReportSDKException(Unknown Source)
         at com.crystaldecisions.report.web.component.o.a(Unknown Source)
         at com.crystaldecisions.report.web.event.br.a(Unknown Source)
         at com.crystaldecisions.report.web.event.w.a(Unknown Source)
         at com.crystaldecisions.report.web.event.b7.broadcast(Unknown Source)
         at com.crystaldecisions.report.web.event.av.a(Unknown Source)
         at com.crystaldecisions.report.web.WorkflowController.do(Unknown Source)
         at com.crystaldecisions.report.web.WorkflowController.doLifecycle(Unknown Source)
         at com.crystaldecisions.report.web.ServerControl.a(Unknown Source)
         at com.crystaldecisions.report.web.ServerControl.processHttpRequest(Unknown Source)
         at com.ibm._jsp._CrystalReportViewer._jspService(_CrystalReportViewer.java:107)
         at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:85)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
         at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
         at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:115)
         at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:168)
         at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:92)
         at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
         at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1425)
         at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:92)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
         at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
         at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1812)
         at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
         at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
         at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
         at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
         at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:193)
         at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:725)
         at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:847)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1498)
    Caused by: com.ibm.wsspi.webcontainer.ClosedConnectionException: OutputStream encountered error during write
         at com.ibm.ws.webcontainer.channel.WCCByteBufferOutputStream.write(WCCByteBufferOutputStream.java:80)
         at com.ibm.ws.webcontainer.srt.SRTOutputStream.write(SRTOutputStream.java:96)
         at com.ibm.wsspi.webcontainer.util.BufferedServletOutputStream.writeOut(BufferedServletOutputStream.java:438)
         at com.ibm.wsspi.webcontainer.util.BufferedServletOutputStream.flushBytes(BufferedServletOutputStream.java:344)
         at com.ibm.wsspi.webcontainer.util.BufferedServletOutputStream.flush(BufferedServletOutputStream.java:323)
         at com.ibm.wsspi.webcontainer.util.BufferedServletOutputStream.flushBuffer(BufferedServletOutputStream.java:478)
         at com.ibm.ws.webcontainer.srt.SRTServletResponse.flushBuffer(SRTServletResponse.java:452)
         at com.ibm.ws.webcontainer.srt.SRTServletResponse.flushBuffer(SRTServletResponse.java:436)
         at com.crystaldecisions.report.web.viewer.JSPViewerResponse.flushBuffer(Unknown Source)
         ... 33 more
    Caused by: java.io.IOException: Async IO operation failed, reason: RC: 64  The specified network name is no longer available.
         at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:203)
         ... 3 more
    Thanks in advance
    Alok P.

    The stack trace is caused by whitespace in your CrystalReportViewer.jsp file.  Look up SAP Note 1199025 for the resolution.
    It's not related to the PDF formatting issue.  There's been changes to the formatting with the most recent version - Crystal Reports for Eclipse 2.0 - so if you haven't already, I recommend you upgrade.
    Note that there's differences in font metric calculation when using Adobe PDF format such that there's no way to get exact agreement between output of the CR and PDF.  But the latest version helps greatly.
    Sincerely,
    Ted Ueda

Maybe you are looking for

  • Computer Crashes when I plug in Ipod Nano

    I have a brand new ipod nano - I loaded in itunes and ripped my music for old cds. When I plug in my new ipod via usb my computer crashes - I have tried multiple usb connections on my pc

  • Check on button press

    I have a report with a checkbox column. It starts out all unchecked. I want to provide the user with a button that will check all the checkboxes. How can I do that? Andrea in TN

  • How can I verify that I properly "SIM-unlocked" my IPhone 4?

    As part of my service plan with Bouygues (France), I got an IPhone 4 which is "SIM-locked" and can not be used with another telephone operator. After 3 months it is possible to organise the "SIM-unlocking" of the phone, free of charge. I did so by co

  • Nokia e5 my nokia error

    Hi... Trying to use my nokia on mi nokia e5 for turn off the tips appears "Unfortunately, this service is not available in the language of your mobile phone" without any options. the same message appears on finnish and english, how can i fix this? T

  • Help!  Download shuts down

    When I initiate updating of my older version 6.0.4.2 the download lasts less than a minute and then shuts down while the ITunes download site opens to the page that states: "Thank you for downloading Itunes". I have repeatedly tried to download and e