WebService as datasource - Crystal Reports XI

Post Author: dellaweb
CA Forum: Data Connectivity and SQL
Hi,
I have trouble in setting up a web service as data source in Crystal reports xi.
- After providing HTTP WSDL URL  , It asks to specify a web service, port and method.
Can someone help me with the information that I should provide  for the above 3 items.
Thanks,
DW

hello,
try this:
WS type:
document/literal:
xsd: (xmlns="xsdo")
<xsd:complexType name="someTableRowType">
<xsd:sequence>
<xsd:element name="someStringColumnInTable" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="someNumberColumnInTable" type="xsd:int" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="someTableType">
<xsd:sequence>
<xsd:element name="singleRow" type="tns:someTableRowType" minOccurs="0" maxOccurs="unbound"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="someTableResponse" type="tns:someTableType" />
wsdl:
<wsdl:message name="someTableResponseMessage">
<wsdl:part name="someTableResponsePart" element="xsdo:someTableResponse"/>
</wsdl:message>
hope this helps.
temir
Edited by: temir_ra on Nov 22, 2011 10:03 AM
Edited by: temir_ra on Nov 22, 2011 10:04 AM
Edited by: temir_ra on Nov 22, 2011 10:06 AM

Similar Messages

  • Error in setting datasource - Crystal reports

    Good day,
    I am currently experiencing a problem with setting my datasource to a report in Crystal Reports.
    Strangely, the report works in VS 2010, but when running as an executable, the program fails when assigning the datasource.
    My code:
        Public Sub PurchasesByVendor()
            Try
                Dim sql As String = "SELECT tblVendors.VendorID, tblVendors.VendorName, tblPO.POID, tblPO.EnterDate, tblCustomers.Company, tblOrders.RefNum, Sum(tblPOItems.ExtPrice) AS SumOfExtPrice " & _
                                    "FROM (((tblPO INNER JOIN tblPOItems ON tblPO.POID = tblPOItems.POID) INNER JOIN tblVendors ON tblPO.VendorID = tblVendors.VendorID) LEFT JOIN tblOrders ON tblPO.OrderID = tblOrders.OrderID) LEFT JOIN tblCustomers ON tblOrders.CustomerID = tblCustomers.CustomerID " & _
                                    "WHERE (((tblPO.EnterDate) Between #" & dpStart.Text & "# And #" & dpFinish.Text & "#)) " & _
                                    "GROUP BY tblVendors.VendorID, tblVendors.VendorName, tblPO.POID, tblPO.EnterDate, tblCustomers.Company, tblOrders.RefNum; "
                Dim con As New OleDb.OleDbConnection
                Dim da As OleDb.OleDbDataAdapter
                Dim ds As New DataSet
                con.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = C:\Program Files\Mail-Shop\MSApp2k.mdb"
                con.Open()
                da = New OleDb.OleDbDataAdapter(sql, con)
                da.Fill(ds, "PO")
                Dim povList As List(Of POV) = New List(Of POV)
                If ds.Tables("PO").Rows.Count > 0 Then
                    For i = 0 To ds.Tables("PO").Rows.Count - 1
                        Dim pov As POV = New POV()
                        pov.VendorName = ds.Tables("PO").Rows(i).Item(1)
                        pov.PONumber = ds.Tables("PO").Rows(i).Item(2)
                        pov.PODate = ds.Tables("PO").Rows(i).Item(3)
                        If IsDBNull(ds.Tables("PO").Rows(i).Item(4)) = False Then
                            pov.Company = ds.Tables("PO").Rows(i).Item(4)
                        End If
                        If IsDBNull(ds.Tables("PO").Rows(i).Item(5)) = False Then
                            pov.Order = ds.Tables("PO").Rows(i).Item(5)
                        End If
                        pov.Total = ds.Tables("PO").Rows(i).Item(6)
                        povList.Add(pov)
                    Next
                End If
                'MsgBox(povList.Count)
                Dim datas As POVD = New POVD()
                Dim dt As New DataTable("povd")
                'Dim dt As DataTable = datas.Tables.Add("hc")
                dt.Columns.Add("Vendor", GetType(String))
                dt.Columns.Add("PONumber", GetType(Integer))
                dt.Columns.Add("PODate", GetType(Date))
                dt.Columns.Add("Company", GetType(String))
                dt.Columns.Add("OrderNbr", GetType(Integer))
                dt.Columns.Add("Total", GetType(Double))
                dt.Columns.Add("Charged", GetType(Double))
                datas.Tables.Add(dt)
                For Each dr In povList
                    Dim vendor = dr.VendorName
                    Dim ponbr = dr.PONumber
                    Dim poDate As Date = DateValue(DateTime.Parse(dr.PODate))
                    Dim company = dr.Company
                    Dim order = dr.Order
                    Dim total = dr.Total
                    Dim charged = dr.getCharged(dr.PONumber)
                    Dim nw As DataRow = datas.Tables(0).NewRow()
                    nw(0) = vendor
                    nw(1) = ponbr
                    nw(2) = poDate
                    nw(3) = company
                    nw(4) = order
                    nw(5) = total
                    nw(6) = charged
                    datas.Tables(0).Rows.Add(nw)
                Next
                '' bind the datasource+
                Dim objRpt As New PurchaseByVendor
                objRpt.SetDataSource(datas.Tables(0))
                Dim wfp As New WindowFormReport()
                wfp.CrystalReportsViewer1.ViewerCore.ReportSource = objRpt
                Me.NavigationService.Navigate(wfp)
                con.Close()
                con.Dispose()
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Sub
    Thanks!

    What version fo CR you are using, what service pack?
    What CR components are installed on the client machine for deployment?
    When using datasets to pass the data to Crystal reports, the issue occurs due to datasets in 50% of cases.
    What exact error do you get?
    Could you try below steps which would tell you if its an issue with Crystal or with getting data into datasets.
    - Once the data is populated in the dataset and before doing a "objRpt.SetDataSource(datas.Tables(0))", write the data to a datagrid.
    - While deploying the EXE, you could observe the datagrid to check fi the datasets do return some data.
    This may not be a Crystal issue.
    if you get the data in the datagrid and not in the report then do a 'ds.writeXml("XMLfilepath.xml")'. this will generate the XML file with the data from the dataset. the open the report indeaigner and try to assign the XMl to the report and see if the report works in thed esigner.
    - Bhushan
    Senior Engineer
    SAP Active Global Support
    Follow us on Twitter
    Got Enhancement ideas? Try the SAP Idea Place
    Getting started and moving ahead with Crystal Reports .NET applications.

  • Integration with Crystal Report

    Hi everybody,
    I have to integrate a process with Crystal Report.
    A customer need to have a task form with a Print button that prints a report created with Crystal Report.
    I know that you can use webservices to call Crystal Report, but I've not found articles about this integration with Oracle.
    Have you ever faced with something like that?
    Do you think it's possible?
    Thanks
    Marti

    Hi Nomadus,
    I have to use Crystal Reports because this is what my customer already has.
    Actually it's an integration with NO Oracle products.
    Any idea?
    Thanks

  • Crystal Report 2008 DataSource binding

    Hi,
    I have VS2008 webservice which is used to generate report. I am using CR2008 version of crystal report. While creating the report template I specified the development database and now going forward I am trying to set the database source through code and this datasource is specified in the web.config. Issue is reports are not using the datasource that I am setting up at runtime it continues to use the one that is saved in template...
    I am using the following code:
    protected void logonReport(string dbServerName, string dbName,
                string dbUserId, string dbPwd)
                ConnectionInfo connInfo = null;
                TableLogOnInfo tblLogonInfo = null;
                Tables tbls = null;
                try
                    connInfo = new ConnectionInfo();
                    connInfo.ServerName = dbServerName;
                    connInfo.DatabaseName = dbName;          //not used for Oracle
                    connInfo.UserID = dbUserId;
                    connInfo.Password = dbPwd;
                    tbls = this._crReport.Database.Tables;
                    foreach (Table tbl in tbls)
                        tblLogonInfo = tbl.LogOnInfo;
                        tblLogonInfo.ConnectionInfo = connInfo;
                        tbl.ApplyLogOnInfo(tblLogonInfo);
                catch (Exception ex)
                    throw ex;
                finally
                    if (connInfo != null) connInfo = null;
    Please help.
    Thanks
    kajal

    Sorry, looking at this again I realize I made a mistake.
    I thought this was a Crystal Report as a  webservice as opposed to  a webservice using CR APIs.
    Try setting Table.Location in your code.
    Alternatively try DatasourceConnections off of the reportdocument object.
    Ludek

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

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

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

  • How to create a crystal report using secured web service as a datasource?

    Hi All Expert,
    I having some challenges on how to create a report using secured web service as a datasource in crystal report designer (CR11 R3).
    Secured Web Service including the certificate trusting, token authentication, header and/or body encryption. All web services running on https protocal.
    Could you please suggest me on the solution?
    Thank you and Best Regards,
    Cherr

    Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551

  • Changing the datasource of a Crystal Report to a Oracle DB using TNS

    I have a problem trying to change the datasource of a crystal report. In the new connection I want to connect to a Oracle DB using TNS.
    Without TNS it's finally working flawlessly with the following code:
         private static void switch_tables(DatabaseController databaseController) throws ReportSDKException {
              // Declare the new connection properties that report's datasource will be switched to.
              final String DBUSERNAME = "user";
              final String DBPASSWORD = "secret";
              final String SERVERNAME = "jdbc:oracle:thin:@1.1.1.1:mysid";
              final String URI = "!oracle.jdbc.OracleDriver!jdbc:oracle:thin:{userid}/{password}@1.1.1.1:mysid";
              final String DATABASE_NAME = "mysid";
              final String DATABASE_DLL = "crdb_jdbc.dll";
              final String SCHEMA_NAME = "SCHEMA.";
              // Obtain collection of tables from this database controller.
              Tables tables = databaseController.getDatabase().getTables();
              // Set the datasource for all main report tables.
              for (int i = 0; i < tables.size(); i++) {
                   ITable table = tables.getTable(i);
                   // Keep existing name and alias.
                   table.setName(table.getName());
                   table.setAlias(table.getAlias());
                   // Change properties that are different from the original datasource.
                   table.setQualifiedName(SCHEMA_NAME + table.getName());
                   // Change connection information properties.
                   IConnectionInfo connectionInfo = table.getConnectionInfo();
                   // Set new table connection property attributes.
                   PropertyBag propertyBag = new PropertyBag();
                   propertyBag.put("Trusted_Connection", "false");
                   propertyBag.put("Server Name", SERVERNAME); //Optional property.
                   propertyBag.put("Connection String", URI);
                   propertyBag.put("Database Name", DATABASE_NAME);
                   propertyBag.put("Server Type", "JDBC (JNDI)");
                   propertyBag.put("URI", URI);
                   propertyBag.put("Use JDBC", "true");
                   propertyBag.put("Database DLL", DATABASE_DLL);
                   connectionInfo.setAttributes(propertyBag);
                   // Set database username and password.
                   // NOTE: Even if these the username and password properties don't change when switching databases, the
                   // database password is not saved in the report and must be set at runtime if the database is secured.
                   connectionInfo.setUserName(DBUSERNAME);
                   connectionInfo.setPassword(DBPASSWORD);
                   connectionInfo.setKind(ConnectionInfoKind.SQL);
                   table.setConnectionInfo(connectionInfo);
                   // Update old table in the report with the new table.
                   databaseController.setTableLocation(table, tables.getTable(i));
    I just call this method with the DatabaseController from a ReportClientDocument instance.
    How do I need to change the connectionInfo to do the connection using TNS?

    Please re-post if this is still an issue but first update to CR4E 2 and retest

  • Crystal Reports 2008 - Error setting new datasource location

    Hi All,
    We are experiencing an issue while trying to set datasource location for our RM 3.0 reports in Crystal Reports 2008 designer. As per guide "SAP BusinessObjects Process Control 3.0 and Risk Management 3.0 - How to build and Personalize Custom Crystal Reports" (step 11), after opening the desire report we go to DataBase-->Set DataSource Location and when selecting our RM system (which actually has the BI content addon installed on it), we got the following error message:
    "Some tables could not be replaced, as no match was found in the new data source. Please verify the table required for any unmodified tables"
    I'm new on this so I'm not sure if the table indicated in the original datasource should exist in my DB (new datasource) before doing this? If so, how those tables are imported or created in our DB?
    Could you please help me on this issue?
    Please let me know if any other detail or data is required.
    Regards

    Hi Don,
    Thanks for the update.
    Actually I've installed SAP Integration Kit and its Fixpack in both....BOE Server (which is the same as the SAP server) and in client pc.  In all cases we have select a typical installation which supposes the required drivers are available. Also I've followed Ingo's documentation to activate and publish standard Risk Management reports (RM reports). Everything works ok with them. We are able to access reports through the application.
    The issue appears when trying to customize one of these standard reports through CR Designer. For example if we select the "GRRM_Risk_by_Risk_Category" and try to customize it as indicated in the "SAP BusinessObjects Process Control 3.0 and Risk Management 3.0 - How to build and Personalize Custom Crystal Reports"...the table behind this report (table GRFN_CY_API_GRRM_R1) it's not in our RM System. My main concern or question is regarding this....Did I miss something while importing transports files, activating or publishing RM reports, etc....and thatu2019s the reason why this (and any other) table is not already in my system? I was not able to find where those tables are supposed to be or how they should be imported in my system. The odd thing is...that we are trying to customize and set the new data source for these reports to the same system from where they are being opened. Put in this way...RM reports have been activated in system A (RM System) and published to system B (BOE System). While customizing reports through CR Designer...we are actually opening reports from system A. These reports have as their original data source...a demo SAP system info (uxcir1p.wdf.sap.corp) and when we want to update this data source with our RM system....the error appears. The whole process is explained in the above mentioned guide for your reference.
    Hope being clear enough..
    Thanks for your help

  • No SAP Datasources or SAP Toolbar in Crystal Reports 2008

    I cannot see the SAP toolbar or SAP datasources under "Create New Connection" in Crystal Reports 2008 SP1.
    After reading many threads on SDN and reistalling Crystal Reports 2008 SP1 and the BOBJ SAP Integration Kit many times I have not been able to get this to work. I have installed the following in order:
    - SAP GUI for Windows
    Release: 710
    Build: 1046700
    Patch Level: 12
    includes the BW 3.5 AddOn and BI 7 AddOn
    Crystall Reports 2008 SP1 which I installed all components except Legacy XML Export.
    Business Objects XI Integration Kit XI 3.1 for SAP which I installed all desktop components and all server components excluding web content and SDK. This was a local install on my PC.
    I have ensured that I have only one instance of SAPLOGON.ini on my PC.
    I have not applied the transports yet because I want to see the SAP datasources and SAP toolbar in Crystal Reports before I progress.
    We do not have Business Objects Enterprise and I'm not sure what "BOE 3.1 Client Tools" is referred to earlier in this thread. My understanding is that in addition to SAP and BW we just need Crystal Reports 2008 and the SAP integration kit.
    We are on ECC6 and BW 3.5.
    I hope someone can help.

    Hi Stratos,
    Thanks for your response. I finally got this working. My issue was that I originally used the Crystal Reports 2008 and BOBJ Int Kit downloads from the SAP support portal. I checked with another SDN user Steven Dierick - thanks Steven - for the version of Crystal Reports 2008 he was using (version 12.0.0.683).
    I downloaded Crystal Reports 2008 version 12.0.0.683 and the BOBJ Int Kit from the downloads section of sdn and it works!! SAP Toolbar, datasources and everything.
    Considering I'm using Crystal Reports 2008 SP0 are there any disadvantages of not using Crystal Reports 2008 SP1?
    If I'm better off using SP1 where should I download Crystal Reports 2008 SP1 and the appropriate BOBJ SAP Integration Kit?
    cheers,
    John

  • VS2010 Crystal Report Crashes System when using 'Set DataSource Location..'

    Runtime ASP.NET 3.5
    VS 2010
    Under Database Fields (rt click) try Set DataSource Location... causes VS2010 to crash.
    This is on an imported report from VS2008.  VS2008 has no problem with the report.
    Since this is a ASP.NET 3.5 program the internal property field
    <ResGenToolArchitecture>Managed32Bit</ResGenToolArchitecture>
    has been set in the project in order to allow the code to compile w/out errors.
    What is solution for Crystal Report Set DataSource Location?

    Hi Ken,
    Here's one link on the issue: CRVS2010 RTM: Database Expert / External Component has thrown an exception
    The reason is Old OS's used c:\temp as the default, now you are require to use %user%\temp as your temp folder as well as using the AppData folder for your app. If CR finds c:\temp it uses it and depending on what is in there it can cause Cr to crash, XML files have been know to do this.
    Following MS's new rules on users temp folder should make your app Windows Compliant.
    Thanks again
    Don

  • How to use a Crystal Reports Query as datasourc in an other Cristal Report

    Hi
    I would like to read a File in a CR Report, change some data and use the output as datasource  in an other Criystal Reports Report.
    Is ist possible to use a Crystal Reports Report as datasource for an other Crystal Reports Report?
    Thomas
    Edited by: Thomas Martin on Jul 18, 2011 12:44 PM

    Hi Thomas,
    Are you having Xcelsius also in your kitty??(for dynamically doing this activity)
    Xcelsius has very good writing & reading functionality and you can incorporate your crystal report data into it using live office.
    Let say you have a report in crystal , you connect that repot to live office .Let say this is REPORT named as SOURCE CR  REPORT.
    IN Xcelsius import the this SOURCE CR REPORT  report using live office connection and using GRID selector there to show tabular data.
    Xcelsius has buttons & controls  for updating and exporting the data inform of XML SOURCE FILE.
    Now you can either make xcelsius Dashboard for TARGET CR REPORT or you can make crystal Report on ADO.NET(XML) for second crystal Report.
    Search on SDN for cross usage of Crystal & Xcelsius
    regards,
    RK

  • Crystal Reports 10 Datasource Location and SQL Query update

    I am running Crystal Reports 10 accessing SQL Server 2008 database on Windows 7. Our product changed database names and I'm trying to update reports to point to the new database. Sounds nice and simple. The database has no structure changes yet, it's just a copy and rename of the old database. Both databases exist, same SQL instance, same permissions, etc. ...
    Existing working report:
       Has an ODBC (RDO) location to database DbVersion1
       If I run Show SQL Query, the database name is in the query text (i.e. FROM DbVersion1.dbo.MyTable)
    Attempted:
       In Set Database Location popup, I created a new ODBC (RDO) connection to database DbVersion2
       Updated Current Data Source for report to this new ODBC (RDO) connection.
       Ran Verify Database. Popup stated "The database is up to date."
    But when I run "Show SQL Query", is still shows DbVersion1 in the text, and the report displays data from DbVerison1. When I display the Datasource Location for the report, it shows DbVersion2 as I changed to above. How do I "refresh" the SQL Query to recognize the new Datasource Location?
    Thanks,
    Gary

    Hi Gary,
    A possible couple of issues, CR 10 doesn't support SQL Server 2008 and it doesn't support Windows 7. We had to update CR XI R2 SP 6 and above to make SQL 2008 work. MS changed the name of their client dll so CR is not aware of the new drivers.
    MDAC native driver may work but not sure....
    Try OLE DB, it may work better.
    Thanks
    Don

  • Change datasource of Crystal Report via code

    Hi all!
    I'm developing partner solution for SAP B1 8.8 in C# and prepared some nice crystal reports. But they are bound to my default database for now. I want to include them to my installation file and change saved datasource location (Server, Company Name, User name, User password) in my installation script as soon as I get this values, entered by user. But I don't know the way how to change datasource in rpt file. I've tried the following:
    using CrystalDecisions.CrystalReports.Engine;
    ReportDocument rDoc = new ReportDocument();
    rDoc.Load(@"C:\Temp\Report2.rpt");
    rDoc.DataSourceConnections[0].SetConnection("Server", "SBOTest", "manager", "manager");
    rDoc.SaveAs(@"C:\Temp\Report3.rpt");
    rDoc.Close();
    but it save no changes to rpt file.
    I think, this thread belongs mostly to Development/SDK thread, because here most of the people make programs and potentially met this problem in the past.

    public void SetCrystalLogin(string sUser, string sPassword, string sServer, string sCompanyDB, CrystalDecisions.CrystalReports.Engine.ReportDocument oRpt)
                CrystalDecisions.Shared.ConnectionInfo oConnectInfo = new CrystalDecisions.Shared.ConnectionInfo();
                oConnectInfo.DatabaseName = sCompanyDB;
                oConnectInfo.ServerName = sServer;
                oConnectInfo.UserID = sUser;
                oConnectInfo.Password = sPassword;
                // Set the logon credentials for all tables
                SetCrystalTablesLogin(oConnectInfo, oRpt.Database.Tables);
                // Check for subreports
                foreach (CrystalDecisions.CrystalReports.Engine.Section oSection in oRpt.ReportDefinition.Sections)
                    foreach (CrystalDecisions.CrystalReports.Engine.ReportObject oRptObj in oSection.ReportObjects)
                        if (oRptObj.Kind == CrystalDecisions.Shared.ReportObjectKind.SubreportObject)
                            // This is a subreport so set the logon credentials for this report's tables
                            CrystalDecisions.CrystalReports.Engine.SubreportObject oSubRptObj = oRptObj as CrystalDecisions.CrystalReports.Engine.SubreportObject;
                            // Open the subreport
                            CrystalDecisions.CrystalReports.Engine.ReportDocument oSubRpt = oSubRptObj.OpenSubreport(oSubRptObj.SubreportName);
                            SetCrystalTablesLogin(oConnectInfo, oSubRpt.Database.Tables);
                oRpt.Refresh();
                oRpt.SetDatabaseLogon(sUser, sPassword, sServer, sCompanyDB, false);
                oRpt.VerifyDatabase();
                oRpt.Refresh();
            private void SetCrystalTablesLogin(CrystalDecisions.Shared.ConnectionInfo oConnectInfo, Tables oTables)
                foreach (CrystalDecisions.CrystalReports.Engine.Table oTable in oTables)
                    CrystalDecisions.Shared.TableLogOnInfo oLogonInfo = oTable.LogOnInfo;
                    oLogonInfo.ConnectionInfo = oConnectInfo;
                    oTable.ApplyLogOnInfo(oLogonInfo);
    Edited by: Konstantin Rakhuba on May 6, 2010 11:44 AM
    Edited by: Konstantin Rakhuba on May 6, 2010 11:45 AM

  • Connect Crystal report with FI Data through MAXDB ERP Tables or Datasources

    Hi,
    I want to create crystal report queries for SAP ERP FI Data. The source system database is MAXDB.
    How can i connect the maxDB database or ERP to crystal report?
    Do i need tables or datasources to create queries, and how do i connect them to crystal report.
    I will thankful for any help.
    Kind regards
    Arnaud

    I would recommend to take a look here:
    BOBJ and SAP R/3
    /people/ingo.hilgefort/blog/2008/03/23/businessobjects-and-sap-part-4
    The drivers I am talking about will be available in the CR Designer once you install the BO integration kit for SAP solutions.
    If you try to access directly the underlying MAX DB database you will not have access to all data since SAP ERP stores the data partially compressed in the database tables.
    Regards,
    Stratos

  • Crystal Reports 2008 - ERROR when changing datasource

    Hi, I have a report that is connected to a test database that needs to have the datasource changed to the production database.
    The Crystal Report has 2 "on-demand" subreports that the datasource has been changed for as well.
    SQL 2000 Databases on 2 different servers (W2003) used the "Set Datasource Location" and followed steps listed previously in the forum.
    Databases have different names but all tables are same in both.
    Database Expert is showing all tables coming from new datasource BUT when report is run parameter prompt comes up, click ok
    Error message - "Failed to retrieve data from the database" - click OK
    Error message - "Invalid Argument provided"
    Does anyone have an ideas on how to track down the issues.
    Please let me know if you need any other information

    Ok answers below:-
    1. Crystal Reports 2008 Cersion 12.1.0.892
    2. Connecting via OLEDB
    3. Yes able to refresh newly created report without sub reports enclosed
    4. Didn't know that this could be done - this report was done for us by a consultant who doesn't know how to fix this issue and reckons there is a bug in Crystal
    5. Sub reports are accessed after main report is run (I think that means that they are linked)
    6. Not sure how to do this as am newbie to Crystal Reports and we are relying on the person that we contracted to write the reports to know what he is doing.
    Any help appreciated I will try to go into the sub report and unlink - think I have found out how to do this.
    Thanks for the help so far!!

Maybe you are looking for

  • Unattended Windows 8.1 Pro installation and Firmware integrated license key

    I have a brand new Lenovo Thinkpad that comes with a Windows 8 Pro license. According to what I read, the product key for Windows 8 for this machine is integrated into its firmware so I should be able to install a Windows 8 or 8.1 on it without need

  • Survey in MobileSales 4.0 SP06

    Hi Everyone, I am trying to download questionnaire created in CRM server to my mobile client4.0. I have created questionnaire in survey suite tool in CRM backend server.My CRM server is non unicode server,And in Mobile sales I am getting an error "<b

  • Opening a file with other applications

    Is there a way to open a file in Java with other applications automatically? For example, *.gif - Photoshop, *.txt - notepad.

  • Genius link missing

    can't find the Genius link while in ITUNES store..have it selected ok in the settings. Where did it go?

  • How do I get started replacing JCo with JCA?

    Hi all, After upgrading to EP SP15 I'm now reading that I should stop using JCo for client connection and start using JCA. I've searched but can't seem to find any step-by-step procedure that shows me how to convert my existing Java code to be JCA-co