Enhancing Customer Reports with Commands and Parameters

Hi All,
I am implementing the mentioned tutorial. I have succesfully deployed the AccessStatisticApplication PAR on portal. While scheduling the report from Content Management -> Reports -> Running Reports, it is giving error "<b>Can't find bundle for base name com.sap.netweaver.km.stats.reports.DocumentAccessReport, locale en_US</b>". Has anyone faced the problem, can anyone please help to remove this runtime error.
Related Link: <a href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/7d28a67b-0c01-0010-8d9a-d7e6811377c0">Enhancing Customer Reports with Commands and Parameters</a>
Regards
Poonam

<i>True, the application property service is apparently not to be used for a real-life scenario</i>
You can definitely use the application property service in production scenarios - it's used by other components in a standard KM install, i.e. out-of-the-box.
<i>in our case it forced the server down with deadlocks. </i>
This should definitely not happen! Did you get SAP support to take a look at this? Was it the most popular documents report that caused this, or some other custom code? There should be no such problem with this service, since it's been around for quite some time and in production use.
<i>
Even if the code sample is not to be used for real-life scenarios it could at least make use of something else than the application property service which isnt't optimal for this use.
</i>
The application property service is good for a lot of scenarios, so it is realistic to use in in real-life scenarios. The only time I have seen this approach (storing the number of hits on documents in the database) fail is in very high-load scenarios.
<i>Could you provide me with a link to the documentation for the logging framework?</i>
<a href="http://http://help.sap.com/saphelp_nw70/helpdata/en/d2/5c830ca67fd842b2e87b0c341c64cd/frameset.htm">Logging and Tracing</a> on help.sap.com and <a href="https://help.sap.com/javadocs/NW04S/current/en/index.html">Logging and Tracing API (J2EE Engine API)</a> for NW 7.0.

Similar Messages

  • Enhancing Customer Reports with Commands... On EP 7 SP 15??

    Has anyone had any luck implementing the the sample project, AccessStatisticApplication, on EP 7, SP 15?
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/7d28a67b-0c01-0010-8d9a-d7e6811377c0
    I am using, SAP NetWeaver Developer Studio Version: 7.0.15
    I believe I corrected the incorrect class paths, no errors are showing before I create the PAR file.
    When I go into Content Managment- Reports, the name of the report is showing "documents.statistic" instead of the "Document Access Report" like the example shows. There is also now description.
    When I try to start the report it... I get the following error:
    Exception class: class java.util.MissingResourceException
    java.util.MissingResourceException: Can't find bundle for base name com.sap.netweaver.km.stats.reports.DocumentAccessReport, locale en_US
            at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:838)
            at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:807)
            at java.util.ResourceBundle.getBundle(ResourceBundle.java:701)
            at com.sapportals.wcm.util.resource.ResourceBundles.getBundle(ResourceBundles.java:152)
            at com.sapportals.wcm.util.resource.ResourceBundles.getString(ResourceBundles.java:88)
            at com.sapportals.wcm.util.resource.ResourceBundles.getString(ResourceBundles.java:106)
            at com.sap.netweaver.km.stats.reports.DocumentAccessReport.getDescription(DocumentAccessReport.java:287)
            at com.sapportals.wcm.repository.manager.reporting.monitor.ReportComponent$ReportWrapper.getDescription(ReportComponent.java:256)
            at com.sapportals.wcm.repository.manager.reporting.types.RPReportHandler$DescriptionGen.getProperty(RPReportHandler.java:175)
            at com.sapportals.wcm.repository.manager.reporting.types.RPPropHandler.getProperties(RPPropHandler.java:110)
            at com.sapportals.wcm.repository.manager.reporting.types.RPPropHandler.getProperties(RPPropHandler.java:143)
            at com.sapportals.wcm.repository.manager.reporting.RPPropertyManager.getProperties(RPPropertyManager.java:83)
            at com.sapportals.wcm.repository.ResourceImpl.internalGetProperties(ResourceImpl.java:3773)
            at com.sapportals.wcm.repository.ResourceImpl.internalGetPropertiesExtended(ResourceImpl.java:1327)
            at com.sapportals.wcm.repository.ResourceImpl.getProperties(ResourceImpl.java:1292)
            at com.sapportals.wcm.repository.CollectionImpl.getChildren(CollectionImpl.java:425)
            at com.sapportals.wcm.service.resourcelistfilter.cm.ResourceListFilter.getChildren(ResourceListFilter.java:420)
            at com.sapportals.wcm.rendering.collection.AbstractRendererStatus.initialfilter(AbstractRendererStatus.java:331)
            at com.sapportals.wcm.rendering.collection.AbstractRendererStatus.initializeSelectionList(AbstractRendererStatus.java:301)
            at com.sapportals.wcm.rendering.collection.AbstractRendererStatus.initialize(AbstractRendererStatus.java:287)
            at com.sapportals.wcm.rendering.collection.AbstractRendererStatus.setParent(AbstractRendererStatus.java:99)
            at com.sapportals.wcm.rendering.collection.LightCollectionRenderer.createStatus(LightCollectionRenderer.java:911)
            at com.sapportals.wcm.rendering.collection.LightCollectionRenderer.renderAll(LightCollectionRenderer.java:598)
            at com.sapportals.wcm.rendering.control.cm.NeutralControl.render(NeutralControl.java:164)
            at com.sapportals.wcm.rendering.layout.cm.MenuTreeListLayoutController.render(MenuTreeListLayoutController.java:127)
            at com.sapportals.wcm.rendering.control.cm.WdfProxy.render(WdfProxy.java:1831)
            at com.sapportals.wdf.layout.HorizontalLayout.renderControls(HorizontalLayout.java:42)
            at com.sapportals.wdf.stack.Pane.render(Pane.java:155)
            at com.sapportals.wdf.stack.PaneStack.render(PaneStack.java:73)
            at com.sapportals.wdf.layout.HorizontalLayout.renderPanes(HorizontalLayout.java:73)
            at com.sapportals.wdf.stack.Pane.render(Pane.java:158)
            at com.sapportals.wdf.stack.PaneStack.render(PaneStack.java:73)
            at com.sapportals.wdf.layout.HorizontalLayout.renderPanes(HorizontalLayout.java:73)
            at com.sapportals.wdf.stack.Pane.render(Pane.java:158)
            at com.sapportals.wdf.stack.PaneStack.render(PaneStack.java:73)
            at com.sapportals.wdf.layout.HorizontalLayout.renderPanes(HorizontalLayout.java:73)
            at com.sapportals.wdf.stack.Pane.render(Pane.java:158)
            at com.sapportals.wdf.stack.PaneStack.render(PaneStack.java:73)
            at com.sapportals.wdf.WdfCompositeController.doInitialization(WdfCompositeController.java:282)
            at com.sapportals.wdf.WdfCompositeController.buildComposition(WdfCompositeController.java:660)
            at com.sapportals.htmlb.AbstractCompositeComponent.preRender(AbstractCompositeComponent.java:33)
            at com.sapportals.htmlb.Container.preRender(Container.java:120)
            at com.sapportals.htmlb.Container.preRender(Container.java:120)
            at com.sapportals.htmlb.Container.preRender(Container.java:120)
            at com.sapportals.portal.htmlb.PrtContext.render(PrtContext.java:406)
            at com.sapportals.htmlb.page.DynPage.doOutput(DynPage.java:237)
            at com.sapportals.wcm.portal.component.base.KMControllerDynPage.doOutput(KMControllerDynPage.java:134)
            at com.sapportals.htmlb.page.PageProcessor.handleRequest(PageProcessor.java:129)
            at com.sapportals.portal.htmlb.page.PageProcessorComponent.doContent(PageProcessorComponent.java:134)
            at com.sapportals.wcm.portal.component.base.ControllerComponent.doContent(ControllerComponent.java:77)
            at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
            at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
            at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
            at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
            at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
            at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
            at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:645)
            at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
            at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
            at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
            at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
            at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
            at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:524)
            at java.security.AccessController.doPrivileged(Native Method)
            at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:407)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
            at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
            at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
            at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
            at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
            at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
            at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
            at java.security.AccessController.doPrivileged(Native Method)
            at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
            at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)

    So another problem I encountered.
    Everything seemed to be working fine.
    When I ran the report on a KM rep, all values were populating fine. unique, count, last access.. etc...
    Then after adding the Repository Service to another KM rep, the whole thing stopped working.
    Now only the Modified State is populating correctly.
    Any ideas? Something to do with the Application Service... Or a KM setting I am guessing.
    I tried starting from scratch again. Removed the Repository services and report, re-uploaded the original PAR file and re-did all the setup work that I original had done to get it working.
    No go.
    Edited by: Paul Mikota on Jun 23, 2008 4:12 PM

  • Custom report with  FAGLFLEXA and "Document type"

    We have new GL and we must do a custom report like this:
    Hierarchy of ProfitCentre ______Credit for mm.yyyy___ Debit for mm.yyyy 
    Profit centre 1_____________________ c1_______________d1
    Profit centre 2_____________________ c2_______________d2
    ect. ....
    The value of c1 is the sum of monthly credit for a profit centre, for a group of accounts, but only for certain "document type".
    The "Document type" is what worries me.
    I have already written a similar report with Report Painter, reading data from the table FAGLFLEXT (0FL library), but took the full credit from the account (for all "document type"), without restrictions on the document type (the table  FAGLFLEXT not contain the field "document type").
    The data I need in my report, I can see with T. FAGLB03. Double-clicking on, for example, the value of credit you go into detail, and data can be selected for different "Document type". I still do not understand how it works and which tables use the T. FAGLB03 to have these data in detail.
    Please, help me what exactly to do?My questions are these?
    My principals questions are these:
    1 . I think, inevitably, i have to link two tables: FAGLFLEXA (the one with the given to him) and GKFP that contains the field BLART (Document Type). This is the right way? Is there another way?
    2 This report can be create with one of SAP tools: Report Painter, SAP Query, ... or the only solution is to write a program in ABAP?
    3.  If i'm not asking too much, you could give me a step-by-step description of how i should proceed?
    All suggestions are welcome.
    Thank you in advance. Many points to assign who will help me to solve this problem

    I know PowerShell can help you with the Get-SCSMRelatedObject command but you would have to write a small script to get that to work en mass.
    http://smlets.codeplex.com/

  • Custom Report with Problems and incidents

    I'm trying to create a custom report of all problems and related incidents.  I can query the problemDimvw table, but I need some assistance linking to the incidents.  Anyone have a query or point me in a direction to join the necessary tables?
     What I'm trying to get is Problem ID, Title, Description, and Incident IDs linked to it.  Thanks.
    Chris

    I know PowerShell can help you with the Get-SCSMRelatedObject command but you would have to write a small script to get that to work en mass.
    http://smlets.codeplex.com/

  • SCSM2012 R2 Custom Reports with Weekly and monthly schedule to email

    Hi
    I am able to pull standard ListofIncidents Reports, want a similar kind of report with a Weekly and monthly scheduled reports to email, I have tried using pull reports from Cubes to Excel and do a custom reports but is not showing like standard ListofIncidents
    Reports. Could you please guide me on this.
    Thanks and Regards,
    Pradeep Kumar
    Pradeep Kuimar

    Hi,
    Would you please check the articles below regarding to publishing and Subscribing to Service Manager Reports:
    http://blogs.technet.com/b/servicemanager/archive/2010/06/30/publishing-and-subscribing-to-service-manager-reports.aspx
    How to Schedule a Standard Service Manager Report
    https://technet.microsoft.com/en-us/library/hh519682.aspx
    Hope this can be helpful for you!
    Regards,
    Yan Li
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • KM Activity Reporting  --  Enhancing Customer Reports

    Hello friends,
    I have a quick query on KM activity reporting . I came across this article by name  "Enhancing Customer Reports with Commands and Parameters" by Thilo Brandt dated 11th July 2006 .
    Here is the link to the article
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/7d28a67b-0c01-0010-8d9a-d7e6811377c0
    I would like to know if deploying the code given in the article would directly produce the report given in the article . Is this a fully functional code ? I am asking this because i have not come across any User Interface code in the example . Please respond with your comments at the earliest .
    Many thanks in advance
    Subra

    Hi Subra,
    look in the file DocumentAccessReport.java
    and take a look in the middle of the file :
    // reporting properties
    protected static final List m_resultPropertyNames;
    protected static final IPropertyName m_propDisplayname;
    protected static final IPropertyName m_propUniqueUserCount;
    protected static final IPropertyName m_propTotalCount;
    protected static final IPropertyName m_propLastAccessed;
    protected static final IPropertyName m_propLastModified;
    Regards, Kai

  • KM ctivity reporting  --  Enhancing Customer Reports

    Hello friends,
    I have a quick query on KM activity reporting . I came across this article by name  "Enhancing Customer Reports with Commands and Parameters" by Thilo Brandt dated 11th July 2006 .
    Here is the link to the article
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/7d28a67b-0c01-0010-8d9a-d7e6811377c0
    I would like to know if deploying the code given in the article would directly produce the report given in the article . I am asking this because i have not come across

    Hi,
      After deploy it, if you go to: Content Management->Report->Document Access Report->Schedule and planning its running.
    Then if you click in the name of this report, you can see the result (xml files) of this execution.
      Also, from System Administration->Monitoring->KM->Running Reports->you can see all reports that are currently running on all KM servers
    Patricio.

  • Connecting Crystal reports with dashboards and passing parameters

    Hi ,
    Can anyone have any document on Connecting Crystal reports with dashboards and passing parameters.
    I would appreciate for this.
    Thank You.

    Hi Ganesh,
    You can refer the following links for connecting Crystal reports with dashboards:
    Dashboard integration in Crystal Reports using flash variables | Clariba Blog
    https://websmp102.sapag.de/~sapidp/011000358700001426732009E/Xcelsius_EmbeddingInCR2008.pdf
    http://events.asug.com/2012BOUC/0315_Integrating_SAP_Dashboards_into_SAP_Crystal_Reports.pdf
    Regards,
    Renu

  • JRC bug: apostrophe in string parameter passed to Crystal Report with Command datasource to SQL Server

    Post Author: nl11087
    CA Forum: JAVA
    A single quote/apostrophe in string parameter passed to a Crystal Report with Command datasource connecting to a SQL Server database, using sqljdbc driver does not escape the special character correctly. When doing a preview in the Crystal Reports IDE it allows you to escape the input parameter as expected and work correctly, but through the JRC component it fails. For string parameters without special sql server characters I experience no problems at all. When replacing the Command with a direct table there is also no problem.
    Reproduction:
    1. create a database db1, create a table table1 with a String type column col1.
    2. Create new report Report1.rpt, create a connection to above, Add Command using 'SELECT col1, col2, col3 FROM table1 WHERE col1 = '{?Par1}' . Add a parameter field Par1 : String
    3. In your java stand alone application using JRC add the parameter Par1 with a value "Jon Doe's Value" containing a single apostrophe. Export to PDF. (I also tried MSWord and this failed too, similar behavior). Additionally, in another test try to replaceAll("'","''") to escape it, preventing the code to break, but now it does not retrieve the expected row anymore and you end up with an empty report.
    Exception StackTrace:
    com.crystaldecisions.reports.exportinterface.exceptions.ExportException: JDBC Error: Incorrect syntax near 's'.
    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.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)
    Caused by: com.crystaldecisions.reports.formatter.formatter.c: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.if(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.l.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.p.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.p.a(Unknown Source)
    at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
    ... 17 more
    Caused by: com.crystaldecisions.reports.dataengine.be: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.dataengine.n.else(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.nr(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.bn(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.bp(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.else(Unknown Source)
    at com.crystaldecisions.reports.dataengine.s.a(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.aa(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
    ... 23 more
    Caused by: com.crystaldecisions.reports.reportdefinition.datainterface.n: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.reportdefinition.datainterface.p.a(Unknown Source)
    ... 35 more
    Caused by: com.crystaldecisions.reports.queryengine.driverImpl.m: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.queryengine.driverImpl.o.eC(Unknown Source)
    at com.crystaldecisions.reports.queryengine.driverImpl.o.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.ea(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.h(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.dV(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ax.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.do(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.do(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ae.cy(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ae.cz(Unknown Source)
    at com.crystaldecisions.reports.queryengine.b1.bc(Unknown Source)
    ... 36 more
    Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 's'.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
    at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement$StatementExecutionRequest.executeStatement(Unknown Source)
    at com.microsoft.sqlserver.jdbc.CancelableRequest.execute(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeRequest(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(Unknown Source)
    ... 48 more
    - JRCAgent3 detected an exception: An error occured while exporting the report
    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.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)

    Post Author: nl11087
    CA Forum: JAVA
    A single quote/apostrophe in string parameter passed to a Crystal Report with Command datasource connecting to a SQL Server database, using sqljdbc driver does not escape the special character correctly. When doing a preview in the Crystal Reports IDE it allows you to escape the input parameter as expected and work correctly, but through the JRC component it fails. For string parameters without special sql server characters I experience no problems at all. When replacing the Command with a direct table there is also no problem.
    Reproduction:
    1. create a database db1, create a table table1 with a String type column col1.
    2. Create new report Report1.rpt, create a connection to above, Add Command using 'SELECT col1, col2, col3 FROM table1 WHERE col1 = '{?Par1}' . Add a parameter field Par1 : String
    3. In your java stand alone application using JRC add the parameter Par1 with a value "Jon Doe's Value" containing a single apostrophe. Export to PDF. (I also tried MSWord and this failed too, similar behavior). Additionally, in another test try to replaceAll("'","''") to escape it, preventing the code to break, but now it does not retrieve the expected row anymore and you end up with an empty report.
    Exception StackTrace:
    com.crystaldecisions.reports.exportinterface.exceptions.ExportException: JDBC Error: Incorrect syntax near 's'.
    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.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)
    Caused by: com.crystaldecisions.reports.formatter.formatter.c: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.if(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.l.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.p.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.p.a(Unknown Source)
    at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
    ... 17 more
    Caused by: com.crystaldecisions.reports.dataengine.be: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.dataengine.n.else(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.nr(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.bn(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.bp(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.else(Unknown Source)
    at com.crystaldecisions.reports.dataengine.s.a(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.aa(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
    ... 23 more
    Caused by: com.crystaldecisions.reports.reportdefinition.datainterface.n: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.reportdefinition.datainterface.p.a(Unknown Source)
    ... 35 more
    Caused by: com.crystaldecisions.reports.queryengine.driverImpl.m: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.queryengine.driverImpl.o.eC(Unknown Source)
    at com.crystaldecisions.reports.queryengine.driverImpl.o.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.ea(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.h(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.dV(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ax.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.do(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.do(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ae.cy(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ae.cz(Unknown Source)
    at com.crystaldecisions.reports.queryengine.b1.bc(Unknown Source)
    ... 36 more
    Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 's'.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
    at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement$StatementExecutionRequest.executeStatement(Unknown Source)
    at com.microsoft.sqlserver.jdbc.CancelableRequest.execute(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeRequest(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(Unknown Source)
    ... 48 more
    - JRCAgent3 detected an exception: An error occured while exporting the report
    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.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)

  • Custom Report for slow and fast moving items

    Dear Xperts,
    My client wants to develop a new report for slow and fast moving items, I checked the std report MC46 however as per std SAP design this report does not consider the special stock like project stock (Q)...could you please help me to know how can develop this new report with following input and output fields?
    Input fields:
    Plant
    Material
    Material Group
    MRP Area
    Special Stock Indicator
    Special Stock (Type)
    Output Fields:
    Material
    Material type
    Material group
    MRP Controller
    MRP Area
    ABC indicator
    Material price
    Category field – Slow, Fast, Non-moving
    Current Stock
    Last Issue Date
    Thanks in Advance
    Regards
    Rahul

    Dear Rahul,
    If you required  project stock and consignment stock with valuated stock report in same place you need to generate new info structure as given below link. Or you can go with customized report with abaper.
    Info structure validation
    Regards
    Sanjeet Kumar

  • Custom report on payroll and time evaluation results

    Hello Experts,
    My client would like to have a custom report on payroll and time evaluation results , can you please provide me with 2 options of achieving them.
    Thanks,
    Regi

    Hi,
    The time clusters are found using reports RPCLST*(B2, B1, PC etc) via SE38. You can find the time clusters under the time menu in the menu tree.
    PCL1 - Database for HR work area
    PCL2 - Accounting Results (time, travel expense and payroll);
    The database table PCL2 contains the following data areas:
    B2 time accounting results
    CD cluster directory of the CD manager
    PS generated schemas
    PT texts for generated schemas
    RX payroll accounting results/international
    Rn payroll accounting results/country-specific ( n = HR country indicator )
    ZL personal work schedule
    Tto retrieve payroll results accesse SAP transaction PC_PAYRESULT for all countries.
    Finally u can get the results for time PT_CLSTB2 , for Payroll PC_PAYRESULT. With this t.codes u can get the require results for ur custom report.
    Regards,
    Devi.

  • BI: Virtual Provider for ECC Report with same selection parameters

    Dear all,
    I have attached screen shot of ECC report selection screen with contain Material, Plant and Dates. As report is bit complex and I need to use just ITAB (internal table) of it for further use in BEx Query and for Dashboard purposes.
    Problem: I need to call this report by creating Virtual Provider in BI so that I get data from ECC at runtime as it is shares report so I can't able to save any data in transparent table as report calculated opening balances at runtime.
    It is possible for me by using function module i can get itab by submit return and then create Data Source for it ?
    As i make copy of FM ZZRSAX_BIW_GET_SIMPLE i cannot use submit there due to OPEN CURSOR mechanism there.
    Kindly anyone suggest how it is possible to call report with same selection parameters for creation of virtual provider.
    Please mention if i miss any point in explaining problem.
    Feel free to ask for any query.
    Many thanks.
    Hoping for positive and quick responses.

    please create 2 reports as given below.-
    REPORT  ZSZP_00007.
    parameters a(5) .
    parameters b(5) .
    parameters c(5) .
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF screen-name = 'A' or screen-name = 'B' .
      get parameter id 'aaaaaaaaaaa' field a.
      get parameter id 'bbbbbbbbbbb' field B.
    screen-input = 0.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    start-of-selection.
    your logic
    REPORT  zszp_00005.
    PARAMETERS a(5).
    PARAMETERS b(5).
    START-OF-SELECTION.
      SET PARAMETER ID 'aaaaaaaaaaa' FIELD a.
      SET PARAMETER ID 'bbbbbbbbbbb' FIELD b.
    your logic
    SUBMIT zszp_00007 VIA SELECTION-SCREEN.
    i hope this approach will solve your problem.
    thanks
    Swanand

  • I want to enhance customer(XD01) with BADI screen

    hai sap-abap gurus
    I want to enhance customer(XD01) with BADI screen to populate custom fields and store its information. can anybody tell how to find out proper BADI for screen enhacement ? and how to Implement?
    pls tell me the detailed steps?

    Hi,
    1) Use the BADI's CUSTOMER_ADD_DATA & CUSTOMER_ADD_DATA_CS.
    CUSTOMER_ADD_DATA -This BADI used to activate the screen group and checks for account group
    CUSTOMER_ADD_DATA_CS -This BADI used to include the custom screen.
      2)Your code group need to be configure in SPRO before doing the work.
    Regards
    Kiran Sure

  • Discover Bluetooth LE Device and its custom service with uuid and its characteristics

    Hello Team,
    I have a requirement for developing a library in C# which can be used in any windows app (Metro or Non Metro) apps to discover Bluetooth LE devices which are advertising a custom service with uuid and pair and find all the characteristics of the service
    and send parameters and receive response.
    I have tried 32feet.NET library which everyone talks about but realized it doesn't support Bluetooth LE devices. Is there any way I can do that? Or do I have write C# wrapper to use winsock2.2 library to call native code to access Bluetooth stack?
    Please suggest. We have been able to achieve this requirement in Mac OSX by using their core Bluetooth framework.

    Hello Priyanku,
    >>Is there any way I can do that?
    As far as I know, there is not such API that you can use to enumerate all services belonging to a Bluetooth LE device, nor all characteristics belonging to a service.
    >>Or do I have write C# wrapper to use winsock2.2 library to call native code to access Bluetooth stack?
    I suggest that you could try it.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • To build some Custom reports for Sales and Distribution

    I want to build some Custom reports for Sales and Distribution.
    I do not know how to do that.
    I reviewed lots of threads earlier, but couldnt understand how to do that.
    If any one can send me suitable step by step guide, I will really appreciate it.
    Or send me some link or some documents with couple of nice exampples of how to do that.
    Which setting to make in B  ex and everything.
    I am new to BI.
    Please advise.
    Points will be awarded

    Hi,
    Could you be more specific about your requirement. I could understand that you wanted to know what all are the Customer sales reports could be provided in SD.
    Generally irrespective of projects few reports are considered as baseline reports for any SAP implementations.
    For example: 1. Order intakes daily
                          2. Order intakes monthly
                          3. Order magin (daily,monthly)
                         4. Order analysis.
    Best regards.

Maybe you are looking for

  • Excise duty in manual and vat by using taxcode

    Dear Experts, my scenario is this 1. I am trying to capture the excise duty 2% and vat 5% for a item a while entering the price for the item a as 300. 2. I done the following step in MM settings. 3. In Define calculation schema by using condition typ

  • Business group structure in 11.5.10.2

    Hi all, I am using Vision demo for 11.5.10.2. Is there any feature where we can outline business group structure ? I think it is available in DashBoard. However, I could not be able to find it out. TIA. dba.apps.

  • Working on Well Creation Program using BAPI

    Hi, My requirement is to be create well using standard BAPI 'BAPI_WELLID_CREATE'. T-code is O3U_Wl1. When I am calling this bapi into my program it's not creating entries in O3U_Wl3. Can anyone please help me out? Thank-You, Sony

  • How to add menus in java?

    Hello, I am new to java technology. I just wanna know from smart java coder , how to add menus to main or mdi form? I will be very thankful for early response

  • BAPI or FM to get Material Price

    Is there a readily available BAPI or Function Module that can get me a meterial's price based on it's pricing procedure?