Connecting to crystal report via JDBC

Hi,
I am new to Crystal Reports. I want to connect to MSSQL Database using JDBC drivers. I was wondering if there is a way I can use JDBC drivers for connection with Crystal Reports when designing the report ? 
Thanks
Sherif

Hi Sheriff,
I am not aware of CR 9 as it is out of support. But in CRXIR2 and CR2008 you can simply do it while creating new report. In the wizard you just need to select JDBC(JNDI) option under Create new connection.
After that just specify the connection url and JDBC class name.
I would suggest you to upgrade your product to CR2008 as it has excellent new features which would realy help you with the same.
Regards,
Nilesh Benke

Similar Messages

  • Connecting to IDMS database via JDBC

    Has anyone successfully set up JDBC connectivity to generate reports using data in an IDMS mainframe database containing multiple schemas, where several schemas may contain tables with the same name? 
    We have no issues when using ODBC to connect to the various schemas in this IDMS databases, but we need to convert the connectivity for existing reports to JDBC. 
    When I open the JDBC connection, I see the expected hierarchy of schemas and tables in the Database Expert window.  If I try to select a table I get the following error message if a table of that same name exists in other schemas:
    Failed to retrieve data from the database.
    Details:  SQL exception: [SQL State:]  42000  [Error message:]  DB002046 T11094 C-4M347: Duplicate table ids for ASISCHEM.SR-ACT and CORPCHEM.SR-ACT in area CORPDB.ACTIVITY-AREA [Database Vendor Code: -4]
    So although we can connect to the database via JDBC, we can't use the connectivity because Crystal  does not appear to correctly resolve that I'm selecting the table from within a specific schema.
    Can anyone advise on how to make sure the table name selection is qualified by the correct schema name?
    Thanks in advance.

    Hello,
    Try running the query outside of CR to verify the JDBC driver is passing the fully qualified name also.
    Then look in the Designer and Show SQL to verify it's there as well as Set Table Location. You may be able to fully qualify it in that UI.
    Thank you
    Don

  • Has anyone Connected a Crystal Report directly to a Microsoft Project file (MPP)?

    Post Author: Brian Morris
    CA Forum: Data Connectivity and SQL
    Iu2019m aware I can save Microsoft Project Files (MPP) to an Access Database, Excel document etc. and there are ways to connect to a Microsoft Project Server.
    I wanted to know if anyone has managed to connect directly to one though. Currently we use MPPs to report project status and other deliverables, and itu2019s been an annoyance to have to save the project file then export the data over into a new excel document when ever we have changes (since not all users have project or need all the data in the file).
    Preferably, a user should be able to save that project file and anyone that has the Crystal report should be able to run the report against the MPP file. In addition to this, it would be extremely helpful in getting a formalized and nicely formatted report when running reports against rational and MMP files, thus giving an alternative from SODA reports in Microsoft word, which doesnu2019t always work well.
    Thanks!

    Post Author: Brian Morris
    CA Forum: Data Connectivity and SQL
    Ok, I answered my own question on the connection issue, but I'm having issues with the predefined fields that enter into the report. The Database Expert shows the correct table names, but when I select them and look at the fields, they are all showing fields that are part of the "Project" table. when I use "Add Command" and use SQL to do a "Select * From TableName" ,where TableName is the name of the respective table, I get the data I'm looking for. Has anyone else run into this error? Is the error on Crystal Reports side or the Data provider's OLE DB driver? Has anyone with a fully patched system encountered the same errors?
    Current SetupCrystal Version: 11.0.0.1282CR Professional; Product Type:FullOLE DB Driver: Microsoft Project 10.0 OLE DB Provider
    I have pasted my findings below, hopefully other people won't have the same issues I did trying to find this information. if anyone else wants to test and see if they get the same issues I did it would be greatly appreciated.
    Connecting a Crystal Report XI to a Microsoft Project File (MPP)
    Prerequisites (as I know them)
    -          Have an installation of Crystal Reports on the machine (a given)
    -          Have Microsoft Project 2000/2003 installed OR  the Microsoft Project OLE DB provider which is installed with Microsoft Project (NOTE: Microsoft 2007 supposedly no longer supports OLE DB and requires an OLAP cube be made or a SOAP connection be used, which I donu2019t deal with personally)
    Creating the connection
    Start Crystal Reports
    Click u201CBlank Reportu201D on the start page
    in the u201CDatabase Expertu201D window, under u201CAvailable Data Sourcesu201D, Select u201C+u201D next to u201CCreate New Connectionu201D
    Select the u201C+u201D beside u201COLE DB(ADO)u201D
    If a u201COLE DB (ADO)u201D  window does not come up, double click u201CMake New Connectionu201D 
    In the u201Cprovider:u201D box Select the u201CMicrosoft Project 10.0 OLE DB Provideru201D
    The name may be different depending on the version of project you install and the patch you have on the machine
    Select u201CNext >u201D
    Under u201CDatabase:u201D copy/paste in the path and project file name
    I donu2019t believe the other fields u201CData Source:u201D, u201CUser ID:u201D, or u201CPasswordu201D need to be filled out, and in fact, I got an error when entering in data into them
    Example: u201CC:\Projects\Project Name\Current Schedule.mppu201D
    Select u201CNext >u201D
    In the Advaned information window, verify the project Name is the path of the project.
    I have not found the use of u201CEnterprise Modeu201D (default: 0), u201CAlways Loadu201D (default: 0), u201COLE DB Servicesu201D(default: -5), or u201CEnterprise RUID Listu201D (default: blank), removing them or changing them did cause errors though.
    Click u201CFinishu201D
    Adding in Tables and extracting data
    You now have a connection to the project File you listed. There is an issue Iu2019ve found though that all the tables you see listed are filling their fields in from the u201CProjectu201D Table, rather then their respective tables (Example: u201CAssignmentsu201D is pointing at u201CProjectu201D rather then the obvious connection u201CAssignmentsu201D). You can, however, use the u201CAdd Commandu201D and select the table you want with just a little SQL code:
    Select *
    From Assignments
    After creating the command, highlight it and hit u201CF2u201D. You should be able to edit the name and change it from u201CCommandu201D to something more meaningful. At the current time Iu2019m unsure if the issue with the default tables all pointing toward the project table is an error on the provider side or Crystal Reports end, and if one of the new patches will fix it. I will update this document accordingly when I have more information and do more testing. I will note however, there is no way to change which table these preset fields point to.
    Thank you for your time.

  • Why we need ABAP if we can connect With Crystal Reports to SAP R/3

    Hi,
        I am new to Crystal reports.I came to know that we can connect SAP R/3 by using SAP InfoSet,SAP Table Cluster and Function connectivity in Crystal Reports.So we can generate reports for SAP R/3 database with out need of ABAP.So why we need to go ABAP module.Is there any disadvantages if we dont use ABAP to generate reports or we can use always Crystal Reports to generate Reports for R/3 database?

    Hi,
    it is correct that you can built a Crystal Report without the need to use ABAP, but we have lots of customers that have invested over the years into ABAP Routines and Crystal REports is able to leverage those as well. So with Crystal Reports you have the choice to leverage existing ABAP Functions as a source for reporting - which might help to leverage complex processing on the backend - or to use InfoSets and tables.
    regards
    Ingo

  • How do I connect from Crystal Report version XI to Oracle 10G express?

    I'm new to oracle 10G express and I'm developing an application that needs reports to preview some data from oracle tables.
    The oracle database is installed on the server and I installed the client on my machine. I need to use the crystal report 11 to report the output. Thus, I designed a crystal report that should simply read a table on oracle and though I need to be able to connect to the oracle 10G Express Edition database. I tried to create a connection from the crystal report using the Database Expert >> Create New Connection >> Oracle Server and I include the following parameters.:
    - Service: host:1521/XE
    - Username: username
    - Password: password
    Then when I tried to connect the crystal report crashes always.
    Is there any way to create a connection to the Oracle Database 10G express from Crystal Report 11?
    Please advise...

    Thank you bala,
    First, How I should start the Listener on the database server?
    Listener.ora content:
    SID_LIST_LISTENER =
    +(SID_LIST =+
    +(SID_DESC =+
    +(SID_NAME = PLSExtProc)+
    +(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)+
    +(PROGRAM = extproc)+
    +)+
    +(SID_DESC =+
    +(SID_NAME = CLRExtProc)+
    +(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)+
    +(PROGRAM = extproc)+
    +)+
    +)+
    LISTENER =
    +(DESCRIPTION_LIST =+
    +(DESCRIPTION =+
    +(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))+
    +(ADDRESS = (PROTOCOL = TCP)(HOST = Daoud-PC)(PORT = 1521))+
    +)+
    +)+
    DEFAULT_SERVICE_LISTENER = (XE)
    How to configure the tnsnames.ora on the client side?
    tnsnames.ora content:
    XE =
    +(DESCRIPTION =+
    +(ADDRESS = (PROTOCOL = TCP)(HOST = Daoud-PC)(PORT = 1521))+
    +(CONNECT_DATA =+
    +(SERVER = DEDICATED)+
    +(SERVICE_NAME = XE)+
    +)+
    +)+
    EXTPROC_CONNECTION_DATA =
    +(DESCRIPTION =+
    +(ADDRESS_LIST =+
    +(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))+
    +)+
    +(CONNECT_DATA =+
    +(SID = PLSExtProc)+
    +(PRESENTATION = RO)+
    +)+
    +)+
    ORACLR_CONNECTION_DATA =
    +(DESCRIPTION =+
    +(ADDRESS_LIST =+
    +(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))+
    +)+
    +(CONNECT_DATA =+
    +(SID = CLRExtProc)+
    +(PRESENTATION = RO)+
    +)+
    +)+
    Now I`m trying to initialize this on one machine (database & client) and so the crystal report will be on the same machine where the database exist; Additionally, this machine has OS Windows 7 Ultimate 64bit and include the Oracle 10g Express Database & Oracle 10g Express Client software.
    Please check the files content I included above and give me the way on how to establish a connection from the crystal report to the database where both are installed on the same machine.
    Thanks in advance...

  • Can we launch Crystal Report via Browser?

    Hi, Experts
    I have created a Balance Sheet report (T-Style) with the help of BOBJ-Crystal Reorts.
    But I wanna to consume this report via Browser, neither email with PDF/Excel attached, nor Crystal Report 2008 designer.
    Is there any solution/tool to make this happen?
    How can I implement it?
    Thanks a lot.
    Peter Zhou

    You are able to view Crystal Reports via a browser in a few ways.
    1. Report is published to Enterprise and you use Infoview to browse to the report and view.
    2. Report is published to Enterprise and you use a custom application written in .NET/JAVA to view the report, loading it from your enterprise server.
    3. Report is stored on disk and you use a custom application written in .NET/JAVA to view the report.
    For viewing in a custom application please visit [diamond.businessobjects.com|http://diamond.businessobjects.com/]
    The documentation for the SDK's can be found in the Developer Library, and sample code can be found under the Sample Code.

  • Pls Help: View Crystal Report Via Oracle Form Builder

    Hi!!
    I want to know how to view the .rpt report (report made from Crystal Report) via Oracle Form Builder. I've to do it in my project. If you know, please tell me.
    Thanks in advance,

    I don't know how does crystal reports work, and I would guess you should ask the crystal guys to help you with this. find out if they have a command line interface that you can invoke from the host command in forms.
    We can help you do it with Oracle Reports though :-)
    http://otn.oracle.com/products/reports

  • Connection between Crystal Report and SAP ECC

    Hi. can you help me please.
    I'm testing the connection between Crystal Report and SAP ECC. I tried using the tables,
    but by making the links between foreign keys does not bring data. The other way I tried was using an ABAP function module,
    but using this way, Crystal will only works like a Presentation Layer because all the work was did it in ABAP;
    besides that shows the limitation that I can not pass as input a table.
    what is the best practice for reporting on SAP ECC using Crystal Report?
    Thanks.

    Hi,
    Crystal Reports is able to leverage tables, ABAP functions, SAP query and InfoSets.
    what is the issue when using the tables ?
    ingo

  • How do we create a jndi connection in crystal reports XI

    how do we create a jndi connection in crystal reports XI when the data soiurce is configured on websphere 6.1

    You need to use WLST online. I am not sure what your exact requirements are but one good way of working this is to have a WLST script that deletes all your WL customisations, like connection pools, JMS Servers etc and then creates it. That way you can run the same script repeatedly and it will get everything up to date for you. However you have to remember that everytime you add something new you need to update your delete section. Also your deleting should not fail if the item does not exist. I hope that makes sense!
    As to the specifics of WLST examples to do this then check out the WLST examples in CodeShare.
    If you are still having issues then post another message.
    Geoff

  • Database Connector Error when I connect SAP Crystal Report to dbase

    When I connect SAP Crystal Report to dbase the error is "Database Connector Error", only when exist a field the type memo. I need to used this type of field, somebody that known how can I resolve this problem or some idea?
    Thanks a lot for your help.

    Hi,
    there are sevaral SAP Notes for your problem. Can you specify the databaseof the source?
    i.e. MS SQL Server -> Note 1212769
          dbase -> Note 1209347
    regards
    -Phil

  • How to configure jdbc/jndi connection in crystal report 10

    Post Author: effy
    CA Forum: Data Connectivity and SQL
    i have tried to configure jdbc/jndi connection , i have both
    drivers  data base side and  crystal report side but i
    can't  configure it.  so please help if u know
    something. 

    Sorry, but I'm not on a home pc, I'm working on a virtualized pc with a long chain of permissions ... so I cannot simply download and run an utility...
    Instead... I think (I WAS thinking) someone from SAP can tell me this info ... Probably I'll buy a paid assistance ticket... But really it's a strange thing that a simply connection from a (so) paid software need a so difficult problem solving routine..
    I edited my environment variales: JAVA, PATH; CLASSPATH; JAVA_DIR, and a long list of others ... to ALL point to ALL of directory containing used jars...
    .. I asked my SysAdmin to edit CrConfig.xml and it's done ... classpath are rights, jdbc infos are also ok, ...
    .. but none ...

  • Jdbc Connection And Crystal Reports

    Hi there;
       A tipical jdbc connection , that i found in my "googles" was something like this;
          PropertyBag connInfoProperties = new PropertyBag();
          connInfoProperties.putBooleanValue("Trusted_Connection", false);
          connInfoProperties.put("PreQEServerName", SERVICE);
          connInfoProperties.put("Server Type", "Oracle Server");
          connInfoProperties.put("Database DLL", "crdb_oracle.dll");
          connInfoProperties.put("ServerName", "");
          connInfoProperties.put("Server", SERVICE);
       And so - one .....
    But What I'm looking for is some thing is about passing one connection aready stabilished ; I mean , I want to prepare my connection envirorment before I pass it to crystal;
    Some thing like this connection "getConnection" result function; how can i pass it into crystal report?
    final class GetConnection {
      /** Uses JNDI and Datasource (preferred style).   */
      static Connection getJNDIConnection(){
        String DATASOURCE_CONTEXT = "java:comp/env/jdbc/blah";
        Connection result = null;
        try {
          Context initialContext = new InitialContext();
          if ( initialContext == null){
            log("JNDI problem. Cannot get InitialContext.");
          DataSource datasource = (DataSource)initialContext.lookup(DATASOURCE_CONTEXT);
          if (datasource != null) {
            result = datasource.getConnection();
          else {
            log("Failed to lookup datasource.");
        catch ( NamingException ex ) {
          log("Cannot get connection: " + ex);
        catch(SQLException ex){
          log("Cannot get connection: " + ex);
        return result;

    //boMainPropertyBag: These hold the attributes of the tables ConnectionInfo object
                PropertyBag boMainPropertyBag = new PropertyBag();
                //boInnerPropertyBag: These hold the attributes for the QE_LogonProperties
                //In the main property bag (boMainPropertyBag)
                PropertyBag boInnerPropertyBag = new PropertyBag();
                //Set the attributes for the boInnerPropertyBag
                boInnerPropertyBag.Add("File Path ", @"C:\CrystalReports\sc.xml");
                boInnerPropertyBag.Add("Internal Connection ID", "{680eee31-a16e-4f48-8efa-8765193dccdd}");
                //Set the attributes for the boMainPropertyBag
                boMainPropertyBag.Add("Database DLL", "crdb_adoplus.dll");
                boMainPropertyBag.Add("QE_DatabaseName", "");
                boMainPropertyBag.Add("QE_DatabaseType", "");
                //Add the QE_LogonProperties we set in the boInnerPropertyBag Object
                boMainPropertyBag.Add("QE_LogonProperties", boInnerPropertyBag);
                boMainPropertyBag.Add("QE_ServerDescription", "NewDataSet");
                boMainPropertyBag.Add("QE_SQLDB", "False");
                boMainPropertyBag.Add("SSO Enabled", "False");
                //Create a new ConnectionInfo object
                CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo boConnectionInfo =
                new CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo();
                //Pass the database properties to a connection info object
                boConnectionInfo.Attributes = boMainPropertyBag;
                //Set the connection kind
                boConnectionInfo.Kind = CrConnectionInfoKindEnum.crConnectionInfoKindCRQE;
                //*EDIT* Set the User Name and Password if required.
                boConnectionInfo.UserName = "";
                boConnectionInfo.Password = "";
                //Pass the connection information to the table
                boTable.ConnectionInfo = boConnectionInfo;
                //Get the Database Tables Collection for your report
                CrystalDecisions.ReportAppServer.DataDefModel.Tables boTables;
                boTables = rptClientDoc.DatabaseController.Database.Tables;
                //For each table in the report:
                // - Set the Table Name properties.
                // - Set the table location in the report to use the new modified table
                boTable.Name = "Orders";
                boTable.QualifiedName = "Orders";
                boTable.Alias = "Orders";
                rptClientDoc.DatabaseController.SetTableLocation(boTables[0], boTable);
                //Verify the database after adding substituting the new table.
                //To ensure that the table updates properly when adding Command tables or Stored Procedures.
                rptClientDoc.VerifyDatabase();
                MessageBox.Show("Data Source Set", "RAS", MessageBoxButtons.OK, MessageBoxIcon.Information);
    You'll have to adjust for your driver.
    Thank you
    Don

  • Unable to close JDBC connection in crystal reports

    Hi,
    I have configured crystal reports to use a connection acquired from a datasource created in weblogic server to generate a report. I was hoping that by calling ReportClientDocument.close() i would be closing the connected used to generate the report but that doesnot seem to be the case. I run into a situation where all my connections from the connection pool are being held by the reports and therefore get an exception in the application.
    Can anyome please let me know if calling ReportClientDocument.close()  will ensure that the database connection used for generating the report is closed? If no, please let me know what needs to be done in the code to ensure that a connection acquired for generating a report is closed.
    Thanks in advance
    VAMSI

    Hi Sanjay,
    Once connected right click on the connection an try adding filtering. Check off all except Tables and if you still don't see anything try adding table filtering to see if they show up now.
    Thank you
    Don

  • How to close database connections in Crystal Reports

    I am using the following code to connect to database. I can either pass JNDIName or I can provide values for others by leaving JNDI name empty.
    If i use JNDI name, it will use a connection from the connection pool of App Server (in my case Weblogic), but it is not releasing the connection after use. Connection remains even if I logoff from the application. If i keep my max connections as 15 in weblogic, after clicking the page with crystal report 15 times all will remain active and users will not be able to login to the application.
    If i use connectionString and others without using JNDI Name, it directly connects to database. So it creates a connection in database server directly without using connection pool of weblogic. If i check weblogic, it shows no connection in use as expected, but if i check database, i can see the no. of connections increasing everytime a user clicks a crystal report page.
    When the connection touches the maximum allowed connection in server, every application using the same server goes down
    How can I close the connection which was created for the viewing the report?
    String reportName = "/reports/BankBalance.rpt";
    ReportClientDocument clientDoc = (ReportClientDocument) session.getAttribute(reportName);
    if (clientDoc == null)
             clientDoc = new ReportClientDocument();
             clientDoc.setReportAppServer(ReportClientDocument.inprocConnectionString);
            // Open report
            clientDoc.open(reportName, OpenReportOptions._openAsReadOnly);
           String connectString = ""; // jdbc:sybase:Tds:DBSERVERNAME:9812/DBNAME?ServiceName=DBNAME
           String driverName = "";    // com.sybase.jdbc3.jdbc.SybDriver
           String JNDIName = "DS_APP";
           String userName = "";
           String password = "";
           // Switch all tables on the main report and sub reports
           CRJavaHelper.changeDataSource(clientDoc, userName, password, connectString, driverName, JNDIName);
         // logon to database
          CRJavaHelper.logonDataSource(clientDoc, userName, password);
    // Store the report document in session
    session.setAttribute(reportName, clientDoc);
                   // Create the CrystalReportViewer object
                          CrystalReportViewer crystalReportPageViewer = new CrystalReportViewer();
         String reportSourceSessionKey = reportName+"ReportSource";
         Object reportSource = session.getAttribute(reportSourceSessionKey);
         if (reportSource == null)
              reportSource = clientDoc.getReportSource();
              session.setAttribute(reportSourceSessionKey, reportSource);
         //     set the reportsource property of the viewer
         crystalReportPageViewer.setReportSource(reportSource);
         crystalReportPageViewer.setHasRefreshButton(true);
         crystalReportPageViewer.setToolPanelViewType(CrToolPanelViewTypeEnum.none);
         // Process the report
         crystalReportPageViewer.processHttpRequest(request, response, application, null);

    the sample shows how to clear RAS and Enterprise resources after viewing report.
    1. If you use unmanaged RAS - as I can see you using setReportAppServer, then remove the enterprise related stuff : instantiating and cleaning code.
    The sample code is meant to give you an idea on how you can release the resources after done with viewing report. In your case all you need to do for cleaning is call close() on ReportDocumentObject. The sample will need to be modified for your requirements.

  • PostgreSQL ODBC connection from Crystal reports, currency domain

    Hello,
    I'm attempting to get Crystal reports working with PostgreSQL with an
    ODBC connection, via psqlODBC. I can successfully establish the
    connection easily. However, I have a domain called "currency", that
    handles currency values:
    CREATE DOMAIN currency
    AS numeric(10,2);
    ALTER DOMAIN currency OWNER TO manager;
    fields of currency appear as "strings" in Crystal reports, and they
    lack fixed precision ( the value 1.00 appears as 1, for example). Why
    might this be? How can I get it to appear as a numeric type, which I
    can find the sum of, etc?
    Thanks,
    Sternocera

    If the currency field is appearing as a string in the crystal then you can convert it to currency by creating a formula using the function CCur().
    Try creating a formula like this
    CCur({currency field})
    Now you can calcualte the sum on this formula.
    Regards,
    Raghavendra

Maybe you are looking for

  • Purchase Order - Goods receipt processing time (User Exit)

    Hi All, I would like to know if there is any User Exits available for this scenario. In the Delivery tab of PO, we see GRPT & Planned Delivery Time, this information is picked up from the material master. In my case i have included the transport time

  • How to get sub cluster element's caption?

    Hi All, I have a big cluster, which contains several sub clusters. They are all typ def.  My queation is,  how to get the sub cluster element's caption? Thanks. Anne  Solved! Go to Solution.

  • Problem in data retriving

    hi guru, by the help of itcsy structure ,i fetched data from data base. REGUH-RWBTR. IN DATA BASE THE RWBTR VALUES ARE 1,000.00-  IN RUPPES. BUT WHEN I AM FETCHING IT SHOWS IN DEBUGGING MODE 1.000,00  RUPPES.MEANS HERE COMMA & FULL STOP CHANGING THER

  • CMAK support for L2TP IP/Sec VPN

    I have used the CMAK to create connections my users use to connect over VPN.  We are standing up a L2TP IP/Sec VPN solution and while I see that as a VPN option when manually creating the VPN connection option, I don't see L2TP IP/Sec as an option in

  • Checking for Purchases? Where'd they go!?

    I just bought a new laptop and I went and checked for purchases and it started to load my songs, well it loaded 195 songs, but I have over 500, where are the rest? Can someone please help me with this? Im growing impatient.