Quantcast
Viewing all 893 articles
Browse latest View live

How to change JDBC connection URL after deployment without designer?

Hi, buddies:

 

I have a simple but not easy to solve problem after efforts seeking for helps. My expectation is to change my jdbc connection URL by modifying a xml file or use administrative console in crystal report server XI. Not just open the designer, open my rpt file, and user "database expert" to re-map my tables again.

 

How?

 

My practice is:

1, in crytal report 2008, create my new rpt file, and use "JDBC" as my database connection;

2, I can connect to the database and drag and draw the tables to rpt after my jdbc connection and classpath is fine.

3, I publish to the testing server which the destination database is identical to my rpt;

4, it is fine to open by setting up the right classpath in CRConfig.xml file.

 

BUT, I will publish to the production server which my destination for datase is different from my previous URL.

 

How can I change it? It seems very silly to open each rpt files to reroute the database file-by-file.

 

Can crystal report provide a confortable way to do it?

 

(I got some hints by googling the question and it is related to JNDI instead of JDBC, but how can I access the JNDI server when I using crystal report designer 2008).

 

This problem drive me crazy and desperately want your help!!


JNDI Datasource and connections not closed

hello,

<br/>

i'm printing reports with a JNDI datasource (export to PDF) from JBoss EAP 5.1 with crystal reports runtime: 12.2.210.1215

<br/>

the connections from the report was changed the following way (designed with JDBC) for report and all subreports::

<br/><br/>

<pre>

       IConnectionInfo newCon = new ConnectionInfo();

     newCon.setKind(ConnectionInfoKind.SQL);

     PropertyBag bag = new PropertyBag();

     bag.put("JNDI Datasource Name", dbJNDIName);

     bag.put("Database DLL", "crdb_jdbc.dll"); // required!!!

     newCon.setAttributes(bag);

     clientDoc.getDatabaseController()

          .replaceConnection(oldCon, newCon, null, DBOptions._doNotVerifyDB);

</pre>

<br/>

<br/>

and after printing the report was closed like:<br/>

<pre>

  if (clientDoc != null && clientDoc.isOpen()) {

        clientDoc.close();

  }

</pre>

<br/>

<br/>

If i'm using a:<br/>

<br/>

<pre>

&lt;no-tx-datasource&gt;

        &lt;jndi-name&gt;assekuradeurNOTXDatasource&lt;/jndi-name&gt;

           &lt;connection-url&gt;jdbc:postgresql://....&lt;/connection-url&gt;

           &lt;driver-class&gt;org.postgresql.Driver&lt;/driver-class&gt;

            &lt;user-name&gt;...&lt;/user-name&gt;

           &lt;password&gt;...&lt;/password&gt;

   &lt;/no-tx-datasource&gt;

</pre>

<br/>

it works fine. No exception occurs.<br/>

<br/>

But if i use a:<br/>

<pre>

&lt;xa-datasource&gt;

    &lt;jndi-name&gt;assekuradeurDatasource&lt;/jndi-name&gt;

    &lt;track-connection-by-tx/&gt;

     &lt;xa-datasource-class&gt;org.postgresql.xa.PGXADataSource&lt;/xa-datasource-class&gt;

    &lt;xa-datasource-property name="ServerName"&gt;...&lt;/xa-datasource-property&gt;

    &lt;xa-datasource-property name="PortNumber"&gt;...&lt;/xa-datasource-property&gt;

    &lt;xa-datasource-property name="DatabaseName"&gt;...&lt;/xa-datasource-property&gt;

    &lt;xa-datasource-property name="User"&gt;...&lt;/xa-datasource-property&gt;

    &lt;xa-datasource-property name="Password"&gt;...&lt;/xa-datasource-property&gt;

    &lt;transaction-isolation&gt;TRANSACTION_READ_COMMITTED&lt;/transaction-isolation&gt;

    &lt;min-pool-size&gt;1&lt;/min-pool-size&gt;

    &lt;max-pool-size&gt;200&lt;/max-pool-size&gt;

   &lt;/xa-datasource&gt;

</pre><br/>

<br/>

i got the following exception after printing (printed document was ok):<br/>

<br/>

<pre>

2011-02-17 11:30:57,673 INFO  [org.jboss.resource.connectionmanager.CachedConnectionManager] (http-0.0.0.0-8080-1) Closing a connection for you.  Please close them yourself: org.jboss.resource.adapter.jdbc.jdk6.WrappedConnectionJDK6@6d0faf

java.lang.Throwable: STACKTRACE

     at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:278)

     at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:524)

     at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)

     at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)

     at com.crystaldecisions.reports.queryengine.driverImpl.jdbc.JDBCConnection.Open(Unknown Source)

     at com.crystaldecisions.reports.queryengine.JDBConnectionWrapper.Open(SourceFile:123)

     at com.crystaldecisions.reports.queryengine.Connection.br(SourceFile:1771)

     at com.crystaldecisions.reports.queryengine.Connection.bs(SourceFile:491)

     at com.crystaldecisions.reports.queryengine.Connection.t1(SourceFile:2978)

     at com.crystaldecisions.reports.dataengine.dfadapter.DFAdapter.a(SourceFile:696)

     at com.crystaldecisions.reports.dataengine.dfadapter.DFAdapter.for(SourceFile:706)

     at com.crystaldecisions.reports.reportdefinition.ReportHelper.a(SourceFile:198)

     at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.long(SourceFile:957)

     at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.a(SourceFile:635)

     at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.int(SourceFile:672)

     at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1944)

     at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:661)

     at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:167)

     at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:529)

     at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:527)

     at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(SourceFile:102)

     at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(SourceFile:525)

     at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(SourceFile:424)

     at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(SourceFile:352)

     at com.businessobjects.sdk.erom.jrc.a.a(SourceFile:54)

     at com.businessobjects.sdk.erom.jrc.a.execute(SourceFile:67)

     at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(SourceFile:716)

     at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(SourceFile:125)

     at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:537)

     at com.crystaldecisions.sdk.occa.report.application.ds.a(SourceFile:186)

     at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(SourceFile:1558)

     at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(SourceFile:337)

     at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.if(SourceFile:223)

     at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:147)

     at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:128)

     at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:111)

     at org.sis.assekuradeur.utils.JRCHelper.print(JRCHelper.java:94)

...

 

2011-02-17 11:30:57,675 INFO  [org.jboss.resource.connectionmanager.TxConnectionManager] (http-0.0.0.0-8080-1) throwable from unregister connection

java.lang.IllegalStateException: Trying to return an unknown connection2! org.jboss.resource.adapter.jdbc.jdk6.WrappedConnectionJDK6@6d0faf

     at org.jboss.resource.connectionmanager.CachedConnectionManager.unregisterConnection(CachedConnectionManager.java:330)

     at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.connectionClosed(TxConnectionManager.java:797)

     at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.closeHandle(BaseWrapperManagedConnection.java:363)

     at org.jboss.resource.adapter.jdbc.WrappedConnection.close(WrappedConnection.java:156)

     at sun.reflect.GeneratedMethodAccessor374.invoke(Unknown Source)

     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

     at java.lang.reflect.Method.invoke(Method.java:597)

     at org.jboss.resource.connectionmanager.CachedConnectionManager.closeConnection(CachedConnectionManager.java:523)

     at org.jboss.resource.connectionmanager.CachedConnectionManager.access$000(CachedConnectionManager.java:63)

     at org.jboss.resource.connectionmanager.CachedConnectionManager$CloseConnectionSynchronization.afterCompletion(CachedConnectionManager.java:603)

     at org.jboss.resource.connectionmanager.TransactionSynchronizer.invokeAfter(TransactionSynchronizer.java:301)

     at org.jboss.resource.connectionmanager.TransactionSynchronizer.afterCompletion(TransactionSynchronizer.java:271)

     at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:123)

     at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:381)

     at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:99)

     at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:160)

     at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1431)

     at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:137)

     at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)

     at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:170)

     at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)

...

</pre>

 

Edited by: M.Schulz on Feb 17, 2011 11:50 AM

Howto deactivate PerformanceMonitor

Hello,

 

we are developing an eclipse RCP-Application with crystal to show some reports. We have analysed the memory usage of the application and found a nasty issue. After opening und closing some reports we found an instance of the class com.businessobjects.performancemonitoring.PerformanceMonitorholding objects with a total size of 200MB (e.g. ReportDocuments).

How can we disable the performance monitor? And if thats not possible what can we do to free the memory?

Image may be NSFW.
Clik here to view.
PerformanceMonitor.png

Best regards,

Guido

Putting JARs in shared/lib?

How can I put JRC's JARs in Tomcat's shared\lib -directory instead of my application's lib-directory? Everything works fine if JARs are in Tomcat\webapps\MyApplication\WEB-INF\lib but if I move them to Tomcat\shared\lib I'll get en error message:

 

com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Unexpected error determining relative path---- Error code:-2147217395 Error code name:serverProgrammingError

 

Since there might be several web applications on the server running JRC I'd prefer having only one set of required JARs in shared/lib.

Failed To start database

Hi

I have an application with a report that works fine, triyng to modify the layout of the report now i recieve an error like this

"XJ040 Failed to start database see next exception for datails code 40000"

This message come from CR 2008.

 

The strange is that trying to access fron netbeans the  database starts, i'm sure that no other application is using that db!!!

I'm going crazy

 

Any ideas???? thanks

java.sql.SQLException: DSRA9350E: Operation Connection.commit is not allowe

Using JRC from Eclipse 2 version for generation of reports using Crystal Reports from a Java J2EE application

 

Environment is WebSphere Application Server 7.0, DB2 9.5 and most recent download of CR Java runtime version  (crjava-runtime_12.2.212.zip)

 

The code that calls Crystal Reports sets up the parameters for CR to use the data source defined to WebSphere.  It appears to connect to the database OK using JNDI , but fails in the following call.

 

               clientDoc.getDatabaseController().setTableLocation(origTable,newTable);

 

The problem appears to be that a commit is being done by the JDBCConnection code.  (see stack trace).   Since the CR interface code is within an EJB, there is a container managed transaction.  Looks like Websphere does not like the connection being closed manually when it is within it's transaction context.

 

Caused by: java.sql.SQLException: DSRA9350E: Operation Connection.commit is not allowed during a global transaction.

     at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.commit(WSJdbcConnection.java:1062)

     at com.crystaldecisions.reports.queryengine.driverImpl.jdbc.JDBCConnection.try(Unknown Source)

 

Is this a supported configuration?   Any idea how to prevent the CR Java code from closing the connection ?

 

P.S.   This code runs well on version 1 of the JRC   (crystalreports-javasdk-11.8.8.zip).   The only reason I am testing on CR for Eclipse 2 is I can't figure out how to get rid of the nag on the footer of reports produced  (Please register etc . . .)

 

Any assistance would be appreciated.

 

Thanks

 

Frank

Background threads?

Hi all

 

We're currently evaluating CR for use in our swing-based application. Our app has a plugin mechanism, and I'm having some difficulty in getting our plugins unloaded after using the ReportViewerBean. Specifically, it appears that a number of background threads with names like "Background Batch Spiller 0" are started up by the Crystal Reports code, and hang around even after closing the component. The threads appear to still have references to our plugin's classloader through the inheritedAccessControlContext field on the thread. We are not running with a SecurityManager.

 

I believe that I'm calling ReportClientDocument.close() as necessary and also cleaning up the viewer by calling stop() followed by destroy() on it.

 

Is there any way to programatically tell the Crystal code to shut down all its background threads? Or are there any other suggestions?

 

Thanks in advance

 

Tom

How to print directly to Printer from Crystal Report Viewer ?

Hi All,

 

We are integrating our Java Web Application with Crystal report XI, currently using JRC and export to PDF for user to preview and print to local printer.

Now there is new requirement :

Some clients is using thin client terminal (no harddisk, only has OS +Browser in ROM), so I cannot install Acrobat Reader for them to preview&print the report.

 

So I am looking at  Crystal Report Viewer, the question is : Can I print from Crystal Report Viewer directly to local printer without first converting it to PDF (because I can't have acrobat reader installed) ??

 

Thank you very much,

Krist

Indonesia


Encoding problem while exporting report to PDF

Hi everyone

 

We have a trouble while exporting Crystal Report with Russian or Lithuanian characters to pdf on web. Some of Lithuanian characters are exported as question marks u201C?u201D. The problem is only if  the web project is running on Linux server. On Windows export and printing works fine.

We have tried both WebSphere Application Server 6.1.0.19 and Sun GlassFish v2.1 installed on Ubuntu 9.04.

 

For the testing purpose we have downloaded u201CAll-In-Oneu201D Eclipse installation (u201CEclipse Ganymede 3.4.1 with Crystal Reports for Eclipseu201D) from businessobjects.com (Crystal Reports for Eclipse version is 2.0.2.r678).

We have done the simplest Crystal Reports Web Project and created a new report with some Lithuanian characters (the report doesn't use any external data source). Then using u201CCrystal Reports->Create Report Viewer JSP...u201D wizard we created standard JSP page with Java code snippets to render report. Then we exported this web project as EAR and run it both on Linux and Windows servers. On Windows server export to pdf works fine, but on Linux not. The same problem is with Russian characters.

 

Could anybody help, how to set charset or encoding used while printing and exporting report to pdf?

 

Thanks in advance

 

Edited by: Judzin on Sep 10, 2009 3:09 PM

Could not initialize class com.crystaldecisions.reports.formatter.export2.ExportSupervisorEx

Hi,

 

     Getting error Could not initialize class com.crystaldecisions.reports.formatter.export2.ExportSupervisorEx in JBOSS 4.0.2.

 

     Following is the stacktrace:

08:51:09,670 INFO  [STDOUT] 08:51:09,670 ERROR [JRCCommunicationAdapter]  detect
ed an exception: Could not initialize class com.crystaldecisions.reports.formatt
er.export2.ExportSupervisorEx
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.f(SourceFile:
2449)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile
:1909)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile
:661)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:
167)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFil
e:529)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(Source
File:527)
        at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(SourceFil
e:102)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(SourceFil
e:525)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(SourceFil
e:424)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Sourc
eFile:352)
        at com.businessobjects.sdk.erom.jrc.a.a(SourceFile:54)
        at com.businessobjects.sdk.erom.jrc.a.execute(SourceFile:67)
        at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(SourceFi
le:716)
        at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(SourceF
ile:125)
        at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:537)
        at com.crystaldecisions.sdk.occa.report.application.ds.a(SourceFile:186)

        at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Sourc
eFile:1558)
        at com.crystaldecisions.sdk.occa.report.application.ReportSource.getPage
(SourceFile:767)
        at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource
.getPage(SourceFile:324)
        at com.crystaldecisions.reports.reportengineinterface.JPEReportSource.ge
tPage(SourceFile:149)
        at com.businessobjects.report.web.event.s.a(SourceFile:158)
        at com.businessobjects.report.web.event.s.a(SourceFile:127)
        at com.businessobjects.report.web.event.bt.a(SourceFile:47)
        at com.businessobjects.report.web.event.bw.broadcast(SourceFile:93)
        at com.businessobjects.report.web.event.am.a(SourceFile:53)
        at com.businessobjects.report.web.a.t.if(SourceFile:2104)
        at com.businessobjects.report.web.e.a(SourceFile:300)
        at com.businessobjects.report.web.e.a(SourceFile:202)
        at com.businessobjects.report.web.e.a(SourceFile:135)
        at com.crystaldecisions.report.web.ServerControl.a(SourceFile:607)
        at com.crystaldecisions.report.web.ServerControl.processHttpRequest(Sour
ceFile:342)
        at com.crystaldecisions.report.web.viewer.taglib.ServerControlTag.doEndT
ag(SourceFile:45)
        at com.crystaldecisions.report.web.viewer.taglib.ReportServerControlTag.
doEndTag(SourceFile:74)
        at org.apache.jsp.CrystalReport1_002dviewer_jsp._jspx_meth_crviewer_view
er_0(org.apache.jsp.CrystalReport1_002dviewer_jsp:108)
        at org.apache.jsp.CrystalReport1_002dviewer_jsp._jspService(org.apache.j
sp.CrystalReport1_002dviewer_jsp:60)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:322)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
14)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:173)
        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
lter.java:81)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:178)
        at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrinc
ipalValve.java:39)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
yAssociationValve.java:153)
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
e.java:59)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:148)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:856)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:744)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
int.java:527)
        at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
kerThread.java:112)
        at java.lang.Thread.run(Thread.java:619)

 

Thanks & regards,

Mohammed Masiuddin

jsf reportPageViewer shows report data in "View page source", but not on webpage

Using JSF 2.2.5, a remote crystal report application server 2011.

 

I got around a problem with the parameter prompts where the OK button wouldn't do anything by setting the parameters in the code like so:

                parameterFields="#{reports.parameterFields}"

 

This, and entering in database logon info manually or in code got me to the point where the report viewer is displayed, but the 'page' appears blank, like so:
Image may be NSFW.
Clik here to view.
soma.jpg

 

Yet if one views the page source, the report data is there:

 

  report viewer goes here:   <form id="reportviewer" name="reportviewer" method="post" action="/Janus/reports.xhtml" enctype="application/x-www-form-urlencoded"><input type="hidden" name="reportviewer" value="reportviewer" /><link rel="stylesheet" type="text/css" href="crystalreportviewers/js/crviewer/images/style.css"> <script type="text/javascript" language="JavaScript"> <!-- 

crv_config = {"lang":"en","needFallback":true,"useAsync":true} 

//--> </script> <script language="JavaScript" src="crystalreportviewers/js/crviewer/crv.js"></script> <script type="text/javascript" language="JavaScript"> <!-- 

if (typeof bobj == 'undefined') {

  document.write(  '<STYLE type=\"text/css\">' +  '.crExceptionBorder {background-color: #A3A3BC;}' +  '.crExceptionHeader {background-color: #E4E4EC; color: black; font-family: Arial; font-weight: bold; font-size: 11pt;}' +  '.crExceptionElement {background-color: #E4E4EC; border-top:1px solid #FFFFFF;}' +  '.crExceptionText {color: black; font-family: Arial; font-size: 11pt;}' +  '</STYLE>' +  '<table class=\"crExceptionBorder\" width=\"100%\" cellspacing=1 cellpadding=0 border=0>' +  ' <tr><td class=\"crExceptionHeader\">The viewer was unable to find the resources required to render the report.</td></tr>' +  ' <tr><td>' +  ' <table width=\"100%\" border=0 cellpadding=5 cellspacing=0>' +  ' <tr><td class=\"crExceptionElement\">' +  ' <table border=0 cellpadding=5 cellspacing=0>' +  ' <tr><td><span class=\"crExceptionText\">Please check the following to resolve the issue.<br>1. Verify that crystalreportviewers/ is accessible to your WebApp and is the correct path to the viewer resources.<br>2. You may customize this location by altering the crystal_image_uri and crystal_image_use_relative properties in the web.xml.<br>3. Validate that the file crv.js exists at crystalreportviewers/js/crviewer/crv.js.</span></td></tr>' +  ' </table>' +  ' </td></tr>' +  ' </table>' +  ' </td></tr>' +  '</table>' )

}

 

//--> </script> <script type="text/javascript" language="JavaScript"> <!-- 

bobj.crv.writeWidget({"args":{"id":"CrystalViewer","visualStyle":{"height":"750px","width":"1000px","left":"0px","top":"0px"},"layoutType":"fixed"},"children":[{"args":{"id":"CrystalViewer_toptoolbar"},"children":[{"args":{"isDisabled":false,"id":"CrystalViewer_toptoolbar_export"},"cons":"bobj.crv.newExportButton"},{"args":{"isDisabled":false,"id":"CrystalViewer_toptoolbar_print"},"cons":"bobj.crv.newPrintButton"},{"cons":"bobj.crv.newToolbarSeparator"},{"args":{"id":"CrystalViewer_toptoolbar_panel"},"cons":"bobj.crv.newPanelToggleButton"},{"args":{"id":"CrystalViewer_toptoolbar_grouptree"},"cons":"bobj.crv.newGroupTreeToggleButton"},{"cons":"bobj.crv.newToolbarSeparator"},{"args":{"id":"CrystalViewer_toptoolbar_firstPg"},"cons":"bobj.crv.newFirstPageButton"},{"args":{"id":"CrystalViewer_toptoolbar_prevPg"},"cons":"bobj.crv.newPrevPageButton"},{"args":{"id":"CrystalViewer_toptoolbar_selectPg","curPage":1,"numPages":"1"},"cons":"bobj.crv.newSelectPageControl"},{"args":{"id":"CrystalViewer_toptoolbar_nextPg"},"cons":"bobj.crv.newNextPageButton"},{"args":{"id":"CrystalViewer_toptoolbar_lastPg"},"cons":"bobj.crv.newLastPageButton"},{"cons":"bobj.crv.newToolbarSeparator"},{"args":{"id":"CrystalViewer_toptoolbar_refresh"},"cons":"bobj.crv.newRefreshButton"},{"args":{"id":"CrystalViewer_toptoolbar_zoom","initialZoom":85},"cons":"bobj.crv.newZoomControl"},{"args":{"id":"CrystalViewer_toptoolbar_logo","layoutAlign":"right"},"cons":"bobj.crv.newLogoButton"},{"cons":"bobj.crv.newToolbarSeparator"},{"args":{"id":"CrystalViewer_toptoolbar_search","searchText":""},"cons":"bobj.crv.newSearchTextControl"}],"cons":"bobj.crv.newToolbar"},{"args":{"id":"CrystalViewer_printUI","isActxPrinting":false},"cons":"bobj.crv.newPrintUI"},{"args":{"id":"CrystalViewer_exportUI","availableFormats":[{"name":"Crystal Reports (RPT)","value":"CrystalReports"},{"name":"PDF","value":"PDF"},{"name":"Microsoft Excel (97-2003)","value":"MSExcel"},{"name":"Microsoft Excel (97-2003) Data-Only","value":"RecordToMSExcel"},{"name":"Microsoft Word (97-2003)","value":"MSWord"},{"name":"Microsoft Word (97-2003) - Editable","value":"EditableRTF"},{"name":"Rich Text Format (RTF)","value":"RTF"},{"name":"Separated Values (CSV)","value":"CharacterSeparatedValues"},{"name":"XML","value":"XML"}],"canSupportRange":true},"cons":"bobj.crv.newExportUI"},{"args":{"displayDrilldownTab":true,"initTabIdx":0},"children":[{"args":{"isMainReport":true,"label":"Main Report","viewStateId":"1"},"children":[{"args":{"content":"\r\n<style> div.crystalstyle div {position:absolute; z-index:25}\r\n div.crystalstyle a {text-decoration:none}\r\n div.crystalstyle a img {border-style:none; border-width:0}\r\n\t.fc1405538317513-0 {font-size:8pt;color:#000000;font-family:Arial;font-weight:normal;}\r\n\t.fc1405538317513-1 {font-size:15pt;color:#000000;font-family:Arial;font-weight:normal;}\r\n\t.fc1405538317513-2 {font-size:6pt;color:#000000;font-family:Arial;font-weight:normal;text-decoration:underline;}\r\n\t.fc1405538317513-3 {font-size:6pt;color:#000000;font-family:Arial;font-weight:normal;}\r\n\t.fc1405538317513-4 {font-size:8pt;color:#000000;font-family:Arial;font-weight:bold;}\r\n\t.ad1405538317513-0 {border-color:#000000;border-left-width:0;border-right-width:0;border-top-width:0;border-bottom-width:0;}\r\n<\/style><div id=\"CrystalViewercridreportpage\" name=\"CrystalViewercridreportpage\" class=\"crystalstyle\" style=\"width:652;height:856;position:absolute;visibility:hidden;\"><div style=\"z-index:15;top:251px;left:14px;border-color:#000000;border-style:solid;border-width:0px;border-top-width:1px;width:639px;\"><\/div>\r\n<div style=\"z-index:3;clip:rect(0px,653px,95px,0px);top:0px;left:0px;width:653px;height:95px;\"><\/div>\r\n<div class=\"ad1405538317513-0\" style=\"top:0px;left:0px;width:295px;height:34px;\"><img src=\"CrystalReportViewerHandler?dynamicimage=crystal14055383175307535459024881645798.png\" border=\"0\" width=\"295px\" height=\"34px\"><\/div>\r\n<div class=\"ad1405538317513-0\" style=\"top:34px;left:0px;width:279px;height:13px;\"><div style=\"position:relative;padding-top:1px;padding-left:1px;line-height:1.0;\"><div style=\"position:relative;\"><span class=\"fc1405538317513-0\">S0010 - Transfer Details <\/span><\/div><\/div><\/div>\r\n<div class=\"ad1405538317513-0\" style=\"top:75px;left:0px;width:279px;height:14px;\"><div style=\"position:relative;padding-top:1px;padding-left:1px;line-height:1.0;\"><div style=\"position:relative;\"><span class=\"fc1405538317513-0\">Store #: <\/span><\/div><\/div><\/div>\r\n<div class=\"ad1405538317513-0\" style=\"top:61px;left:0px;width:319px;height:13px;\"><div style=\"position:relative;padding-top:1px;padding-left:1px;line-height:1.0;\"><div style=\"position:relative;\"><span class=\"fc1405538317513-0\">Report Printed: 7/16/2014 at 12:18:34PM<\/span><\/div><\/div><\/div>\r\n<div class=\"ad1405538317513-0\" style=\"top:48px;left:0px;width:605px;height:13px;\"><div style=\"position:relative;\"><span class=\"fc1405538317513-0\">Report For Period: 07/01/2014 To 07/01/2014<\/span><\/div><\/div>\r\n<div style=\"z-index:3;clip:rect(0px,653px,31px,0px);top:95px;left:0px;width:653px;height:31px;\"><\/div>\r\n<div class=\"ad1405538317513-0\" style=\"top:95px;left:0px;width:456px;height:31px;\"><div style=\"position:relative;padding-top:1px;padding-left:1px;line-height:1.0;\"><div style=\"position:relative;\"><span class=\"fc1405538317513-1\">DEPARTMENT: <\/span><\/div><\/div><\/div>\r\n<div style=\"z-index:3;clip:rect(0px,653px,20px,0px);top:125px;left:0px;width:653px;height:20px;\"><\/div>\r\n<div style=\"z-index:3;clip:rect(0px,653px,13px,0px);top:146px;left:0px;width:653px;height:13px;\"><\/div>\r\n<div style=\"z-index:3;clip:rect(0px,653px,26px,0px);top:158px;left:0px;width:653px;height:26px;\"><\/div>\r\n<div class=\"ad1405538317513-0\" style=\"top:158px;left:41px;width:51px;height:14px;\"><div style=\"position:relative;padding-top:1px;padding-left:1px;line-height:1.0;\"><div style=\"position:relative;\"><span class=\"fc1405538317513-2\">DATE<\/span><\/div><\/div><\/div>\r\n<div class=\"ad1405538317513-0\" style=\"top:158px;left:163px;width:41px;height:14px;\"><div align=\"right\" style=\"position:relative;padding-top:1px;padding-left:1px;line-height:1.0;\"><div style=\"position:relative;\"><span class=\"fc1405538317513-2\">CONF #<\/span><\/div><\/div><\/div>\r\n<div class=\"ad1405538317513-0\" style=\"top:158px;left:306px;width:116px;height:14px;\"><div align=\"right\" style=\"position:relative;padding-top:1px;padding-left:1px;line-height:1.0;\"><div style=\"position:relative;\"><span class=\"fc1405538317513-2\">SUBTOTAL<\/span><\/div><\/div><\/div>\r\n<div class=\"ad1405538317513-0\" style=\"top:158px;left:102px;width:46px;height:14px;\"><div style=\"position:relative;padding-top:1px;padding-left:1px;line-height:1.0;\"><div style=\"position:relative;\"><span class=\"fc1405538317513-2\">TIME<\/span><\/div><\/div><\/div>\r\n<div class=\"ad1405538317513-0\" style=\"top:158px;left:258px;width:130px;height:14px;\"><div style=\"position:relative;padding-top:1px;padding-left:1px;line-height:1.0;\"><div style=\"position:relative;\"><span class=\"fc1405538317513-2\">TM NAME<\/span><\/div><\/div><\/div>\r\n<div class=\"ad1405538317513-0\" style=\"top:158px;left:211px;width:44px;height:14px;\"><div style=\"position:relative;padding-top:1px;padding-left:1px;line-height:1.0;\"><div style=\"position:relative;\"><span class=\"fc1405538317513-2\">TM ID<\/span><\/div><\/div><\/div>\r\n<div style=\"z-index:3;clip:rect(0px,653px,27px,0px);top:185px;left:0px;width:653px;height:27px;\"><\/div>\r\n<div class=\"ad1405538317513-0\" style=\"top:198px;left:57px;width:421px;height:14px;\"><div style=\"position:relative;padding-top:1px;padding-left:1px;line-height:1.0;\"><div style=\"position:relative;\"><span class=\"fc1405538317513-3\">Destination: /SUPPLY<\/span><\/div><\/div><\/div>\r\n<div class=\"ad1405538317513-0\" style=\"top:185px;left:57px;width:421px;height:14px;\"><div style=\"position:relative;padding-top:1px;padding-left:1px;line-height:1.0;\"><div style=\"position:relative;\"><span class=\"fc1405538317513-3\">Source: /SUPPLY<\/span><\/div><\/div><\/div>\r\n<div style=\"z-index:3;clip:rect(0px,653px,14px,0px);top:212px;left:0px;width:653px;height:14px;\"><\/div>\r\n<div class=\"ad1405538317513-0\" style=\"top:212px;left:57px;width:421px;height:14px;\"><div style=\"position:relative;padding-top:1px;padding-left:1px;line-height:1.0;\"><div style=\"position:relative;\"><span class=\"fc1405538317513-3\"> - <\/span><\/div><\/div><\/div>\r\n<div style=\"z-index:3;clip:rect(0px,653px,12px,0px);top:226px;left:0px;width:653px;height:12px;\"><\/div>\r\n<div style=\"z-index:3;clip:rect(0px,653px,14px,0px);top:237px;left:0px;width:653px;height:14px;\"><\/div>\r\n<div class=\"ad1405538317513-0\" style=\"top:237px;left:102px;width:319px;height:14px;\"><div align=\"right\" style=\"position:relative;padding-top:1px;padding-left:1px;line-height:1.0;\"><div style=\"position:relative;\"><span class=\"fc1405538317513-4\">SubTotal: <\/span><\/div><\/div><\/div>\r\n<div style=\"z-index:3;clip:rect(0px,653px,13px,0px);top:251px;left:0px;width:653px;height:13px;\"><\/div>\r\n<div style=\"z-index:3;clip:rect(0px,653px,13px,0px);top:263px;left:0px;width:653px;height:13px;\"><\/div>\r\n<div style=\"z-index:3;clip:rect(0px,653px,35px,0px);top:276px;left:0px;width:653px;height:35px;\"><\/div>\r\n<div style=\"z-index:3;clip:rect(0px,653px,38px,0px);top:819px;left:0px;width:653px;height:38px;\"><\/div>\r\n<\/div>","bottomMargin":20,"height":857,"rightMargin":20,"width":653,"leftMargin":20,"documentView":"PrintLayout","topMargin":20},"cons":"bobj.crv.newReportPage"},{"args":{"width":"200.0px","initialViewType":"GroupTree"},"children":[{"args":{"label":"Group Tree","enableDrilldown":false,"enableNavigation":true,"toolPanelType":"GroupTree"},"cons":"bobj.crv.newGroupTree"},{"args":{"label":"Interactive Parameters"},"cons":"bobj.crv.params.newParameterPanel"}],"cons":"bobj.crv.newToolPanel"}],"cons":"bobj.crv.newReportView"}],"cons":"bobj.crv.newReportAlbum"},{"cons":"bobj.crv.newReportProcessingUI"}],"cons":"bobj.crv.newViewer"}); 

//--> </script> <script type="text/javascript" language="JavaScript"> <!-- 

bobj.crv.stateManager.setComponentState('CrystalViewer',{"1":{"gpTreeCurrentExpandedPaths":{},"rptViewLabel":"Main Report","gpTreeLastExpandedPath":"","lstPgNum":1,"isLstPgNumKn":true,"pageNum":1},"common":{"rptAlbumOrder":["1"],"enblDrllDwn":false,"zoom":85,"width":1000,"allowOverflow":false,"paramOpts":{"numberFormat":{"decimalSeperator":".","groupSeperator":","},"dateTimeFormat":"M/d/yyyy HH:mm:ss","timeFormat":"HH:mm:ss","dateFormat":"M/d/yyyy","booleanFormat":{"false":"False","true":"True"},"maxNumParameterDefaultValues":200},"screenResolution":96,"productLocale":"en_US","resourcePrefix":"crystalreportviewers/","toolPanelType":"GroupTree","RptSrcFacName":"com.crystaldecisions.sdk.occa.report.application.reportsourcefactory.RasReportSourceFactory","iactParams":[{"isOptionalPrompt":false,"_usage":57,"allowNullValue":false,"isDataFetching":true,"allowMultiValue":true,"allowDiscreteValue":true,"defaultValues":[],"description":"Select store","value":[103610],"valueDataType":"n","attributes":{"IsDCP":true,"PGURI":"eor://BERLIN-B.owfg.com:6400/AXDYjQVqqKxJpFxfC5SWpec"},"allowRangeValue":false,"allowCustomValue":false,"paramName":"Store","isEditable":true,"defaultDisplayType":0}],"height":750,"servletUri":"CrystalReportViewerHandler","reqCtx":{"logOnInfo":"PENyeXN0YWxSZXBvcnRzLkNvbm5lY3Rpb25JbmZvcyB4bWxucz0iaHR0cDovL3d3dy5jcnlzdGFs\r\nZGVjaXNpb25zLmNvbS9yZXBvcnQiIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9Y\r\nTUxTY2hlbWEtaW5zdGFuY2UiIHhtbG5zOnhzZD0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxT\r\nY2hlbWEiIHhzaTp0eXBlPSJDcnlzdGFsUmVwb3J0cy5Db25uZWN0aW9uSW5mb3MiIHZlcnNpb249\r\nIjIiPjxDb25uZWN0aW9uSW5mbyB4c2k6dHlwZT0iQ3J5c3RhbFJlcG9ydHMuQ29ubmVjdGlvbklu\r\nZm8iIGlkPSIxIj48VXNlck5hbWU+c2ltX3JwdDwvVXNlck5hbWU+PFBhc3N3b3JkPnowMDA3N0Zd\r\nWlNcQjRAQDAwPC9QYXNzd29yZD48QXR0cmlidXRlcyB4c2k6dHlwZT0iQ3J5c3RhbFJlcG9ydHMu\r\nUHJvcGVydHlCYWciIGlkPSIyIj48UHJvcGVydHk+PE5hbWU+RGF0YWJhc2UgTmFtZTwvTmFtZT48\r\nVmFsdWUgVmFyaWFudFR5cGU9IlN0cmluZyI+PC9WYWx1ZT48L1Byb3BlcnR5PjxQcm9wZXJ0eT48\r\nTmFtZT5TZXJ2ZXIgTmFtZTwvTmFtZT48VmFsdWUgVmFyaWFudFR5cGU9IlN0cmluZyI+U0lNUlBU\r\nMV9OQVRJVkUuT1dGRy5DT008L1ZhbHVlPjwvUHJvcGVydHk+PC9BdHRyaWJ1dGVzPjxLaW5kPlNR\r\nTDwvS2luZD48L0Nvbm5lY3Rpb25JbmZvPjwvQ3J5c3RhbFJlcG9ydHMuQ29ubmVjdGlvbkluZm9z\r\nPg==","prptInfo":"<CrystalReports.Fields xmlns=\"http://www.crystaldecisions.com/report\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xsi:type=\"CrystalReports.Fields\" version=\"2\"><Field xsi:type=\"CrystalReports.ParameterField\" id=\"1\"><Name>Department<\/Name><Description><\/Description><Type>xsd:decimal<\/Type><Length>0<\/Length><Attributes xsi:type=\"CrystalReports.PropertyBag\" id=\"2\"><Property><Name>IsDCP<\/Name><Value VariantType=\"Boolean\">false<\/Value><\/Property><\/Attributes><AllowMultiValue>false<\/AllowMultiValue><CurrentValues xsi:type=\"CrystalReports.Values\" id=\"3\"><Value xsi:type=\"CrystalReports.ParameterFieldDiscreteValue\" id=\"4\"><Value VariantType=\"Double\">2209.0<\/Value><\/Value><IsNoValue>false<\/IsNoValue><\/CurrentValues><ParameterType>ReportParameter<\/ParameterType><AllowCustomCurrentValues>false<\/AllowCustomCurrentValues><AllowNullValue>false<\/AllowNullValue><DefaultValueSortOrder>NoSort<\/DefaultValueSortOrder><DefaultValueSortMethod>BasedOnValue<\/DefaultValueSortMethod><ValueRangeKind>Discrete<\/ValueRangeKind><Usage>DataFetching,InUse<\/Usage><DefaultValueDisplayType>DescriptionOnly<\/DefaultValueDisplayType><IsOptionalPrompt>false<\/IsOptionalPrompt><\/Field><Field xsi:type=\"CrystalReports.ParameterField\" id=\"5\"><Name>From_Date<\/Name><Description><\/Description><Type>xsd:date<\/Type><Length>0<\/Length><Attributes xsi:type=\"CrystalReports.PropertyBag\" id=\"6\"><Property><Name>IsDCP<\/Name><Value VariantType=\"Boolean\">false<\/Value><\/Property><\/Attributes><AllowMultiValue>false<\/AllowMultiValue><CurrentValues xsi:type=\"CrystalReports.Values\" id=\"7\"><Value xsi:type=\"CrystalReports.ParameterFieldDiscreteValue\" id=\"8\"><Value xsi:type=\"dateTime\">2014-7-1T0:0:0.0<\/Value><\/Value><IsNoValue>false<\/IsNoValue><\/CurrentValues><ParameterType>ReportParameter<\/ParameterType><AllowCustomCurrentValues>true<\/AllowCustomCurrentValues><AllowNullValue>false<\/AllowNullValue><DefaultValueSortOrder>NoSort<\/DefaultValueSortOrder><DefaultValueSortMethod>BasedOnValue<\/DefaultValueSortMethod><ValueRangeKind>Discrete<\/ValueRangeKind><Usage>DataFetching,InUse<\/Usage><DefaultValueDisplayType>DescriptionAndValue<\/DefaultValueDisplayType><IsOptionalPrompt>false<\/IsOptionalPrompt><\/Field><Field xsi:type=\"CrystalReports.ParameterField\" id=\"9\"><Name>To_Date<\/Name><Description><\/Description><Type>xsd:date<\/Type><Length>0<\/Length><Attributes xsi:type=\"CrystalReports.PropertyBag\" id=\"10\"><Property><Name>IsDCP<\/Name><Value VariantType=\"Boolean\">false<\/Value><\/Property><\/Attributes><AllowMultiValue>false<\/AllowMultiValue><CurrentValues xsi:type=\"CrystalReports.Values\" id=\"11\"><Value xsi:type=\"CrystalReports.ParameterFieldDiscreteValue\" id=\"12\"><Value xsi:type=\"dateTime\">2014-7-1T0:0:0.0<\/Value><\/Value><IsNoValue>false<\/IsNoValue><\/CurrentValues><ParameterType>ReportParameter<\/ParameterType><AllowCustomCurrentValues>true<\/AllowCustomCurrentValues><AllowNullValue>false<\/AllowNullValue><DefaultValueSortOrder>NoSort<\/DefaultValueSortOrder><DefaultValueSortMethod>BasedOnValue<\/DefaultValueSortMethod><ValueRangeKind>Discrete<\/ValueRangeKind><Usage>DataFetching,InUse<\/Usage><DefaultValueDisplayType>DescriptionAndValue<\/DefaultValueDisplayType><IsOptionalPrompt>false<\/IsOptionalPrompt><\/Field><\/CrystalReports.Fields>"},"reportSourceSessionID":"com.crystaldecisions.report.web.viewer.RPT_SRC:CrystalViewer1484296940","toolPanelWidth":200,"toolPanelWidthUnit":"px"},"curViewId":"1"}); 

//--> </script> <script type="text/javascript" language="JavaScript"> <!-- 

new bobj.crv.ViewerListener('CrystalViewer', new bobj.crv.FacesAdapter('reportviewer', 'CrystalReportViewerHandler')); 

//--> </script>   ^   <input type="hidden" name="javax.faces.ViewState" id="j_id1:javax.faces.ViewState:0" value="8699192975832549599:-7190272799067789315" autocomplete="off" /></form>

Two commands in the report using the same parameter - fail under Java

I have a report that contains 2 SQL commands.

Both of these commands use one parameter X of type Number in their 'WHERE' clause.

When i'm viewing the report in CR 2008, i'm asked for a value of this parameter and all data is filled in the report - OK

 

The problem occurs when the same report is printed through Crystal Java Runtime:

Report is printed without data! - it's empty.

 

What we noticed in the debug information thrown by the Crystal libraries is that parameter value is set only in one of these commands:

 

Original statement 1:

select a.something
from ANM_T a
where a.anmid = {?PARAMETER01Id}

 

Original statement 2:

SELECT * from ANM_T a
WHERE  a.anmid={?PARAMETER01Id}

 

 

OUTCOME of Statement 1:

 

select a.something

from ANM_T a

where a.anmid = 0

 

OUTCOME of Statement 2:

 

SELECT * from ANM_T a

WHERE  a.anmid=9825

 

 

In above example we may see that crystal set the value only in the second statement - first one got 0 - i suspect its some default value.

Parameter in the Java code is set in the right way. In case of using only one statement it works. If we use two separate parameters (whose values are equal ) it also works.

 

// we have also the loop over the parameters
...
ParameterFieldController paramFieldController =                report.getDataDefController().getParameterFieldController();

paramFieldController.setCurrentValue( "", paramName, paramValue );
...

 

What is strange for me is that Crystal Reports enables to use the same parameter in two commands but if you edit one of them you may change the type of this parameter for a command ( for example from Number to String) but the parameter type in the second command remains unchanged ( it's strange because in my opinion it is the same parameter). In the Field Explorer under the Parameter Fields i still see one parameter of type used in the second command.

JRCExportReport.java runtime error

I'm working with the sample code provided in the Java JRC Desktop Export Report Disk PDF.zip file. My goal is to expand on the code to develop a standalone desktop app to export reports to pdf. I'm using jar files from the crjava-runtime_12.2.213.zip file. The code compiles, however I receive the following runtime errors below. If someone could point me in the right direction that would be great. I'm running Red Hat Enterprise Linux 6.2 and the jdk1.6.0_31 jdk.

 

log4j:WARN No appenders could be found for logger (com.businessobjects.reports.sdk.JRCCommunicationAdapter).

log4j:WARN Please initialize the log4j system properly.

com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: java.lang.NullPointerException---- Error code:-2147467259 Error code name:failed

    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.if(SourceFile:237)

    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:147)

    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:128)

    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:111)

    at com.crystaldecisions.reports.sdk.PrintOutputController.export(SourceFile:54)

    at JRCExportReport.main(JRCExportReport.java:45)

Caused by: java.lang.NullPointerException

    at com.crystaldecisions.reports.exporters.format.page.pdf.fontembedding.opentype.OpenTypeFontManager.a(SourceFile:384)

    at com.crystaldecisions.reports.exporters.format.page.pdf.fontembedding.opentype.OpenTypeFontManager.do(SourceFile:259)

    at com.crystaldecisions.reports.exporters.format.page.pdf.fontembedding.opentype.OpenTypeFontManager.if(SourceFile:77)

    at com.crystaldecisions.reports.exporters.format.page.pdf.fontembedding.FontEmbeddingSession.if(SourceFile:101)

    at com.crystaldecisions.reports.exporters.format.page.pdf.fontembedding.FontEmbeddingSession.a(SourceFile:92)

    at com.crystaldecisions.reports.exporters.format.page.pdf.pdflib.r.a(SourceFile:591)

    at com.crystaldecisions.reports.exporters.format.page.pdf.pdflib.r.if(SourceFile:422)

    at com.crystaldecisions.reports.exporters.format.page.pdf.pdflib.PdfDocumentManager.a(SourceFile:332)

    at com.crystaldecisions.reports.exporters.format.page.pdf.dom.a.a(SourceFile:1422)

    at com.crystaldecisions.reports.exporters.format.page.pdf.dom.a.a(SourceFile:1377)

    at com.crystaldecisions.reports.exporters.format.page.pdf.dom.a.a(SourceFile:769)

    at com.crystaldecisions.reports.exporters.format.page.pdf.dom.a.a(SourceFile:718)

    at com.crystaldecisions.reports.exporters.format.page.pdf.dom.a.a(SourceFile:672)

    at com.crystaldecisions.reports.exporters.format.page.pdf.dom.a.if(SourceFile:622)

    at com.crystaldecisions.reports.exporters.format.page.pdf.dom.d.a(SourceFile:1950)

    at com.crystaldecisions.reports.exporters.format.page.pdf.dom.d.a(SourceFile:446)

    at com.crystaldecisions.reports.exporters.format.page.pdf.dom.d.byte(SourceFile:322)

    at com.crystaldecisions.reports.exporters.format.page.pdf.dom.d.a(SourceFile:302)

    at com.crystaldecisions.reports.exporters.format.page.pdf.dom.b.a(SourceFile:217)

    at com.crystaldecisions.reports.exporters.format.page.pdf.dom.PdfAdvancedDocumentModeller.a(SourceFile:177)

    at com.crystaldecisions.reports.exporters.page.pdf.AdobePDFExporter.a(SourceFile:252)

    at com.crystaldecisions.reports.exporters.page.pdf.AdobePDFExporter.processFormattedContent(SourceFile:200)

    at com.crystaldecisions.reports.formatter.export2.a.a(SourceFile:104)

    at com.crystaldecisions.reports.formatter.export2.a.a(SourceFile:247)

    at com.crystaldecisions.reports.formatter.export2.ExportSupervisorEx.if(SourceFile:642)

    at com.crystaldecisions.reports.formatter.export2.ExportSupervisorEx.a(SourceFile:586)

    at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.a(SourceFile:636)

    at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.int(SourceFile:672)

    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1944)

    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:661)

    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:167)

    at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:529)

    at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:527)

    at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(SourceFile:102)

    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(SourceFile:525)

    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(SourceFile:424)

    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(SourceFile:352)

    at com.businessobjects.sdk.erom.jrc.a.a(SourceFile:54)

    at com.businessobjects.sdk.erom.jrc.a.execute(SourceFile:67)

    at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(SourceFile:716)

    at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(SourceFile:125)

    at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:537)

    at com.crystaldecisions.sdk.occa.report.application.ds.a(SourceFile:186)

    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(SourceFile:1558)

    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(SourceFile:337)

    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.if(SourceFile:223)

    ... 5 more

What is J2EE Stack ?

Hi,

 

Anyone pls explain Wht exactly is J2EE Stack?

 

Regards,

Hari

Crystal Report Render o n JSP page

This is my third thread and so far I have received zero help from this forum, hope this time is different.

 

I have solve my previous problems by myself but I have a new one.

 

The JSP supposed to display de Crystal report I made is sending the following error when I call it:

 

The viewer was unable to find the resources required to render the report.

Please check the following to resolve the issue.

1. Verify that /crystalreportviewers12/ is accessible to your WebApp and is the correct path to the viewer resources.

2. You may customize this location by altering the crystal_image_uri and crystal_image_use_relative properties in the web.xml.

3. Validate that the file crv.js exists at /crystalreportviewers12/js/crviewer/crv.js.

 

I have check in other threads regarding this topic and I think I have followed  all  the suggestions I think.

 

All my web content is on the webApplication folder I have checked that the crystal reports folder is inside this folder:

 

My_Project/webApplication/crustalreportsviewers12

 

Also the crv.js exists in the specified path.

 

And here are the entrance I added to the web.xml file in WEB-INF

 

     <context-param>

          <param-name>crystal_image_uri</param-name>

          <param-value>/crystalreportviewers12</param-value>

     </context-param>

      

     <context-param>

          <param-name>crystal_image_use_relative</param-name>

          <param-value>webApplication</param-value>

     </context-param>

 

     <servlet-mapping>

         <servlet-name>CrystalReportViewerServlet</servlet-name>

         <url-pattern>/CrystalReportViewerHandler</url-pattern>

     </servlet-mapping>

 

     <servlet>

         <servlet-name>CrystalReportViewerServlet</servlet-name>

         <servlet-class>com.crystaldecisions.report.web.viewer.CrystalReportViewerServlet</servlet-class>

     </servlet>

 

I even added the crystal-tags-reportviewer.tld file inside the WEB-INF directory

 

And I still getting that rendering error.

 

Anymore suggestions on what could be wrong?

 

I'm workin on MyEclipse 7.5, Tomcat 6.0 and Crystal Reports 2008

 

Thanks in advance.

 

Edited by: bsosaj on Jul 30, 2010 4:04 PM


Could not add Stored Procedure to a Report Eclipse

I am using Crystal Reports for Eclipse. In which I have a requirement to add Stored Procedure to the report, so in short.. when the report is called it executes the stored procedure and loads the report based on the parameters.

 

From the Data Source Explorer I can add tables / Views .. but I am not able to add a stored procedure (I use crystal reports with visual studio and could be able to add the stored procedure).. in this below picture I am trying to add the procudure name APS_RESULTSET but there is no Crystal Reports option when I right click on the stored procedure. (is there any crystal reports eclipse patch is required to add this stored procedure?)

 

Image may be NSFW.
Clik here to view.
Crystal Option.png

 

Since I could not added the stored procedure and desgin the report in java.. I used visual studio and designed the report..! and I copied the same report in to my java project and try to change the data source but could not change the datasource as the stored procedure is not listing in the available objects please see below figure..!

 

Image may be NSFW.
Clik here to view.
Crystal Option22.png

So I am wondering of any of you have come across to this kind of situation and had a solution.

 

 

Thanks,

crystal report of label size is not printing correctly

Hi,

 

 

we have interated  crystal report CR4E version with our application and facing 2 issue when i am generating crystal reports from application.

 

 

we are  having a crystal report designed for label size. 

 

 

1.

 

While generate the report from application with output as a pdf browser and print to label printer (DYMO Label Writer 400) all the records(for example:7) are getting printed in a single label .

 

when the same report is generated from crystal report software and print to label printer (DYMO prinetr 400) all the records (For example:7 records) it is printing  each record per page (for example :7 pages).

 

 

 

 

2.

 

When i am generating crystal report of label size from my application and  getting the binary data . When  i am sending this binary data to a label printer(DYMO Label writer 400) i am getting an exception "printer's imageable width is too small".

 

 

 

i am using CR4E crystal report version and java 1.5 verison.The paper size of the label printer (DYMO label Writer 400)" 30252 Address"

 

 

 

can any one please help me on this issues.

 

 

Advacne thanks

 

Rajesh

How to switch database connection at runtime in crystal reports using java swing

Please help. I am developing a swing application that can open reports made using crystal reports xi. What Im trying to do is to open a report and pass the connection info to that report so that I can dynamically change the database of the report. But for some reason it is not working and the report still produces the information from the database that it was initially set up. Can someone please tell me what I did wrong?  Btw when I try using  com.crystaldecisions.sdk.occa.report.application.ReportClientDocument, I get a server not found error. But when I try to use import com.crystaldecisions.reports.sdk.ReportClientDocument; It's not working. I am not sure what a report server is and I dont think I set it up on my computer. Please help. Here is my code:

 

import com.crystaldecisions.sdk.occa.report.application.ReportClientDocument;
ReportClientDocument rpt =  new ReportClientDocument();        rpt.open(reportPath+fileName, 0);        Fields fields = null;                IConnectionInfo connInfo = rpt.getDatabaseController().getConnectionInfos(null).getConnectionInfo(0);                 PropertyBag innerProp = connInfo.getAttributes();            innerProp.clear();                        PropertyBag propertyBag = new PropertyBag();            propertyBag.put("Server Type", "JDBC (JNDI)");            propertyBag.put("Database DLL", "crdb_jdbc.dll");            propertyBag.put("Database Class Name", "com.mysql.jdbc.Driver");            propertyBag.put("Use JDBC", "true");            propertyBag.put("Server Name", DBConnect.getServer());            propertyBag.put("Generic JDBC Driver Behavior", "No");            propertyBag.put("URI", "!com.mysql.jdbc.Driver!jdbc:mysql://"+DBConnect.getServer()+":"+DBConnect.getPort()+"/"+DBConnect.getDatabase()+"!ServerType=29!QuoteChar=`");                    connInfo.setAttributes(innerProp);            connInfo.setPassword(DBConnect.getPassword());            connInfo.setUserName(DBConnect.getUsername());                                                        int replaceParams = DBOptions._ignoreCurrentTableQualifiers + DBOptions._doNotVerifyDB;        rpt.getDatabaseController().replaceConnection(rpt.getDatabaseController().getConnectionInfos(null).getConnectionInfo(0), connInfo, fields, replaceParams);

Howto deactivate PerformanceMonitor

Hello,

 

we are developing an eclipse RCP-Application with crystal to show some reports. We have analysed the memory usage of the application and found a nasty issue. After opening und closing some reports we found an instance of the class com.businessobjects.performancemonitoring.PerformanceMonitorholding objects with a total size of 200MB (e.g. ReportDocuments).

How can we disable the performance monitor? And if thats not possible what can we do to free the memory?

Image may be NSFW.
Clik here to view.
PerformanceMonitor.png

Best regards,

Guido

Unexpected ValueType---- Error code:-2147467259 Error code name:failed

Hi

<br/>

I am having problems with getting SQL Server to work with the JRC (crystal4eclipse). The problem only occcurs when I used the sqljdbc4.jar with java 6. If I used the sqljdbc.jar with java 5 it works fine.

<br/>

<br/>

 

 

 

Caused by: com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Unexpected ValueType---- Error code:-2147467259 Error code name:failed     at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(Unknown Source)     at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(Unknown Source)     at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(Unknown Source)     at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(Unknown Source)     at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(Unknown Source)     at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(Unknown Source)     at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(Unknown Source)     at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)     at com.businessobjects.sdk.erom.jrc.a.a(Unknown Source)     at com.businessobjects.sdk.erom.jrc.a.execute(Unknown Source)     at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(Unknown Source)     at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(Unknown Source)     at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(Unknown Source)     at com.crystaldecisions.sdk.occa.report.application.ds.a(Unknown Source)     at com.crystaldecisions.sdk.occa.report.application.an.a(Unknown Source)     at com.crystaldecisions.sdk.occa.report.application.b0.if(Unknown Source)     at com.crystaldecisions.sdk.occa.report.application.b0.b(Unknown Source)     at com.crystaldecisions.sdk.occa.report.application.bb.int(Unknown Source)     at com.crystaldecisions.proxy.remoteagent.UndoUnitBase.performDo(Unknown Source)     at com.crystaldecisions.proxy.remoteagent.UndoUnitBase.a(Unknown Source)     at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(Unknown Source)     at com.crystaldecisions.sdk.occa.report.application.DatabaseController.byte(Unknown Source)     at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(Unknown Source)     at com.crystaldecisions.sdk.occa.report.application.DatabaseController.setTableLocation(Unknown Source)     at com.crystaldecisions.reports.sdk.DatabaseController.setTableLocation(Unknown Source)     at com.ieseries.spc.report.crystal.jrc.JRCReport.setSQLServerConnectionInfo(JRCReport.java:475)     at com.ieseries.spc.report.crystal.jrc.JRCReport.setDatabaseConnectionInfo(JRCReport.java:358)     at com.ieseries.spc.report.crystal.jrc.JRCReport.openReport(JRCReport.java:148)     ... 10 more
Caused by: java.lang.IllegalArgumentException: Unexpected ValueType     at com.crystaldecisions.reports.common.Utils.a(Unknown Source)     at com.crystaldecisions.reports.common.Utils.a(Unknown Source)     at com.businessobjects.reports.sdk.builder.ConnectionDatabaseBuilder.a(Unknown Source)     at com.businessobjects.reports.sdk.builder.ConnectionDatabaseBuilder.a(Unknown Source)     at com.businessobjects.reports.sdk.builder.EROMDatabaseBuilder.a(Unknown Source)     at com.businessobjects.reports.sdk.requesthandler.DatabaseRequestHandler.byte(Unknown Source)     at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(Unknown Source)     ... 38 more

 

Viewing all 893 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>