SubreportClientDocument.DatabaseController.SetDataSource problem
This is a Windows application that uses RAS.
Here is a code snippet:
Dim rasDataset As ISCRDataSet
rasDataset = DataSetConverter.Convert(dsProject)
boSubreportClientDocument.DatabaseController.SetDataSource(rasDataset)
When I try to set the datasource, I get "The document has no tables"
All the data tables required for the report to run are in the dsProject.
Why do subreports need their dataset converted? The main reportdocument.SetDatasource takes a normal .net system.data.dataset ...but the SetDataSource on subreports need to be type ISCRDataSet ...is this true?
The report being used as a subreport references tables. If I run the report as a standalone report, it works fine.
Thanks,
Jeff
Hello Jeff,
the code below does not use RAS but demonstrates how to pass Datasets to main and subreports in VB.NET.
Please see if it is of any use for you.
Thanks
Falk
'Purpose: This Visual Basic .NET sample Windows application demonstrates how to
' pass a same dataset to the main report and the subreport
''All of these assemblies are required to be able to
''access, load, and set database logon.
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports System.Data
Imports System.Data.OleDb
Public Class Form1
Inherits System.Windows.Forms.Form
Dim crReportDocument As New CrystalReport1()
Dim crOledbConnection As OleDbConnection
Dim crOledbDataAdapter As OleDbDataAdapter
Dim ds As DataSet
Dim crSections As Sections
Dim crSection As Section
Dim crReportObjects As ReportObjects
Dim crReportObject As ReportObject
Dim crSubreportObject As SubreportObject
Dim crSubReportDoc As ReportDocument
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
'Connection information to connect to the database server to retrieve data
'This is connecting to SQL server through OLEDB
Dim ConnectionString As String = ""
ConnectionString = "Provider=SQLOLEDB;"
ConnectionString += "Server=Server1;Database=Pubs;"
ConnectionString += "User ID=myuser;Password=mypassword"
crOledbConnection = New OleDbConnection(ConnectionString)
Dim sqlString As String = ""
sqlString = "Select * From authors"
crOledbDataAdapter = New OleDbDataAdapter(sqlString, crOledbConnection)
ds = New DataSet()
'Fill up the dataset
crOledbDataAdapter.Fill(ds, "authors")
'Set the datasource for the main report
crReportDocument.Database.Tables(0).SetDataSource(ds)
'Go through each sections in the main report and identify the subreport
'by name
crSections = crReportDocument.ReportDefinition.Sections
For Each crSection In crSections
crReportObjects = crSection.ReportObjects
For Each crReportObject In crReportObjects
If crReportObject.Kind = ReportObjectKind.SubreportObject Then
crSubreportObject = CType(crReportObject, SubreportObject)
crSubReportDoc = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName)
'Once the correct subreport has been located pass it the
'appropriate dataset
If crSubReportDoc.Name = "FirstSub" Then
crSubReportDoc.Database.Tables(0).SetDataSource(ds)
End If
End If
Next
Next
CrystalReportViewer1.ReportSource = crReportDocument
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents CrystalReportViewer1 As CrystalDecisions.Windows.Forms.CrystalReportViewer
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.CrystalReportViewer1 = New CrystalDecisions.Windows.Forms.CrystalReportViewer()
Me.SuspendLayout()
'CrystalReportViewer1
Me.CrystalReportViewer1.ActiveViewIndex = -1
Me.CrystalReportViewer1.Dock = System.Windows.Forms.DockStyle.Fill
Me.CrystalReportViewer1.Name = "CrystalReportViewer1"
Me.CrystalReportViewer1.ReportSource = Nothing
Me.CrystalReportViewer1.Size = New System.Drawing.Size(292, 273)
Me.CrystalReportViewer1.TabIndex = 0
'Form1
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 273)
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.CrystalReportViewer1})
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)
End Sub
#End Region
End Class
Similar Messages
-
Crystal Reports for VS 2010 SetDataSource Problem
Hi guys, I am trying to pass a dataset table to Crystal report in run time by using: rptDocument.SetDataSource(DTS)
problem is the report is showing many records and not records that are relevant to the data source I have set.
I assume it shows data form design time mode.
HOw do I prevent that and only show data from dataset please?You can't open the link or you can't find a sample? Lots in there, look for: csharp_win_adodotnet.zip.
You can also use RAS which is much more powerful and preferred report engine, and you can use both, here's one way to use it:
private void SetData_Click(object sender, EventArgs e)
string connString = "Provider=SQLOLEDB;Data Source=dwcb12003;Database=xtreme;User ID=sb;Password=pw";
string sqlString = "Select * From Orders";
OleDbConnection oleConn = new OleDbConnection(connString);
OleDbDataAdapter oleAdapter = new OleDbDataAdapter(sqlString, oleConn);
DataTable dt1 = new DataTable("Orders");
oleAdapter.Fill(dt1);
System.Data.DataSet ds = new System.Data.DataSet();
ds.Tables.Add(dt1);
//ds.WriteXml("c:
CrystalReports
sc.xml"); // if you want to use XML.
ISCRDataSet DS1 = (ISCRDataSet) CrystalDecisions.ReportAppServer.DataSetConversion.DataSetConverter.Convert(ds);
// uses this for the OLE DB DS record set
rptClientDoc.DatabaseController.SetDataSource(DS1, "Orders", "Orders");
MessageBox.Show("Data Source Set", "RAS", MessageBoxButtons.OK, MessageBoxIcon.Information);
Thank you
Don -
JRC 2: Performance Problem
Hi.
Our reporting component used JRC 1.x before we upgraded to JRC 2.x. We got two issues after upgrading.
First issue I solved already with a workaround which I published on stackoverflow.com. (1) Does anyone knows where I will find the issue management system to report this issue?
Second issue occurs big performance problem within our project. We opened a report with 6 subreports (which includes 1 upto 3 tables) in 2-4 seconds using JRC 1. If we will open same report using JRC 2, we wait upto 60 seconds.
This methods requires more time with JRC 2 comparing to JRC 1:
ReportClientDocument#open(String, int);
SubreportController#setTableLocation(String, ITable, ITable)
DatabaseController#setTableLocation(ITable, ITable)
Each invocation of one of these methods requires 2-4 seconds.
Thank you in advance.
Best regards
Thomas
(1) http://stackoverflow.com/questions/479405/replace-a-database-connection-for-subreports-with-jrchello ....
my report is ''crystal report 11'' => "OLE DB" => "Add Command(select * from table) " .
code(JRC) : eclipse + crystal report for eclipse version 2 => "cr4e-all-in-one-win_2.0.1.zip"
<%@ page contentType="text/html; charset=UTF-8"
import="
com.crystaldecisions.report.web.viewer.CrystalReportViewer,
com.crystaldecisions.reports.sdk.ReportClientDocument,
com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase,
java.sql.Connection,
java.sql.DriverManager,
java.sql.ResultSet,
java.sql.SQLException,
java.sql.Statement" %>
<%
try {
String reportName = "report.rpt";
ReportClientDocument clientDoc = new ReportClientDocument();
clientDoc.open(reportName, 0);
String tableAlias = "Command";
clientDoc.getDatabaseController().setDataSource(myResult("SELECT * FROM table"), tableAlias,tableAlias);
CrystalReportViewer crystalReportPageViewer = new CrystalReportViewer();
crystalReportPageViewer.setReportSource(clientDoc.getReportSource());
crystalReportPageViewer.processHttpRequest(request, response, application, null);
} catch (ReportSDKExceptionBase e) {
e.printStackTrace();
out.println(e);
%>
I simplified the code, *myResult("SELECT * FROM table") * is absolutely no problem ,
and this code is absolutely no problem in the "crystal report for eclipse "version 1
but in version 2 run error:
com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: u7121u6CD5u9810u671Fu7684u8CC7u6599u5EABu9023u7DDAu5668u932Fu8AA4---- Error code:-2147467259 Error code name:failed
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(Unknown Source)
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.ReportClientDocument.if(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.new(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.b9.onDataSourceChanged(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.setDataSource(Unknown Source)
at org.apache.jsp.No_005f1.Eclipse_005fJTDS_005fSQL2005_005fTable_002dviewer_jsp._jspService(Eclipse_005fJTDS_005fSQL2005_005fTable_002dviewer_jsp.java:106)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
Caused by: com.crystaldecisions.reports.common.QueryEngineException: u7121u6CD5u9810u671Fu7684u8CC7u6599u5EABu9023u7DDAu5668u932Fu8AA4
at com.crystaldecisions.reports.queryengine.Connection.bf(Unknown Source)
at com.crystaldecisions.reports.queryengine.Rowset.z3(Unknown Source)
at com.crystaldecisions.reports.queryengine.Rowset.bL(Unknown Source)
at com.crystaldecisions.reports.queryengine.Rowset.zM(Unknown Source)
at com.crystaldecisions.reports.queryengine.Connection.a(Unknown Source)
at com.crystaldecisions.reports.queryengine.Table.a(Unknown Source)
at com.crystaldecisions.reports.queryengine.Table.if(Unknown Source)
at com.crystaldecisions.reports.queryengine.Table.try(Unknown Source)
at com.crystaldecisions.reports.queryengine.Table.a(Unknown Source)
at com.crystaldecisions.reports.queryengine.Table.u7(Unknown Source)
at com.crystaldecisions.reports.datafoundation.DataFoundation.a(Unknown Source)
at com.crystaldecisions.reports.dataengine.dfadapter.DFAdapter.a(Unknown Source)
at com.crystaldecisions.reports.dataengine.dfadapter.CheckDatabaseHelper.a(Unknown Source)
at com.crystaldecisions.reports.dataengine.datafoundation.CheckDatabaseCommand.new(Unknown Source)
at com.crystaldecisions.reports.common.CommandManager.a(Unknown Source)
at com.crystaldecisions.reports.common.Document.a(Unknown Source)
at com.crystaldecisions.reports.dataengine.VerifyDatabaseCommand.new(Unknown Source)
at com.crystaldecisions.reports.common.CommandManager.a(Unknown Source)
at com.crystaldecisions.reports.common.Document.a(Unknown Source)
at com.businessobjects.reports.sdk.requesthandler.f.a(Unknown Source)
at com.businessobjects.reports.sdk.requesthandler.DatabaseRequestHandler.a(Unknown Source)
at com.businessobjects.reports.sdk.requesthandler.DatabaseRequestHandler.if(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(Unknown Source)
... 39 more
Please help me and tell me why.... -
Problems deploying PSE 9 with SCCM - "unknown software exception"
Hy!
I've read the Silent Installations Instructions in the Knowlage Base (http://kb2.adobe.com/cps/861/cpsid_86149.html) and tested it on a test computer with this commandline (install.bat):
@echo off
start /wait C:\PSE9\Setup.exe /UL1031 /V"SERIALNUMBER=1111-1111-1111-1111-1111-1111 COUNTRY=14"
My "application.xml.override":
<?xml version="1.0" encoding="utf-8"?>
<Configuration>
<Payload>
<Data key="EULADelay">0</Data>
<Data key="EULA">Suppress</Data>
<Data key="Registration">Suppress</Data>
<Data key="Updates">Suppress</Data>
</Payload>
</Configuration>
My part of "setup.ini":
[OEM]
OEM=
SERIALNUMBER=
DISABLEEMSFEATURES=1
DISABLEOLSFEATURES=1
WATCHSERVICE=0
MANUAL=
REBOOT=
On a local Installation the Installation works fine without any Error.
Now, I'm trying to deploy PSE 9 on 10 test computers using SCCM. SCCM commandline was: Setup.exe /UL1031 /V"SERIALNUMBER=1111-1111-1111-1111-1111-1111 COUNTRY=14"
SCCM shows that the Installation ends with an error.
I'd looked on the testclients and every Client showed an "unknown software exception" on setup.exe:
"Setup.exe - Error in application; The exception "unknown software exception" (0x000000d) happend in application in place of 0x004195cf.
Here is a screenshot of this errormessage:
After I logged into the Client there is the Desktop Icon of PSE. I'm not really sure if the installation is finished successfully when this error occur.
Somebody knows a solution?
Big Thanks for Help.
GreetingsAfter further try and error, using the following alternative method of setting a dataset works:
CrystalDecisions.ReportAppServer.DataDefModel.ISCRDataSet crDataset = CrystalDecisions.ReportAppServer.DataSetConversion.DataSetConverter.Convert(m_XmlInfo.CustomDataSet);
report.ReportClientDocument.DatabaseController.SetDataSource(crDataset, string.Empty, string.Empty); -
Crystal Reports in JSP web application
Hi,
I am using crystal report in my jsp application...
Now there is a problem with me. I want use more than one tables in the report.
The report is working with single table when i am calling from jsp.
When i am using two or three queries i cannot pull the report..
I am taking the two tables from crystal report as follows
String tableName = reportClientDocument.getDatabaseController().getDatabase().getTables().getTable(0).getName();
String tableName1 = reportClientDocument.getDatabaseController().getDatabase().getTables().getTable(1).getName();
And i am getting the names of the tables used in reports..
But when i am setting the data source i am getting exception in the second line....
reportClientDocument.getDatabaseController().setDataSource(resultSet, tableName , "Command");
reportClientDocument.getDatabaseController().setDataSource(resultSet1, tableName1 , "Command_1");
The exception is as follows....
java.lang.NullPointerException com.crystaldecisions.reports.reportengineinterface.a.a.a.getTables(Unknown Source) com.crystaldecisions.reports.sdk.DatabaseController.setDataSource(Unknown Source) org.apache.jsp.crdemo.filename_jsp._jspService(org.apache.jsp.crdemo.filename_jsp:118)
Plz help me to solve this............Hi,
I am using crystal report in my jsp application...
Now there is a problem with me. I want use more than one tables in the report.
The report is working with single table when i am calling from jsp.
When i am using two or three queries i cannot pull the report..
I am taking the two tables from crystal report as follows
String tableName = reportClientDocument.getDatabaseController().getDatabase().getTables().getTable(0).getName();
String tableName1 = reportClientDocument.getDatabaseController().getDatabase().getTables().getTable(1).getName();
And i am getting the names of the tables used in reports..
But when i am setting the data source i am getting exception in the second line....
reportClientDocument.getDatabaseController().setDataSource(resultSet, tableName , "Command");
reportClientDocument.getDatabaseController().setDataSource(resultSet1, tableName1 , "Command_1");
The exception is as follows....
java.lang.NullPointerException com.crystaldecisions.reports.reportengineinterface.a.a.a.getTables(Unknown Source) com.crystaldecisions.reports.sdk.DatabaseController.setDataSource(Unknown Source) org.apache.jsp.crdemo.filename_jsp._jspService(org.apache.jsp.crdemo.filename_jsp:118)
Plz help me to solve this............ -
VM crash when calling crystal report in java
=======
REPOST
=======
We experience a serious problem when try to develop a crystal report application that run at Sun Solaris 10. Our program is to export pdf from crystal report. The program will always got VM crash when open the crystal report or export the crystal report (but it's not 100% happened, it will always happen when we second time open the same report). I got no problem when run my program in the windows XP. May anyone help on it?
Below see the coding and the VM crash message:
reportDocument = new ReportClientDocument();
reportDocument.open(mSummaryReportName, 0);
String query = " SELECT BRCH_RPT_SUMM.NM_BRIEF_ACC, BRCH_RPT_SUMM.NM_PRAD, BRCH_RPT.DT_VAL_CURR, BRCH_RPT_SUMM.CD_ACC, BRCH_RPT_SUMM.NM_SHRT_ACC, BRCH_RPT_SUMM.IN_FUD_BRCH_WRN, BRCH_RPT_SUMM.CD_BTCH, BRCH_RPT_SUMM.ID_PRSN, BRCH_RPT_SUMM.CD_PRTR, BRCH_RPT_SUMM.IN_BRCH_SPRS " +
"FROM COMPLIANCE.BRCH_RPT BRCH_RPT INNER JOIN COMPLIANCE.BRCH_RPT_SUMM BRCH_RPT_SUMM ON ((BRCH_RPT.CD_BTCH=BRCH_RPT_SUMM.CD_BTCH) AND (BRCH_RPT.ID_PRSN=BRCH_RPT_SUMM.ID_PRSN)) AND (BRCH_RPT.CD_PRTR=BRCH_RPT_SUMM.CD_PRTR) " +
" WHERE BRCH_RPT_SUMM.IN_BRCH_SPRS='N' " +
"AND BRCH_RPT.cd_btch = '" + mBtchCd + "' " +
"and BRCH_RPT.cd_prtr = '" + mPrtrCd + "' " +
" and BRCH_RPT.id_prsn = " + mPrsnId;
Statement statement = mDb.getConnection().createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
String tableAlias = reportDocument.getDatabaseController().getDatabase().getTables().getTable(0).getAlias();
ResultSet resultSet = statement.executeQuery(query);
reportDocument.getDatabaseController().setDataSource(resultSet, tableAlias , "resultsetTable");
byteArrayInputStream = (ByteArrayInputStream)reportDocument.getPrintOutputController().export(ReportExportFormat.PDF);
//Use the Java I/O libraries to write the exported content to the file system.
byteArray = new bytehttp://byteArrayInputStream.available();
//Create a new file that will contain the exported result.
file = new File(mReportExportPath);
fileOutputStream = new FileOutputStream(file);
byteArrayOutputStream = new ByteArrayOutputStream(byteArrayInputStream.available());
x = byteArrayInputStream.read(byteArray, 0, byteArrayInputStream.available());
byteArrayOutputStream.write(byteArray, 0, x);
byteArrayOutputStream.writeTo(fileOutputStream);
statement.close();
resultSet.close();
byteArrayInputStream.close();
byteArrayOutputStream.close();
fileOutputStream.close();
reportDocument.close();
An unexpected error has been detected by HotSpot Virtual Machine:
Internal Error (53484152454432554E54494D450E43505001A8 01), pid=28689, tid=1
Java VM: Java HotSpot(TM) Server VM (1.5.0_13-b05 mixed mode)
T H R E A D
Current thread (0x000386f0): JavaThread "main" threadin_Java, id=1
Stack: [0xffb7e000,0xffc00000), sp=0xffbfc690, free space=505k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V http://libjvm.so+0x70c3c4
V http://libjvm.so+0x4383b4
V http://libjvm.so+0x2fbde0
V http://libjvm.so+0x274bf4
C http://libthread.so.1+0x15bb4
C http://libthread.so.1+0xf80c
C http://libthread.so.1+0xf9bc
j java.util.HashMap.removeEntryForKey(Ljava/lang/Object;)Ljava/util/HashMap$Entry;+119
j java.util.HashMap.remove(Ljava/lang/Object;)Ljava/lang/Object;+2
j com.crystaldecisions.reports.reportdefinition.kv.a(Lcom/crystaldecisions/reports/queryengine/af;Lcom/crystaldecisions/reports/queryengine/af;Z)V+135
j com.crystaldecisions.reports.reportdefinition.datainterface.g.a(Lcom/crystaldecisions/reports/queryengine/ch;Lcom/crystaldecisions/reports/queryengine/ch;ZZ)V+229
j com.crystaldecisions.reports.reportdefinition.datainterface.g.a(Lcom/crystaldecisions/reports/queryengine/ch;Lcom/crystaldecisions/reports/queryengine/ch;ZZLcom/crystaldecisions/reports/queryengine/b/w;)V+235
j com.crystaldecisions.reports.reportdefinition.datainterface.g.a(Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;Lcom/crystaldecisions/reports/reportdefinition/datainterface/a;)V+682
j com.crystaldecisions.reports.dataengine.bj.new()V+24
j com.crystaldecisions.reports.common.as.a(Lcom/crystaldecisions/reports/common/af;)V+96
j com.crystaldecisions.reports.common.ae.a(Lcom/crystaldecisions/reports/common/l;)V+20
j com.businessobjects.reports.sdk.b.w.a(Lcom/crystaldecisions/reports/reportdefinition/bi;Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;)V+207
j com.businessobjects.reports.sdk.b.w.int(Lcom/crystaldecisions/sdk/occa/report/lib/PropertyBag;Ljava/lang/String;)V+231
j com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(IILjava/lang/String;Lcom/crystaldecisions/client/helper/ISecurityContext;Lcom/crystaldecisions/xml/serialization/IXMLSerializable;)Lcom/crystaldecisions/proxy/remoteagent/ResultInfo;+3326
j com.crystaldecisions.proxy.remoteagent.x.a(Lcom/crystaldecisions/client/helper/ISecurityContext;Ljava/lang/String;IILcom/crystaldecisions/xml/serialization/IXMLSerializable;Lcom/crystaldecisions/proxy/remoteagent/j;)Lcom/crystaldecisions/proxy/remoteagent/ResultInfo;+70
j com.crystaldecisions.proxy.remoteagent.q.a(IILcom/crystaldecisions/xml/serialization/IXMLSerializable;Lcom/crystaldecisions/proxy/remoteagent/j;)Lcom/crystaldecisions/proxy/remoteagent/ResultInfo;+83
j com.crystaldecisions.sdk.occa.report.application.dd.a(IILcom/crystaldecisions/xml/serialization/IXMLSerializable;)Lcom/crystaldecisions/proxy/remoteagent/ResultInfo;+44
j com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;)V+284
j com.crystaldecisions.sdk.occa.report.application.DatabaseController.setDataSource(Ljava/sql/ResultSet;Ljava/lang/String;Ljava/lang/String;)V+5
j com.crystaldecisions.reports.sdk.DatabaseController.setDataSource(Ljava/sql/ResultSet;Ljava/lang/String;Ljava/lang/String;)V+7
j com.jpmorgan.awm.jfam.ptc.reporting.AnalysisExporter.exportReport()V+157
j com.jpmorgan.awm.jfam.ptc.reporting.EODReport.main([Ljava/lang/String;)V+744
v ~StubRoutines::call_stub
V http://libjvm.so+0x19b514
V http://libjvm.so+0x2dd44c
C java0x222c main0x1164This is a problem of the VM itself. You will need to address the issue at SUN forums.
-
VM crash when calling crystal report in java (Unix)
We experience a serious problem when try to develop a crystal report application that run at Sun Solaris 9. Our program is to export pdf from crystal report. The program will always got VM crash when open the crystal report (but it's not 100% happened, it will always happen when we second time open the same report). I got no problem when run my program in the windows XP or another unix machine of Solaris 8. The report path is correct, but don't know why it will crash when open the report. May anyone help on it?
Below see the system log:
Jul 8 09:32:05 prospero genunix: [ID 269049 kern.notice] NOTICE: java[23499] at
tempt to execute non-executable data at 0x0 by uid 65639
Jul 8 09:33:04 prospero genunix: [ID 269049 kern.notice] NOTICE: java[23720] at
tempt to execute non-executable data at 0x0 by uid 65639
Jul 8 09:36:07 prospero genunix: [ID 269049 kern.notice] NOTICE: java[24335] at
tempt to execute non-executable data at 0x0 by uid 65639
Below see the java coding and the VM crash message:
reportDocument = new ReportClientDocument();
reportDocument.open(mSummaryReportName, 0); <=== always crash here
String query = " SELECT BRCH_RPT_SUMM.NM_BRIEF_ACC, BRCH_RPT_SUMM.NM_PRAD, BRCH_RPT.DT_VAL_CURR, BRCH_RPT_SUMM.CD_ACC, BRCH_RPT_SUMM.NM_SHRT_ACC, BRCH_RPT_SUMM.IN_FUD_BRCH_WRN, BRCH_RPT_SUMM.CD_BTCH, BRCH_RPT_SUMM.ID_PRSN, BRCH_RPT_SUMM.CD_PRTR, BRCH_RPT_SUMM.IN_BRCH_SPRS " +
"FROM COMPLIANCE.BRCH_RPT BRCH_RPT INNER JOIN COMPLIANCE.BRCH_RPT_SUMM BRCH_RPT_SUMM ON ((BRCH_RPT.CD_BTCH=BRCH_RPT_SUMM.CD_BTCH) AND (BRCH_RPT.ID_PRSN=BRCH_RPT_SUMM.ID_PRSN)) AND (BRCH_RPT.CD_PRTR=BRCH_RPT_SUMM.CD_PRTR) " +
" WHERE BRCH_RPT_SUMM.IN_BRCH_SPRS='N' " +
"AND BRCH_RPT.cd_btch = '" + mBtchCd + "' " +
"and BRCH_RPT.cd_prtr = '" + mPrtrCd + "' " +
" and BRCH_RPT.id_prsn = " + mPrsnId;
Statement statement = mDb.getConnection().createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
String tableAlias = reportDocument.getDatabaseController().getDatabase().getTables().getTable(0).getAlias();
ResultSet resultSet = statement.executeQuery(query);
reportDocument.getDatabaseController().setDataSource(resultSet, tableAlias , "resultsetTable");
byteArrayInputStream = (ByteArrayInputStream)reportDocument.getPrintOutputController().export(ReportExportFormat.PDF);
//Use the Java I/O libraries to write the exported content to the file system.
byteArray = new bytehttp://byteArrayInputStream.available();
//Create a new file that will contain the exported result.
file = new File(mReportExportPath);
fileOutputStream = new FileOutputStream(file);
byteArrayOutputStream = new ByteArrayOutputStream(byteArrayInputStream.available());
x = byteArrayInputStream.read(byteArray, 0, byteArrayInputStream.available());
byteArrayOutputStream.write(byteArray, 0, x);
byteArrayOutputStream.writeTo(fileOutputStream);
statement.close();
resultSet.close();
byteArrayInputStream.close();
byteArrayOutputStream.close();
fileOutputStream.close();
reportDocument.close();
An unexpected error has been detected by HotSpot Virtual Machine:
Internal Error (53484152454432554E54494D450E43505001A8 01), pid=28689, tid=1
Java VM: Java HotSpot(TM) Server VM (1.5.0_13-b05 mixed mode)
T H R E A D
Current thread (0x000386f0): JavaThread "main" threadin_Java, id=1
Stack: [0xffb7e000,0xffc00000), sp=0xffbfc690, free space=505k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V http://libjvm.so+0x70c3c4
V http://libjvm.so+0x4383b4
V http://libjvm.so+0x2fbde0
V http://libjvm.so+0x274bf4
C http://libthread.so.1+0x15bb4
C http://libthread.so.1+0xf80c
C http://libthread.so.1+0xf9bc
j java.util.HashMap.removeEntryForKey(Ljava/lang/Object;)Ljava/util/HashMap$Entry;+119
j java.util.HashMap.remove(Ljava/lang/Object;)Ljava/lang/Object;+2
j com.crystaldecisions.reports.reportdefinition.kv.a(Lcom/crystaldecisions/reports/queryengine/af;Lcom/crystaldecisions/reports/queryengine/af;Z)V+135
j com.crystaldecisions.reports.reportdefinition.datainterface.g.a(Lcom/crystaldecisions/reports/queryengine/ch;Lcom/crystaldecisions/reports/queryengine/ch;ZZ)V+229
j com.crystaldecisions.reports.reportdefinition.datainterface.g.a(Lcom/crystaldecisions/reports/queryengine/ch;Lcom/crystaldecisions/reports/queryengine/ch;ZZLcom/crystaldecisions/reports/queryengine/b/w;)V+235
j com.crystaldecisions.reports.reportdefinition.datainterface.g.a(Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;Lcom/crystaldecisions/reports/reportdefinition/datainterface/a;)V+682
j com.crystaldecisions.reports.dataengine.bj.new()V+24
j com.crystaldecisions.reports.common.as.a(Lcom/crystaldecisions/reports/common/af;)V+96
j com.crystaldecisions.reports.common.ae.a(Lcom/crystaldecisions/reports/common/l;)V+20
j com.businessobjects.reports.sdk.b.w.a(Lcom/crystaldecisions/reports/reportdefinition/bi;Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;)V+207
j com.businessobjects.reports.sdk.b.w.int(Lcom/crystaldecisions/sdk/occa/report/lib/PropertyBag;Ljava/lang/String;)V+231
j com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(IILjava/lang/String;Lcom/crystaldecisions/client/helper/ISecurityContext;Lcom/crystaldecisions/xml/serialization/IXMLSerializable;)Lcom/crystaldecisions/proxy/remoteagent/ResultInfo;+3326
j com.crystaldecisions.proxy.remoteagent.x.a(Lcom/crystaldecisions/client/helper/ISecurityContext;Ljava/lang/String;IILcom/crystaldecisions/xml/serialization/IXMLSerializable;Lcom/crystaldecisions/proxy/remoteagent/j;)Lcom/crystaldecisions/proxy/remoteagent/ResultInfo;+70
j com.crystaldecisions.proxy.remoteagent.q.a(IILcom/crystaldecisions/xml/serialization/IXMLSerializable;Lcom/crystaldecisions/proxy/remoteagent/j;)Lcom/crystaldecisions/proxy/remoteagent/ResultInfo;+83
j com.crystaldecisions.sdk.occa.report.application.dd.a(IILcom/crystaldecisions/xml/serialization/IXMLSerializable;)Lcom/crystaldecisions/proxy/remoteagent/ResultInfo;+44
j com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;)V+284
j com.crystaldecisions.sdk.occa.report.application.DatabaseController.setDataSource(Ljava/sql/ResultSet;Ljava/lang/String;Ljava/lang/String;)V+5
j com.crystaldecisions.reports.sdk.DatabaseController.setDataSource(Ljava/sql/ResultSet;Ljava/lang/String;Ljava/lang/String;)V+7
j com.jpmorgan.awm.jfam.ptc.reporting.AnalysisExporter.exportReport()V+157
j com.jpmorgan.awm.jfam.ptc.reporting.EODReport.main([Ljava/lang/String;)V+744
v ~StubRoutines::call_stub
V http://libjvm.so+0x19b514
V http://libjvm.so+0x2dd44c
C java0x222c main0x1164According to the documentation for interpreting hotspot logs, the following can be determined from yours:
"An unexpected error has been detected by HotSpot Virtual Machine:
Internal Error (53484152454432554E54494D450E43505001A8 01), pid=28689, tid=1
Java VM: Java HotSpot(TM) Server VM (1.5.0_13-b05 mixed mode)"
When the HotSpot VM generates an internal error it is referring to a line of code in your application. The hexidecimal string is encoding the source module and line number where the error occurs.
"Current thread (0x000386f0): JavaThread "main" threadin_Java, id=1"
Essentially means that the JavaThread is running interpreted or compiled code when the error occurs.
The rest of the hotspot identifies what the thread has done up to this point.... even though to you it appears that it fails on the open method, it looks like it is actually failing after the setDataSource method call.
I would suggest that you look at other logs, ie: application server logs, Solaris message logs, database logs to see if you can identify where things actually fall apart. The first place to start would be the database connectivity because it appears that is the last thing that gets generated in the log file. -
Subsequent SubReports overwriting earlier parameters
For some reason any subreports that I add overwrite the parameters of the earlier subreports that are added.
I have tried renaming the report name, this happens with totally different subreports... the last one is the only
one that the parameters stick. I get prompted to enter all previous parameters from all but the last subreport.
Here is a simple code snippet that just adds a subreport twice and I get prompted for the first
subreport parameters: (I normally am not running the same report more than once with the same values,
this is only for example purposes)
Try
Dim intNewSection As Integer = 0
Dim boReportDocument As ReportDocument
Dim boReportClientDocument As ISCDReportClientDocument
Dim boSubreportClientDocument As CrystalDecisions.ReportAppServer.Controllers.SubreportClientDocument
Dim boArea As CrystalDecisions.ReportAppServer.ReportDefModel.Area
Dim boSection As CrystalDecisions.ReportAppServer.ReportDefModel.Section
Dim sarSubRptFile(1) As String
Dim strSubRptFile As String
sarSubRptFile(0) = Application.StartupPath & "\Reports\Selected Checklist.rpt"
sarSubRptFile(1) = Application.StartupPath & "\Reports\Selected Checklist.rpt"
boReportDocument = New ReportDocument()
boReportDocument.Load(strReportFilespec)
boReportClientDocument = New ReportClientDocumentClass()
boReportDocument.SetDataSource(dsProject) 'Point the crystal report at the System.Data.DataSet
boReportClientDocument = boReportDocument.ReportClientDocument
For Each strSubRptFile In sarSubRptFile
'Get the detail area from the report
boArea = boReportClientDocument.ReportDefController.ReportDefinition.DetailArea
'Create the new section object
boSection = New CrystalDecisions.ReportAppServer.ReportDefModel.Section
'Set the properties for the section
boSection.Kind = CrystalDecisions.ReportAppServer.ReportDefModel.CrAreaSectionKindEnum.crAreaSectionKindDetail
boSection.Name = "CustomDetailSection" & CStr(intNewSection) 'Give it a unique name
intNewSection += 1
Dim boTestReportDocument As ReportDocument
boTestReportDocument = New ReportDocument()
boTestReportDocument.Load(strSubRptFile)
Dim intSubRptWidth As Integer = boTestReportDocument.ReportClientDocument.ReportDefController.ReportDefinition.PageHeaderArea.Sections(0).Width
boTestReportDocument.Close()
boTestReportDocument = Nothing
boSection.Width = intSubRptWidth
'Add the section to the clientdocument
boReportClientDocument.ReportDefController.ReportSectionController.Add(boSection, boArea, -1)
'Import the sub report with a unique name
boSubreportClientDocument = boReportClientDocument.SubreportController.ImportSubreport( _
Chr(intNewSection) & Path.GetFileNameWithoutExtension(strSubRptFile), strSubRptFile, boSection)
Try
Dim rasDataset As ISCRDataSet
rasDataset = DataSetConverter.Convert(dsProject)
boSubreportClientDocument.DatabaseController.SetDataSource(rasDataset)
Catch exData As Exception
MsgBox("Error setting data to " & strSubRptFile & vbLf _
& "Error: " & exData.ToString, MsgBoxStyle.Information, "Group Report Error")
End Try
boReportClientDocument.DataDefController.ParameterFieldController.SetCurrentValue( _
boSubreportClientDocument.Name, "lowerid", "1a9b-4628-87b1-3026582e0dd6")
Next
CrystalReportViewer1.ReportSource = boReportDocument
CrystalReportViewer1.Show()
Catch exTest As Exception
End Try
Does anyone have any idea what I am doing wrong - why is the subreport parameters getting blown away on all but the last subreport.. This happens even if the parameter names are different.
Thanks,
JeffThanks Trevor,
It turns out that if I remark out these lines, the parameters start working. I'm not sure what they have to do with the parameters, but it seams to do the trick... now I need to figure out how to update the DataSource without messing up the parameters.
Here is the code that is messing up the parameters:
Dim rasDataset As ISCRDataSet
rasDataset = DataSetConverter.Convert(dsProject) 'dsProject is a .net dataset that is coming into this report
boSubreportClientDocument.DatabaseController.SetDataSource(rasDataset)
This works fine if I am not using parameters on more than one subreport... but if I use parameters on more than one subreport, only the last ones work and I get prompted for all earlier subreports.
Thanks,
Jeff -
JRC - Error when trying to set datasource using resultsets greater than 1
Hi
I have one report and 2 subreports. All the reports use resultsets. At runtime the report fails when I try to set more than one result set. It works if I set one result set.
Please advise asap
thank you
selvi
FATAL - Request failed and JRC Command failed to be undone
ERROR - JRCAgent9 detected an exception: Cannot modify a read-only collection.
at com.crystaldecisions.reports.common.e.a.clear(Unknown Source)
at com.crystaldecisions.reports.common.e.e.clear(Unknown Source)
at com.crystaldecisions.reports.queryengine.ax.for(Unknown Source)
at com.crystaldecisions.reports.queryengine.at.if(Unknown Source)
at com.crystaldecisions.reports.reportdefinition.datainterface.a.a(Unknown Source)
at com.crystaldecisions.reports.reportdefinition.datainterface.a.a(Unknown Source)
at com.crystaldecisions.reports.reportdefinition.datainterface.a.a(Unknown Source)
at com.crystaldecisions.reports.reportdefinition.datainterface.g.a(Unknown Source)
at com.crystaldecisions.reports.dataengine.bj.new(Unknown Source)
at com.crystaldecisions.reports.common.as.a(Unknown Source)
at com.crystaldecisions.reports.common.ae.a(Unknown Source)
at com.businessobjects.reports.sdk.b.w.a(Unknown Source)
at com.businessobjects.reports.sdk.b.w.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.proxy.remoteagent.g.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.setDataSource(Unknown Source)
at com.crystaldecisions.reports.sdk.DatabaseController.setDataSource(Unknown Source)
Edited by: Jason Everly on Aug 15, 2008 10:06 AM
Title was being interpretted by forums and resulted in unusable titleI was running into this same problem and found what is either a workaround or a solution. I have a XIr2 report that I defined to use a single Java Beans Connectivity connection, and 2 resultsets from this connection as the datasources ( i.e. MyReportDatasource.getResultSet1() and MyReportDatasource.getResultSet2() ). When I tried running my app, which was using JRC to populate the report datasources, I would get that 'Cannot modify a read-only collection' exception when I called getDatabaseController().setDataSource() on the second resultset.
To get past the error, I had to redefine the second resultset in the report as coming from a different JBC connection, so the end result was the report using 2 resultsets that come from 2 different JBC connections ( i.e. MyReportDataSource.getResultSet() and MySecondReportDataSource.getResultSet() ). When I did this, the report ran successfully. It looks like JRC doesn't like it when you to use multiple resultsets from the same JBC connection. -
ReportSDKServerException, Error code:-2147483648
<p>Hi there,</p><p> I'm currently facing a problem with this piece of code:</p><pre><font face="courier new,courier"> ReportClientDocument clientDoc = new ReportClientDocument();<br /> clientDoc.setReportAppServer(ras);<br /> // Open report<br /> clientDoc.open(path, 0);<br /> clientDoc.getDatabaseController().setDataSource(rs, tableName, tableName + "_ResultSet");</font></pre><p> In the last line I get following exception thrown:</p><pre><font face="courier new,courier">com.crystaldecisions.sdkocca.report.lib.ReportSDKServerException: Kein Fehler.---- Error code:-2147483648 Error code name:failed<br /> at com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException.throwReportSDKServerException(Unknown Source)<br /> at com.crystaldecisions.proxy.remoteagent.s.a(Unknown Source)<br /> at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.if(Unknown Source)<br /> at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.do(Unknown Source)<br /> at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.verifyDatabase(Unknown Source)<br /> at com.crystaldecisions.sdk.occa.report.application.bd.onDataSourceChanged(Unknown Source)<br /> at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(Unknown Source)<br /> at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(Unknown Source)<br /> at com.crystaldecisions.sdk.occa.report.application.DatabaseController.setDataSource(Unknown Source)<br /> at de.szb.bt.service.reporting.reporting.ReportingServiceBean.passResultSet(ReportingServiceBean.java)<br /> at de.szb.bt.service.reporting.reporting.ReportingServiceBean.execute(ReportingServiceBean.java:109)</font><br /> </pre><p>I don't know what is wrong in my call. the ResultSet I'm using is of same shape as the original table when the report was designed. Has anybody a hint for this problem?</p><p> </p><p>Kind regards.</p><p>Kai </p>
Did you get any solution for this? Please let me know as I too face the same issue.
You can mail me at [email protected] -
How to create a report based on a DataSet programatically
I'm working on a CR 2008 Add-in.
Usage of this add-in is: Let the user choose from a list of predefined datasets, and create a totally empty report with this dataset attached to is. So the user can create a report based on this dataset.
I have a dataset in memory, and want to create a new report in cr2008.
The new report is a blank report (with no connection information).
If I set the ReportDocument.SetDataSource(Dataset dataSet) property, I get the error:
The report has no tables.
So I must programmatically define the table definition in my blank report.
I found the following article: https://boc.sdn.sap.com/node/869, and came up with something like this:
internal class NewReportWorker : Worker
public NewReportWorker(string reportFileName)
: base(reportFileName)
public override void Process()
DatabaseController databaseController = ClientDoc.DatabaseController;
Table table = new Table();
string tabelName = "Table140";
table.Name = tabelName;
table.Alias = tabelName;
table.QualifiedName = tabelName;
table.Description = tabelName;
var fields = new Fields();
var dbField = new DBField();
var fieldName = "ID";
dbField.Description = fieldName;
dbField.HeadingText = fieldName;
dbField.Name = fieldName;
dbField.Type = CrFieldValueTypeEnum.crFieldValueTypeInt64sField;
fields.Add(dbField);
dbField = new DBField();
fieldName = "IDLEGITIMATIEBEWIJS";
dbField.Description = fieldName;
dbField.HeadingText = fieldName;
dbField.Name = fieldName;
dbField.Type = CrFieldValueTypeEnum.crFieldValueTypeInt64sField;
fields.Add(dbField);
// More code for more tables to add.
table.DataFields = fields;
//CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo info =
// new CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo();
//info.Attributes.Add("Databse DLL", "xxx.dll");
//table.ConnectionInfo = info;
// Here an error occurs.
databaseController.AddTable(table, null);
ReportDoc.SetDataSource( [MyFilledDataSet] );
//object path = @"d:\logfiles\";
//ClientDoc.SaveAs("test.rpt", ref path, 0);
The object ClientDoc referes to a ISCDReportClientDocument in a base class:
internal abstract class Worker
private ReportDocument _ReportDoc;
private ISCDReportClientDocument _ClientDoc;
private string _ReportFileName;
public Worker(string reportFileName)
_ReportFileName = reportFileName;
_ReportDoc = new ReportDocument();
// Load the report from file path passed by the designer.
_ReportDoc.Load(reportFileName);
// Create a RAS Document through In-Proc RAS through the RPTDoc.
_ClientDoc = _ReportDoc.ReportClientDocument;
public string ReportFileName
get
return _ReportFileName;
public ReportDocument ReportDoc
get
return _ReportDoc;
public ISCDReportClientDocument ClientDoc
get
return _ClientDoc;
But I get an "Unspecified error" on the line databaseController.AddTable(table, null);
What am i doing wrong? Or is there another way to create a new report based on a DataSet in C# code?Hi,
Have a look at the snippet code below written for version 9 that you might accommodate to CR 2008, it demonstrates how to create a report based on a DataSet programmatically.
//=========================================================================
+ * the following two string values can be modified to reflect your system+
+ ************************************************************************************************/+
+ string mdb_path = "C:
program files
crystal decisions
crystal reports 9
samples
en
databases
xtreme.mdb"; // path to xtreme.mdb file+
+ string xsd_path = "C:
Crystal
rasnet
ras9_csharp_win_datasetreport
customer.xsd"; // path to customer schema file+
+ // Dataset+
+ OleDbConnection m_connection; // ado.net connection+
+ OleDbDataAdapter m_adapter; // ado.net adapter+
+ System.Data.DataSet m_dataset; // ado.net dataset+
+ // CR variables+
+ ReportClientDocument m_crReportDocument; // report client document+
+ Field m_crFieldCustomer;+
+ Field m_crFieldCountry;+
+ void CreateData()+
+ {+
+ // Create OLEDB connection+
+ m_connection = new OleDbConnection();+
+ m_connection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + mdb_path;+
+ // Create Data Adapter+
+ m_adapter = new OleDbDataAdapter("select * from Customer where Country='Canada'", m_connection);+
+ // create dataset and fill+
+ m_dataset = new System.Data.DataSet();+
+ m_adapter.Fill(m_dataset, "Customer");+
+ // create a schema file+
+ m_dataset.WriteXmlSchema(xsd_path);+
+ }+
+ // Adds a DataSource using dataset. Since this does not require intermediate schema file, this method+
+ // will work in a distributed environment where you have IIS box on server A and RAS Server on server B.+
+ void AddDataSourceUsingDataSet(+
+ ReportClientDocument rcDoc, // report client document+
+ System.Data.DataSet data) // dataset+
+ {+
+ // add a datasource+
+ DataSetConverter.AddDataSource(rcDoc, data);+
+ }+
+ // Adds a DataSource using a physical schema file. This method require you to have schema file in RAS Server+
+ // box (NOT ON SDK BOX). In distributed environment where you have IIS on server A and RAS on server B,+
+ // and you execute CreateData above, schema file is created in IIS box, and this method will fail, because+
+ // RAS server cannot see that schema file on its local machine. In such environment, you must use method+
+ // above.+
+ void AddDataSourceUsingSchemaFile(+
+ ReportClientDocument rcDoc, // report client document+
+ string schema_file_name, // xml schema file location+
+ string table_name, // table to be added+
+ System.Data.DataSet data) // dataset+
+ {+
+ PropertyBag crLogonInfo; // logon info+
+ PropertyBag crAttributes; // logon attributes+
+ ConnectionInfo crConnectionInfo; // connection info+
+ CrystalDecisions.ReportAppServer.DataDefModel.Table crTable;+
+ // database table+
+ // create logon property+
+ crLogonInfo = new PropertyBag();+
+ crLogonInfo["XML File Path"] = schema_file_name;+
+ // create logon attributes+
+ crAttributes = new PropertyBag();+
+ crAttributes["Database DLL"] = "crdb_adoplus.dll";+
+ crAttributes["QE_DatabaseType"] = "ADO.NET (XML)";+
+ crAttributes["QE_ServerDescription"] = "NewDataSet";+
+ crAttributes["QE_SQLDB"] = true;+
+ crAttributes["QE_LogonProperties"] = crLogonInfo;+
+ // create connection info+
+ crConnectionInfo = new ConnectionInfo();+
+ crConnectionInfo.Kind = CrConnectionInfoKindEnum.crConnectionInfoKindCRQE;+
+ crConnectionInfo.Attributes = crAttributes;+
+ // create a table+
+ crTable = new CrystalDecisions.ReportAppServer.DataDefModel.Table();+
+ crTable.ConnectionInfo = crConnectionInfo;+
+ crTable.Name = table_name;+
+ crTable.Alias = table_name;+
+ // add a table+
+ rcDoc.DatabaseController.AddTable(crTable, null);+
+ // pass dataset+
+ rcDoc.DatabaseController.SetDataSource(DataSetConverter.Convert(data), table_name, table_name);+
+ }+
+ void CreateReport()+
+ {+
+ int iField;+
+ // create ado.net dataset+
+ CreateData();+
+ // create report client document+
+ m_crReportDocument = new ReportClientDocument();+
+ m_crReportDocument.ReportAppServer = "127.0.0.1";+
+ // new report document+
+ m_crReportDocument.New();+
+ // add a datasource using a schema file+
+ // note that if you have distributed environment, you should use AddDataSourceUsingDataSet method instead.+
+ // for more information, refer to comments on these methods.+
+ AddDataSourceUsingSchemaFile(m_crReportDocument, xsd_path, "Customer", m_dataset);+
+ +
+ // get Customer Name and Country fields+
+ iField = m_crReportDocument.Database.Tables[0].DataFields.Find("Customer Name", CrFieldDisplayNameTypeEnum.crFieldDisplayNameName, CeLocale.ceLocaleUserDefault);+
+ m_crFieldCustomer = (Field)m_crReportDocument.Database.Tables[0].DataFields[iField];+
+ iField = m_crReportDocument.Database.Tables[0].DataFields.Find("Country", CrFieldDisplayNameTypeEnum.crFieldDisplayNameName, CeLocale.ceLocaleUserDefault);+
+ m_crFieldCountry = (Field)m_crReportDocument.Database.Tables[0].DataFields[iField];+
+ // add Customer Name and Country fields+
+ m_crReportDocument.DataDefController.ResultFieldController.Add(-1, m_crFieldCustomer);+
+ m_crReportDocument.DataDefController.ResultFieldController.Add(-1, m_crFieldCountry);+
+ // view report+
+ crystalReportViewer1.ReportSource = m_crReportDocument;+
+ }+
+ public Form1()+
+ {+
+ //+
+ // Required for Windows Form Designer support+
+ //+
+ InitializeComponent();+
+ // Create Report+
+ CreateReport();+
+ //+
+ // TODO: Add any constructor code after InitializeComponent call+
+ //+
+ }+//========================================================================= -
Can not run complex report with ReportClientDocument using POJO beans.
Hi All,
Any help would be very appreciated I have been stack on this issue for the last 4 hours.
My report has parameters, a ResultSet and subreports that themselves have both parameters and ResultSet.
The report runs well in Crystal Report Designer but not on my application with ReportClientDocument API.
The excpeiton I am getting is:
======================================================================
Caused by: java.lang.NullPointerException
16:22:56,796 INFO [STDOUT] at com.crystaldecisions.sdk.occa.report.application.ParameterFieldController.do(Unknown Source)
16:22:56,796 INFO [STDOUT] at com.crystaldecisions.sdk.occa.report.application.bs.a(Unknown Source)
16:22:56,796 INFO [STDOUT] at com.crystaldecisions.sdk.occa.report.application.bs.byte(Unknown Source)
16:22:56,796 INFO [STDOUT] at com.crystaldecisions.sdk.occa.report.application.a3.if(Unknown Source)
16:22:56,796 INFO [STDOUT] at com.crystaldecisions.proxy.remoteagent.r.a(Unknown Source)
16:22:56,796 INFO [STDOUT] at com.crystaldecisions.proxy.remoteagent.r.a(Unknown Source)
16:22:56,796 INFO [STDOUT] at com.crystaldecisions.proxy.remoteagent.r.a(Unknown Source)
16:22:56,796 INFO [STDOUT] at com.crystaldecisions.proxy.remoteagent.r.else(Unknown Source)
16:22:56,796 INFO [STDOUT] at com.crystaldecisions.proxy.remoteagent.r.for(Unknown Source)
16:22:56,796 INFO [STDOUT] at com.crystaldecisions.proxy.remoteagent.h.for(Unknown Source)
16:22:56,796 INFO [STDOUT] at com.crystaldecisions.sdk.occa.report.application.cf.a(Unknown Source)
16:22:56,796 INFO [STDOUT] at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(Unknown Source)
16:22:56,796 INFO [STDOUT] at com.crystaldecisions.sdk.occa.report.application.DatabaseController.setDataSource(Unknown Source)
16:22:56,796 INFO [STDOUT] at com.tramada.documents.businessobjects.BODocumentProvider.generateDocument(BODocumentProvider.java:178)
16:22:56,796 INFO [STDOUT] at com.tramada.documents.service.impl.DocumentServiceImpl.generateDocumentContent(DocumentServiceImpl.java:125)
16:22:56,796 INFO [STDOUT] ... 58 more
This is my class that is trying to do the work.:
======================================================================
BODocumentProvider.java Created on 19/05/2008
This software is the confidential and proprietary information of Tramada
Systems Pty Limited.
package com.tramada.documents.businessobjects;
import java.io.ByteArrayInputStream;
import java.util.List;
import java.util.Locale;
import com.businessobjects.samples.pojo.POJOResultSetFactory;
import com.crystaldecisions.sdk.framework.CrystalEnterprise;
import com.crystaldecisions.sdk.framework.IEnterpriseSession;
import com.crystaldecisions.sdk.occa.infostore.IInfoObject;
import com.crystaldecisions.sdk.occa.infostore.IInfoObjects;
import com.crystaldecisions.sdk.occa.infostore.IInfoStore;
import com.crystaldecisions.sdk.occa.managedreports.IReportAppFactory;
import com.crystaldecisions.sdk.occa.report.application.ISubreportClientDocument;
import com.crystaldecisions.sdk.occa.report.application.ParameterFieldController;
import com.crystaldecisions.sdk.occa.report.application.ReportClientDocument;
import com.crystaldecisions.sdk.occa.report.application.SubreportController;
import com.crystaldecisions.sdk.occa.report.data.Fields;
import com.crystaldecisions.sdk.occa.report.data.IField;
import com.crystaldecisions.sdk.occa.report.data.ITable;
import com.crystaldecisions.sdk.occa.report.data.Tables;
import com.crystaldecisions.sdk.occa.report.exportoptions.ReportExportFormat;
import com.crystaldecisions.sdk.occa.report.lib.IStrings;
import com.tramada.core.utils.SoftMap;
import com.tramada.documents.DocumentDataProvider;
import com.tramada.documents.DocumentDescriptor;
import com.tramada.documents.DocumentFormat;
import com.tramada.documents.DocumentProvider;
import com.tramada.documents.SubDocumentDescriptor;
import com.tramada.documents.businessobjects.model.Template;
import com.tramada.documents.model.DocumentContent;
import com.tramada.persistence.home.GenericHome;
Business Objects specific Document Provider.
public class BODocumentProvider implements DocumentProvider {
private static final String BO_AUTH_TYPE = "secEnterprise";
private boolean connect;
private String userName;
private String userPassword;
private String boURL;
private String documentsFolder;
private GenericHome home;
Local cache. Keeps track of document source for better performance.
private SoftMap<String, ReportClientDocument> cachedSources = new SoftMap<String, ReportClientDocument>();
// SETTERS & GETTERS
// SETTERS & GETTERS
public GenericHome getHome() {
return home;
public void setHome(GenericHome home) {
this.home = home;
public boolean getConnect() {
return connect;
public void setConnect(boolean connect) {
this.connect = connect;
public String getBoURL() {
return boURL;
public void setBoURL(String boURL) {
this.boURL = boURL;
public String getUserName() {
return userName;
public void setUserName(String userName) {
this.userName = userName;
public String getUserPassword() {
return userPassword;
public void setUserPassword(String userPassword) {
this.userPassword = userPassword;
public String getDocumentsFolder() {
return documentsFolder;
public void setDocumentsFolder(String documentsFolder) {
this.documentsFolder = documentsFolder;
// PUBLIC INTERFACE
Generates a document given its descriptor.
@param descriptor
valid document descriptor
@return Document (generated document).
public DocumentContent generateDocument(DocumentDescriptor descriptor, DocumentFormat format) throws Exception {
if (descriptor == null) {
throw new IllegalArgumentException("descriptor==null");
if (format == null) {
throw new IllegalArgumentException("format==null");
// get the document source.
// Can not use setDataSource() error code 2147483648?
ReportClientDocument document = getDocument(descriptor.getDocumentName());
ParameterFieldController parameterController = document.getDataDefController().getParameterFieldController();
// insert the main document parameters and there values
populateParameters(document.getDataDefController().getDataDefinition().getParameterFields(),
parameterController, descriptor, "");
// insert into the main document all the required data.
Tables tables = document.getDatabaseController().getDatabase().getTables();
for (int i = 0; i < tables.size(); i++) {
ITable table = tables.getTable(i);
String tableAlias = table.getAlias();
DocumentDataProvider provider = descriptor.getDocumentDataProvider(tableAlias);
POJOResultSetFactory factory = new POJOResultSetFactory(provider.getDataType());
document.getDatabaseController().setDataSource(factory.createResultSet(provider.getData()), tableAlias,
tableAlias);
// go through all the sub-documents and do the same thing as for the
// main document.
SubreportController subReportController = document.getSubreportController();
IStrings names = subReportController.getSubreportNames();
for (int i = 0; i < names.size(); i++) {
String subDocumentName = (String) names.get(i);
SubDocumentDescriptor subDescriptor = descriptor.getSubDocument(subDocumentName);
// get the actual sub document.
ISubreportClientDocument subDocument = subReportController.getSubreport(subDocumentName);
// insert the subdocument parameters.
populateParameters(subDocument.getDataDefController().getDataDefinition().getParameterFields(),
parameterController, subDescriptor, subDocumentName);
// insert into the main document all the required data.
Tables subTables = subDocument.getDatabaseController().getDatabase().getTables();
for (int j = 0; j < subTables.size(); j++) {
ITable subTable = subTables.getTable(j);
String tableAlias = subTable.getAlias();
DocumentDataProvider subProvider = subDescriptor.getDocumentDataProvider(tableAlias);
POJOResultSetFactory subFactory = new POJOResultSetFactory(subProvider.getDataType());
subDocument.getDatabaseController().setDataSource(subFactory.createResultSet(subProvider.getData()),
tableAlias, tableAlias);
// generate the report in the specified format
ByteArrayInputStream bais = (ByteArrayInputStream) document.getPrintOutputController().export(
getReportFormat(format));
byte[] content = new byte[bais.available()];
bais.read(content);
return (new DocumentContent(content));
Refreshes the connector and all its cached document sources.
public void refresh() throws Exception {
cachedSources.clear();
// PRIVATE ROUTINES
Populates the document parameters with there values.
private void populateParameters(Fields parameters, ParameterFieldController controller,
DocumentDescriptor descriptor, String documentName) throws Exception {
for (int i = 0; i < parameters.size(); i++) {
IField parameter = parameters.getField(i);
String parameterName = parameter.getName();
if (!descriptor.getParameters().containsKey(parameterName)) {
throw new IllegalStateException("missing parameter entry for '" + parameterName + "'");
Object value = descriptor.getParameter(parameterName);
if (value != null) {
controller.setCurrentValue(documentName, parameterName, value);
Retrieves the document source. If the source is not cached get it from
BO. First get the template name that is stored on BO.
private ReportClientDocument getDocument(String documentName) throws Exception {
ReportClientDocument source = cachedSources.get(documentName);
if (source == null) {
String templateName = getTemplateName(documentName);
if (userName == null) {
throw new IllegalArgumentException("user-name==null");
if (userPassword == null) {
throw new IllegalArgumentException("user-password==null");
if (boURL == null) {
throw new IllegalArgumentException("boURL==null");
if (documentsFolder == null) {
throw new IllegalArgumentException("documents-folder==null");
// login to BO
IEnterpriseSession enterpriseSession = CrystalEnterprise.getSessionMgr().logon(userName, userPassword,
boURL, BO_AUTH_TYPE);
IInfoStore iStore = (IInfoStore) enterpriseSession.getService("InfoStore");
// get the application folder.
IInfoObjects folders = iStore.query("Select SI_ID From CI_INFOOBJECTS Where SI_PROGID='CrystalEnterprise.Folder' And SI_NAME = '"
+ documentsFolder + "'");
if (folders.size() != 1) {
throw new IllegalStateException("documents folder '" + documentsFolder + "' not found on BO Server '"
+ boURL + "'.");
IInfoObject folder = (IInfoObject) folders.get(0);
// get the document identified by the template name.
IInfoObjects templates = iStore.query("select SI_ID, SI_NAME From CI_INFOOBJECTS "
+ "where SI_PROGID = 'CrystalEnterprise.Report' " + "And SI_INSTANCE_OBJECT = 0 "
+ "And SI_PARENT_FOLDER = " + folder.getID() + " And SI_NAME= '" + templateName + "'");
if (templates.size() != 1) {
throw new IllegalStateException("template with name '" + templateName + "' not found in folder '"
+ documentsFolder + "'on BO Server '" + boURL + "'.");
source = ((IReportAppFactory) enterpriseSession.getService("RASReportFactory")).openDocument(
((IInfoObject) templates.get(0)).getID(), 0, Locale.getDefault());
cachedSources.put(documentName, source);
return (source);
Returns the associated template name for the given document descriptor.
@SuppressWarnings("unchecked")
private String getTemplateName(String documentName) {
Template example = new Template();
example.setDocumentName(documentName);
List<Template> templates = (List<Template>) home.findByExampleExcludingAssociations(example);
if (templates == null || templates.size() != 1) {
throw new IllegalStateException("no template defined for document name '" + documentName + "'");
return (templates.get(0).getTemplateName());
Get the equivalent BO format for the given document format.
@param format
document format.
@return ReportExportFormat
private ReportExportFormat getReportFormat(DocumentFormat format) {
if (format.equals(DocumentFormat.PDF)) {
return (ReportExportFormat.PDF);
} else if (format.equals(DocumentFormat.WORD)) {
return (ReportExportFormat.MSWord);
} else if (format.equals(DocumentFormat.EXCEL)) {
return (ReportExportFormat.MSExcel);
return (ReportExportFormat.MSWord);
Best Regards
Khalef BessaihHello,
If I understand correctly, you create a local report which choose report from Report Server. You have two query parameters in the report which are returned by stored procedure. Currently, you cannot get default values for these parameters when run the report.
Based on my test, if we haven’t configure these parameter with Available Values, we can reproduce the same issue. Also, caching issue may cause the same issue. If the issue is persist, please delete the corresponding report in the report server. Then, redeploy
it to check.
There is a similar issue, you can refer to it.
http://social.msdn.microsoft.com/Forums/en-US/6a548d65-35d0-4a3e-8b64-3b7b655c76ee/ssrs-2008-report-parameter-default-value-doesnt-work-when-deployed
Regards,
Alisa Tang
Alisa Tang
TechNet Community Support -
ReportClientDocument throws - Unexpected database connector error
Hi,
We are getting a weird exception in Websphere 6.1 server when we try to open a crystal report using ReportClientDocument object. It is throwing an unexpected database connector error when we try to change the datasource of the report. It would be great if some one can help us with the solution.
Code:
ReportClientDocument reportClientDocument = new ReportClientDocument();
reportClientDocument.open(REPORT_NAME, 0);
Tables tables = reportClientDocument.getDatabaseController().getDatabase().getTables();
ITable table = tables.getTable(0);
reportClientDocument.getDatabaseController().setDataSource(resultSet0, tableName0 , tableName0+"_ResultSet");
P.S: The same code works fine in Tomcat 6.0 server.
Exception:
[1/11/11 17:34:10:141 GMT+05:30] 00000037 SystemOut O Connection logon successfully
[1/11/11 17:34:10:145 GMT+05:30] 00000037 SystemOut O Rowset restart: moveToStart true
[1/11/11 17:34:10:145 GMT+05:30] 00000037 SystemOut O Rowset execute
[1/11/11 17:34:10:168 GMT+05:30] 00000037 SystemOut O detected an exception: Unexpected database connector error
at com.crystaldecisions.reports.queryengine.Table.u7(SourceFile:2409)
at com.crystaldecisions.reports.datafoundation.DataFoundation.a(SourceFile:1234)
at com.crystaldecisions.reports.dataengine.dfadapter.DFAdapter.a(SourceFile:344)
at com.crystaldecisions.reports.dataengine.dfadapter.CheckDatabaseHelper.a(SourceFile:66)
at com.crystaldecisions.reports.dataengine.datafoundation.CheckDatabaseCommand.new(SourceFile:100)
at com.crystaldecisions.reports.common.CommandManager.a(SourceFile:71)
at com.crystaldecisions.reports.common.Document.a(SourceFile:203)
at com.crystaldecisions.reports.dataengine.VerifyDatabaseCommand.new(SourceFile:76)
at com.crystaldecisions.reports.common.CommandManager.a(SourceFile:71)
at com.crystaldecisions.reports.common.Document.a(SourceFile:203)
at com.businessobjects.reports.sdk.requesthandler.f.a(SourceFile:175)
at com.businessobjects.reports.sdk.requesthandler.DatabaseRequestHandler.a(SourceFile:373)
at com.businessobjects.reports.sdk.requesthandler.DatabaseRequestHandler.if(SourceFile:352)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1291)
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.ReportClientDocument.if(SourceFile:605)
at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.a(SourceFile:1688)
at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.new(SourceFile:2650)
at com.crystaldecisions.sdk.occa.report.application.b9.onDataSourceChanged(SourceFile:301)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:962)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:2834)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.setDataSource(SourceFile:2557)
at com.crystaldecisions.reports.sdk.DatabaseController.setDataSource(SourceFile:87)It appears that you are trying to pass a resultset to the report, only things i can think of is, either the jar file needed for that type of connection is missing, or maybe the app servers are using different versions of java which causes it to act differently.
-
Unexpected database connector error---- Error code:-2147467259
Hi, I am using Crystal Report for Eclipse 12.2.208).
My rpt file contains a command with a simple sql query
In eclipse I used this rpt and generated the Jsp file to export the report to Pdf format
But exception is thrown in the following line of Jsp
//Push the Java ResultSet into the report (this will then be the datasource of the report)
CRJavaHelper.passResultSet(clientDoc, fetchResultSet(driverName, connectStr, userName, password, query), tableAlias, "");
CRJavaHelper.java
clientDoc.getDatabaseController().setDataSource(rs, tableAlias,tableAlias);
While replacing the result set I am getting the following error.... Please help me on this.
com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Unexpected database connector error---- Error code:-2147467259 Error code name:failed at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:2285) at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:2305) at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:737) 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.ReportClientDocument.if(SourceFile:605) at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.a(SourceFile:1688) at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.new(SourceFile:2650) at com.crystaldecisions.sdk.occa.report.application.b9.onDataSourceChanged(SourceFile:301) at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:962) at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:2834) at com.crystaldecisions.sdk.occa.report.application.DatabaseController.setDataSource(SourceFile:2557) at com.businessobjects.samples.CRJavaHelper.passResultSet(CRJavaHelper.java:263) at org.apache.jsp.Report2008_002dviewer_jsp._jspService(Report2008_002dviewer_jsp.java:120) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Unknown Source) Caused by: com.crystaldecisions.reports.common.QueryEngineException: Unexpected database connector error at com.crystaldecisions.reports.queryengine.Connection.bf(SourceFile:2962) at com.crystaldecisions.reports.queryengine.Rowset.z3(SourceFile:944) at com.crystaldecisions.reports.queryengine.Rowset.bL(SourceFile:533) at com.crystaldecisions.reports.queryengine.Rowset.zM(SourceFile:245) at com.crystaldecisions.reports.queryengine.Connection.a(SourceFile:776) at com.crystaldecisions.reports.queryengine.Table.a(SourceFile:2234) at com.crystaldecisions.reports.queryengine.Table.if(SourceFile:2161) at com.crystaldecisions.reports.queryengine.Table.try(SourceFile:1525) at com.crystaldecisions.reports.queryengine.Table.a(SourceFile:568) at com.crystaldecisions.reports.queryengine.Table.u7(SourceFile:2405) at com.crystaldecisions.reports.datafoundation.DataFoundation.a(SourceFile:1234) at com.crystaldecisions.reports.dataengine.dfadapter.DFAdapter.a(SourceFile:344) at com.crystaldecisions.reports.dataengine.dfadapter.CheckDatabaseHelper.a(SourceFile:66) at com.crystaldecisions.reports.dataengine.datafoundation.CheckDatabaseCommand.new(SourceFile:100) at com.crystaldecisions.reports.common.CommandManager.a(SourceFile:71) at com.crystaldecisions.reports.common.Document.a(SourceFile:203) at com.crystaldecisions.reports.dataengine.VerifyDatabaseCommand.new(SourceFile:76) at com.crystaldecisions.reports.common.CommandManager.a(SourceFile:71) at com.crystaldecisions.reports.common.Document.a(SourceFile:203) at com.businessobjects.reports.sdk.requesthandler.f.a(SourceFile:175) at com.businessobjects.reports.sdk.requesthandler.DatabaseRequestHandler.a(SourceFile:373) at com.businessobjects.reports.sdk.requesthandler.DatabaseRequestHandler.if(SourceFile:352) at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1291) at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:661)Please ensure that you have upgraded to Service Pack 4. There was a bug related to Unexpected Database Connector error that was resolved in the latest service pack release this February.
-
Unexpected database connector error when upgraded to the JRC 12.2.208
Hi,
My reports were working fine when using the CR viewers 11 SDK. In order to use print from the server functionality, I upgraded to JRC 12.2.208. Since then I am getting the following exception. Please help. Thanks!
Line: -
Exception Trace =
com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Unexpected database connector error---- Error code:-2147467259 Error code name:failed
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:2285)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:2305)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:737)
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)
Line: -
CrystalReport logs:
2010-10-07 09:15:18,390 [http-80-1] DEBUG com.crystaldecisions.reports.dataengine.DataEngineCommand.VerifyDatabaseCommand - VerifyDatabaseCommand,0,Enter CreateCommand,<document=ReportDocument:<report=main><reportPath=C:\ICTS-10-6\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\ICTSWeb\reports\rptICERejection.rpt>>;<isFirstVerify=false>;
2010-10-07 09:15:18,390 [http-80-1] DEBUG com.crystaldecisions.reports.dataengine.DataEngineCommand.VerifyDatabaseCommand - VerifyDatabaseCommand,30823955,Exit CreateCommand,<document=ReportDocument:<report=main><reportPath=C:\ICTS-10-6\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\ICTSWeb\reports\rptICERejection.rpt>>;
2010-10-07 09:15:18,390 [http-80-1] DEBUG com.crystaldecisions.reports.common.commandmanager - command SETUP: VerifyDatabaseCommand
2010-10-07 09:15:18,390 [http-80-1] DEBUG com.crystaldecisions.reports.common.commandmanager - command PERFORM: VerifyDatabaseCommand
2010-10-07 09:15:18,390 [http-80-1] DEBUG com.crystaldecisions.reports.dataengine.DataEngineCommand.VerifyDatabaseCommand - VerifyDatabaseCommand,30823955,Enter perform,<document=ReportDocument:<report=main><reportPath=C:\ICTS-10-6\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\ICTSWeb\reports\rptICERejection.rpt>>;
2010-10-07 09:15:18,390 [http-80-1] INFO com.crystaldecisions.reports.dataengine.DataEngineCommand.VerifyDatabaseCommand - Verifying database
2010-10-07 09:15:18,390 [http-80-1] INFO com.crystaldecisions.reports.reportdefinition.ReportCommand.CheckDatabaseCommand - CheckDatabaseCommand,0,Enter CreateCommand,<document=ReportDocument:<report=main><reportPath=C:\ICTS-10-6\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\ICTSWeb\reports\rptICERejection.rpt>>;
2010-10-07 09:15:18,390 [http-80-1] INFO com.crystaldecisions.reports.reportdefinition.ReportCommand.CheckDatabaseCommand - CheckDatabaseCommand,5205942,Exit CreateCommand,<document=ReportDocument:<report=main><reportPath=C:\ICTS-10-6\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\ICTSWeb\reports\rptICERejection.rpt>>;
2010-10-07 09:15:18,390 [http-80-1] DEBUG com.crystaldecisions.reports.common.commandmanager - command SETUP: CheckDatabaseCommand
2010-10-07 09:15:18,406 [http-80-1] DEBUG com.crystaldecisions.reports.common.commandmanager - command PERFORM: CheckDatabaseCommand
2010-10-07 09:15:18,406 [http-80-1] INFO com.crystaldecisions.reports.reportdefinition.ReportCommand.CheckDatabaseCommand - CheckDatabaseCommand,5205942,Enter perform,<document=ReportDocument:<report=main><reportPath=C:\ICTS-10-6\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\ICTSWeb\reports\rptICERejection.rpt>>;
2010-10-07 09:15:18,406 [http-80-1] INFO com.crystaldecisions.reports.queryengine - Connection logon:PreQEServerName=s(DOCSQLDEV01);Provider=s(SQLOLEDB.1);Integrated Security=s(SSPI);Initial Catalog=s(ICTS_DEV);Data Source=s(DOCSQLDEV01);Use Procedure for Prepare=s(1);Auto Translate=s(True);Packet Size=s(4096);Workstation ID=s(DOCCAPWKS708);PreQEServerType=s(Active Data (ADO));Database DLL=s(crdb_javabeans.dll);Java ResultSet=
2010-10-07 09:15:18,406 [http-80-1] INFO com.crystaldecisions.reports.queryengine - Connection logon successfully
2010-10-07 09:15:18,437 [http-80-1] INFO com.crystaldecisions.reports.queryengine - Rowset restart: moveToStart true
2010-10-07 09:15:18,437 [http-80-1] INFO com.crystaldecisions.reports.queryengine - Rowset execute
2010-10-07 09:15:18,437 [http-80-1] DEBUG com.crystaldecisions.reports.common.commandmanager - command SETUP: NotUndoableCommand
2010-10-07 09:15:18,437 [http-80-1] DEBUG com.crystaldecisions.reports.common.commandmanager - command PERFORM: NotUndoableCommand
2010-10-07 09:15:18,437 [http-80-1] DEBUG com.crystaldecisions.reports.common.commandmanager - -- command is NOT UNDOABLE -> purge undo stack
2010-10-07 09:15:18,453 [http-80-1] DEBUG com.crystaldecisions.reports.common.commandmanager - command SETUP: NotUndoableCommand
2010-10-07 09:15:18,453 [http-80-1] DEBUG com.crystaldecisions.reports.common.commandmanager - command PERFORM: NotUndoableCommand
2010-10-07 09:15:18,453 [http-80-1] DEBUG com.crystaldecisions.reports.common.commandmanager - -- command is NOT UNDOABLE -> purge undo stack
at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.if(SourceFile:605)
at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.a(SourceFile:1688)
at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.new(SourceFile:2650)
at com.crystaldecisions.sdk.occa.report.application.b9.onDataSourceChanged(SourceFile:301)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:962)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:2834)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.setDataSource(SourceFile:2557)
at com.crystaldecisions.reports.sdk.DatabaseController.setDataSource(SourceFile:87)I find in the SAP notes that this is a reported bug in the JRC application.
SAP Note 1416845 - JRC application throws "Unexpected database connector" error
http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_dev/sap%28bd1lbizjptawmq==%29/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333433313336333833343335%7D.do
My question is - Does anyone know when is this bug scheduled to be fixed and released?
Thanks,
Travis
Maybe you are looking for
-
HT4623 Phone does not work after update
After update 6.1.4 phone cannot find signal to function even though wireless works. Cannot reload update...says it's up to date. Reboot nothing, Reset, nothing. Really beginning to dislike this piece of junk. Just need a phone that works.
-
Sideways label positioning in Keynote
Hi All, Is there any way we can position the value label sideways instead of straight in Keynote column chart? Thanks, SG
-
SOA and OSB servers in Admin State
I created two soa servers in a cluster and two osb servers in another cluster. When I start my servers they go to admin mode and I can't get them to go to starting mode. From what I read, certain libraries and applications need to be deployed to the
-
Does the itunes card have an expiration date?
I have an ipad but this will be the first time that i use this gift cards... My question is, that if once that i i use. The gift card but no the whole money of the card, do i have a time limit for me to use it
-
Storing Recieved Datagram Packets into a File
Hi, I know that the answer to my question could be so simple but i couldnt seem to figure it out or maybe im targeting the harder way and there could be much simplier way. so i would very much appreciate an enlightenment from you guys. ok here it goe