Need help connect Access Database to Crystal Report Viewer in java

Need example for passing parameters to PropertyBag Class and IConnectionInfo Class.
We use CR_JRC_11.8
Thanks

A sample that demonstrates how to change the database that a report uses at runtime in the JRC can be found at the following link on the SAP Portal:
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0ad3d3d-be66-2b10-2181-f46c6e05a420
To help determine what connection properties need to be changed at runtime through code, create a copy of your original report and use the Crystal Reports designer to change this report to new datasource manually.  You can then use the  jrc_display_connection_info helper sample to examine what the parameters should be in the property bag before setting the IConnection information.  The jrc_display_connection_info helper sample can be found at the following link on the SAP Portal:
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/706202a4-bd66-2b10-4e8b-92f4a8024ea1
Hope these samples help.
Regards.
- Robert

Similar Messages

  • InfoView Default Crystal Report Viewer to Java

    Anyone know how to do set the Infoview Crystal Report Viewer to Java as default in R3.1 ? We can do it from R2 CMC  but not anymore since upgrade.
    Our client computer doesn't allow ActiveX download.
    Thanks In advance,
    Tommy

    Hi,
    Did you tried by setting in InfoView itself.
    After logged in to InfoView, select the Preferences option and choose Crystal report as a reporting type.
    Here you can set the default viewer type when CR report is opened.
    -Noor.

  • How to integrate Crystal Report viewer on java swing Jframe

    Dear, I want to display crystal reports in java Desktop applicaion. can any one help me how can i display crystal report developed report in java application. i searched best but not able to find right direction.
    Regards,
    Sahibzada
    Edited by: Sahibzada on Jan 27, 2010 4:32 AM

    You can use [i-net Crystal-Clear|http://www.inetsoftware.de/products/crystal-clear]. It is a Java Reporting Framework that can read and execute Crystal Reports files. It is very easy with i-net Crystal-Clear to show a report which is design with Crystal Reports in a Java Swing application.

  • Error connecting to database from Crystal Report

    Hi,
    I am using Crystal report 2008, .NET 3.5 on Windows Server 2008 + SQL Server 2008
    I have a batch that generates report (via export) then this batch will send the exported report via email.
    I am encountering this error when reading report from BO Server
    Error: CrystalDecisions.CrystalReports.Engine.LogOnException: Database logon failed. ---> System.Runtime.InteropServices.COMException (0x8004100F): Database logon failed.
       at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
       at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
    While when trying to read the report from physical file within the server, it will give me this error
    Error: CrystalDecisions.CrystalReports.Engine.InternalException: Failed to retrieve data from the database.
    Details:  [Database Vendor Code: 2812 ]
    Failed to retrieve data from the database.
    Error in File IAREPORT {92DFCAFC-58AC-4CB3-B9DD-A9565E07088D}.rpt:
    Failed to retrieve data from the database.
    Details:  [Database Vendor Code: 2812 ] ---> System.Runtime.InteropServices.COMException (0x800002D3): Failed to retrieve data from the database.
    Details:  [Database Vendor Code: 2812 ]
    Failed to retrieve data from the database.
    Error in File IAREPORT {92DFCAFC-58AC-4CB3-B9DD-A9565E07088D}.rpt:
    Failed to retrieve data from the database.
    Details:  [Database Vendor Code: 2812 ]
       at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
       at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
    The report is working in our SIT environment but it is not working in our UAT environment.
    I have tried the following:
    1) running the batch (that generates the report) in SIT environment to call SIT database
    Working fine
    2) running the batch (that generates the report) in SIT environment to call UAT database
    Will give the above error
    3) running the batch (that generates the report) in UAT environment to call UAT database
    Will give the above error
    4) running the batch (that generates the report) in UAT environment to call SIT database
    Working fine
    For reading report from BO Server, I have tried viewing the report directly and scheduling the report directly from BO Server and it works fine.
    Also I have tried to 'verify database' on the UAT report, but it seems it didn't solve the issue.
    Does anyone have any idea how to solve this? Or what could cause this?
    Appreciate your help.
    Thanks.

    Here's how I connect to the database
    when reading report from bo server:
    Dim enterpriseSession As CrystalDecisions.Enterprise.EnterpriseSession
                Dim enterpriseService As CrystalDecisions.Enterprise.EnterpriseService
                Dim infoObjects As CrystalDecisions.Enterprise.InfoObjects
                Dim infoObject As CrystalDecisions.Enterprise.InfoObject
                Dim infoStore As CrystalDecisions.Enterprise.InfoStore
                Dim query As String = ""
                query = "SELECT * FROM CI_INFOOBJECTS WHERE SI_PROGID = 'CrystalEnterprise.Report' AND SI_NAME LIKE '" & reportName & "'"
                'Create a session manager
                Dim sessionMgr As New CrystalDecisions.Enterprise.SessionMgr
                'Log into BusinessObjects Enterprise
                enterpriseSession = sessionMgr.Logon(cu.BOXIUser, cu.BOXIPwd, cu.BOXIServer, cu.BOXIAuthentication)
                'Create the infostore object
                enterpriseService = enterpriseSession.GetService("InfoStore")
                infoStore = New CrystalDecisions.Enterprise.InfoStore(enterpriseService)
                infoObjects = infoStore.Query(query)
                If (infoObjects.Count > 0) Then
                    infoObject = infoObjects(1)
                    crDoc.Load(infoObject, enterpriseSession)
                    crDoc.SetParameterValue("@batchID", batchID)
                    Dim CrExportOptions As ExportOptions
                    Dim CrDiskFileDestinationOptions As New DiskFileDestinationOptions()
                    Dim CrPDFFormatOptions As New PdfRtfWordFormatOptions
                    Dim CrExcelFormatOptions As New ExcelFormatOptions
                    CrDiskFileDestinationOptions.DiskFileName = reportFile
                    CrExportOptions = crDoc.ExportOptions
                    With CrExportOptions
                        .ExportDestinationType = ExportDestinationType.DiskFile
                        .ExportFormatType = IIf(reportFormat = IAConstant.PDF, _
                                                ExportFormatType.PortableDocFormat, _
                                                IIf(FINRptFormat = IAConstant.EXCELONLY, _
                                                ExportFormatType.ExcelRecord, ExportFormatType.Excel))
                        .DestinationOptions = CrDiskFileDestinationOptions
                        .FormatOptions = IIf(reportFormat = IAConstant.PDF, _
                                             CrPDFFormatOptions, CrExcelFormatOptions)
                    End With
                    crDoc.Export()
                Else
                    Throw New ApplicationException(Constant.APP_ERR & " - Report not found")
                End If
    The error is thrown when trying to export --> crDoc.Export()
    The username and password are correct because it is the same username and password that the batch used to extract the data in the initial stage.
    Here's how my batch works:
    1) Extract and massage data directly from .net SP (this is working fine)
    2) Obtain the report then use the same connection string (for physical path report) or use the report connection string (for bo server report), this report is using Stored Procedure (the problem starts here)
    For reading report from bo server, I have also checked that the connection from the report itself is correct, because we can schedule/view the report from bo server successfully.
    SQL Driver, is it the SQL Native Client you are saying? It's SQL Native Client 10.
    I think we are using Business Objects Enterprise XI 3.1 Client Tools SP2 in our apps server.

  • Need help connecting to database on website!!!!

    Hi there
    I am doing a school project and have decided to make a database which i can store user info and car info (its a car auction program)
    But i am having trouble with the connection to the database... we have been told to use jdbc odbc connection so is there a way to use this method to connect to my database?
    this is my connection code when connecting to the database locally:
    con = DriverManager.getConnection("jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=CarDealership.accdb");
    i omitted the other code because it is pretty standard code to do this connection.
    But now i want to connect to a database of the same name on this site:
    sites.google.com/site/card3al3rsh1p
    what must i change in my code to be able to connect to the database on the internet????
    please please plssssssss help me really want to get this to work
    thanks and regards

    OK I apologise and realise I was in a rush. I will try explain more clearly now.
    I am using Netbeans 7 and am having troubles connecting my java program to a Microsoft Access database which is on this website:
    sites.google.com/site/card3al3rsh1p/
    The database name is "CarDealership.accdb".
    When I use the class below to connect to my database locally, it is a success.
    import java.sql.*;
    public class DB {
    Connection con;
    Statement stm;
    ResultSet rs;
    public DB(){
    try{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con = DriverManager.getConnection("jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=*CarDealership.accdb*");
    } catch(Exception ex){
    System.out.println("Error opening database.");
    System.out.println(ex);
    System.out.println("Database successfully opened.");
    However, when I change the bold text above (or the text between the asterisks, not sure if it will change) to "sites.google.com//site//card3al3rsh1p//CarDealership.accdb" it throws an error signifying that it can't find the file specified.
    I am unsure of how to connect my program to an external file so I need assistance in how to change the url String of the DriverManager.getConnection() method above so it can connect to the database on the website mentioned above. I would appreciate it if you could assist and thanks.

  • Need help in creating table in crystal report for visual studio 2010

    Since there is no table support in crystal report,how can I create a table in crystal report for visual studio 2010?
    I have a datatable and I need to show that in crystal report in table structure.
    I have tried using lines and boxes to generate the table but it is not working perfectly.
    How can I export the report in excel format in read/write mode saving all the formatting in the report

    Hi,
    Check sample codes from following:
    http://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsSDKSampleApplications
    You can download the [Developer's Guide|http://help.sap.com/businessobject/product_guides/boexir31/en/crsdk_net_dg_12_en.chm] & [API Guide|http://help.sap.com/businessobject/product_guides/boexir31/en/crsdk_net_apiRef_12_en.chm]
    Thanks,
    Saurabh

  • Complete novice needs help getting SQL Query into Crystal Reports XI

    Post Author: MissMarnie
    CA Forum: Data Connectivity and SQL
    So I was given an intro level web course and a monster reference guide in prep to format a report. One of our developers wrote me everything I need for the report into a SQL Query and now I'm supposed to format it in CR XII literally do not know what to do from here. I'm able to set up the correct server as a datasource, if that's useful, but I don't know how to make the querey into a bunch of formattable fields in  CR. If anyone can walk me through this, I'd be so grateful. I've attempted to look up SQL query in both the help and the book but I keep hitting a wall. The help dialog says things like "press this button" with no reference to what "this button" is. I'm sure it's obvious to the knowledgeable but I'm in a complete fog. Thanks in advance   

    Post Author: synapsevampire
    CA Forum: Data Connectivity and SQL
    IF you're trying to get assistance with setting up a query as the source for a report, try posting your Crystal version and the database type.
    Different software works differently.
    In CR 9 and above, under the connection to the database you'll see Add Command. Select that and you can paste the query in.
    As for not knowing how to generate a report, that requires experience, there's no generic solution of course..
    -k

  • Crystal reports viewer will not prompt for parameters

    Help,
    I can not get crystal report viewer to prompt for parameters when called from IIS 8 on Server 2012 r2
    I can get crystal report viewer to prompt for parameters when run from vs 2010 built in web service.

    Thanks,
    The solution for me was to uninstall the latest crystal reports runtime 13.10.x and install 13.6.x instead.
    Thanks anyway.

  • Need help Connecting Crystal Reports 8.5 with GBS Agency Expert 6.7.6c

    Need help Connecting Crystal Reports 8.5 with GBS Agency Expert 6.7.6c.  I need assistance on connecting these together so I can run a report.  I am not an IT person so if someone could dumb it down it would be great.
    Thanks,
    NBGHealth

    Hello,
    I assume GBS Agency Expert 6.7.6c is some sort of database or data source? If you have an ODBC driver then create or use a System DSN to the database. Then you can create a report using that DSN.
    Otherwise I suggest you contact the makers of GBS Agency Expert 6.7.6c and ask them how to connect to the database.
    Let them know CR is ANSII 92 ODBC 3 compliant.
    Thank you
    Don

  • Crystal Report Viewer Not Releasing Oracle Database Connections

    I have a very simple vb.net 3.5 web application that uses the Crystal Report viewer 2008 to open a report. My requirements are as follows:
    1. Reports are built by another company and provided to us and used in a web environment
    2. All reports contain parameter fields
    3. The web application must be generic enough that a report can be added to a list and the user simply selects the report and provides database login information. The Crystal report viewer with handle the request for parameter values and prompt the user for their values.
    4. All reports connect to an Oracle 10g server.
    The above requirements have been meet and we have an extremely simple web application that runs the reports. It is working very well other than the crystal report viewer is not releasing the database connections. This is bad because the credentials are on a per user basis and that same user must login to a different oracle application simultaneously. They are being denied access because the credentials are already in use. We do not have control nor influence over the policies in use on the Oracle server. Ideally we would like to control the Crystal Report viewer so that it closes connections after use.
    The web application code is:
    Private Sub viewReports_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
    If Not IsPostBack Then
    ConfigureCrystalReport()
    End If
    End Sub
    Private Sub ConfigureCrystalReport()
    'Load the Crystal Report viewer with a report.
    Try
    Dim reportPath As String = Server.MapPath(Session("reportname"))
    crViewer.ReportSource = reportPath
    Catch ex As Exception
    Response.Write(Server.MapPath(Session("reportname")) & "
    " & ex.Message.ToString & "
    " & ex.StackTrace.ToString)
    End Try
    End Sub
    Can anyone shed some light on this topic? Thank you

    Hello, Timothy;
    By default, having the report in session will hold it open for 20 minutes.
    If you create the report as a ReportDocument object you can take it out of session and release it more efficiently. That will release the connection.
        Private Sub ConfigureCrystalReports()
            If (Session("hierarchicalGroupingReport") Is Nothing) Then
                hierarchicalGroupingReport = New ReportDocument()
                hierarchicalGroupingReport.Load(Server.MapPath("Hierarchical Grouping.rpt"))
                Session("hierarchicalGroupingReport") = hierarchicalGroupingReport
            Else
                hierarchicalGroupingReport = CType(Session("hierarchicalGroupingReport"), ReportDocument)
            End If
            myCrystalReportViewer.ReportSource = hierarchicalGroupingReport
        End Sub
    In the Form Unload of the Viewer:
                'Take the report out of session
                Session("hierarchicalGroupingReport")  = Nothing
                Session.Contents.Remove("hierarchicalGroupingReport")
                'Clean up the ReportDocument object
                hierarchicalGroupingReport.Close
                hierarchicalGroupingReport.Dispose()
                hierarchicalGroupingReport = Nothing
                GC.Collect()
    Elaine

  • Connection to Embeded Database from Crystal Reports XI

    I am writing an application that uses a SQL Server Mobile Database.  I have not been able to determine how to connect to this database through Crystal Reports.
    1.  Is it possible?
    2.  How do I provide the connection string that uses only 2 parameters?
    Gene

    When you create a DSN the ODBC string expects information for Server, Database, Username, and Password.  When you are working with an Embedded Database, typically you have a filename and a password (which can be null).  I was not able to create a DSN for this connection.
    What I have been able to get working is the following:
    1.  Create an ADO DataSet Object within the application.
    2,  Create the CR attaching ot the DataSet Object.
    3.  In the application code where you are attaching the CR to a viewer you must
          a.  Define a Data Adaptor for the DataSet.
          b.  Define a Data Table and load the table from the DataSet GetData() method.
          c.  Define the full path to the report file.
          d.  Define a ReportDocument Object
          e.  Load the report path in the the ReportDocument Object
          f.  Define the DataTable as the Data Source to the ReportDocument Object
          g. Define the Viewer ReportSource as the ReportDocument Object.
    I have been able to use this approach on 3 separate reports and returned the correct data.  A lot of steps, but it is working.
    GFKerls

  • Open programatically Crystal Report Viewer XI from MS Access 2003

    Thank you in Advance!!!
    I got the following VBA code.
    1) What library do I need to include to access Crystal Report Viewer XI?
    2) How do I declare CRViewer11 to open Crystal Report Viewer XI and a created report?
    Please look at ***???
    Dim crrpt As New CRAXDRT.Report
    Dim crapp As New CRAXDRT.Application
    ***???Problem here: Dim CRViewer11 As New CrystalActiveXReportViewer
    Dim myParamField As CRAXDRT.ParameterFieldDefinition
    Dim intCounterPartyId, intNoCreditLimit, intAllAccounts, intOpenTrades, intOpenFail, intOpenOver As Integer
    Dim dtFirstDayOfYear As Date
    Dim dblCreditUsed, dblYTDAmount As Double
    Dim db As Database, rs As Recordset, strSql, strFileName, strMsg As String
    Dim strAttachDir, strAttachment, strReportDir, strCrReport As String
    'Set db = CurrentDb
    strAttachDir = "T:\Work\"
    'open crystal report(rpt)
    strReportDir = "T:\Work\"
    strCrReport = "TimeDetailwithData.rpt"
    Set crrpt = crapp.OpenReport(strReportDir & strCrReport)
    strFileName = Format(Now(), "YYYY-MM-DD-HHMM") & "-TimeDetail.rpt"
    strAttachment = strAttachDir & strFileName
    crrpt.DiscardSavedData
    'SET PARAMETER FIELDS
    Set myParamFields = crrpt.ParameterFields
    For Each myParamField In myParamFields
    With myParamField
    Select Case .ParameterFieldName
    Case "StartPeriod"
    .SetCurrentValue CDate("2008-7-16")
    Case "EndPeriod"
    .SetCurrentValue CDate("2008-7-17")
    Case "Org - Comp"
    .SetCurrentValue "2WV"
    Case "Org - Dpt"
    .SetCurrentValue "300"
    Case "Org - Fac"
    .SetCurrentValue "01302"
    End Select
    End With
    Next
    crrpt.EnableParameterPrompting = False
    crrpt.ExportOptions.FormatType = crEFTCrystalReport70
    crrpt.ExportOptions.DestinationType = crEDTDiskFile
    crrpt.ExportOptions.DiskFileName = strAttachment
    crrpt.Export False
    Set CRViewer11 = crapp.OpenReport(strAttachment)
    ***???Problem here: CRViewer11.ReportSource = strAttachment
    ***???Problem here: CRViewer11.ViewReport

    You will have to use the Crystal Reports Report Designer Component (craxdrt.dll). Before you do however, it may be good to know that CR XI r2 is the last version of CR that includes the craxdrt.dll as this is considered to be a retired technology in CR 2008. This may impact your efforts as the life cycle of the app may be limited(?).
    Here is a link to more details of the  RDC lifecycle:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/80bd35e5-c71d-2b10-4593-d09907d95289
    A bit of code help:
    https://smpdl.sap-ag.de/~sapidp/012002523100006013432008E/rdc_vba.exe
    A note on connecting to databases:
    https://smpdl.sap-ag.de/~sapidp/012002523100006008462008E/crxir2.zip
    Help file:
    rdcsdk_com_dg.chm
    C:Program FilesBusiness ObjectsCrystal Reports 11.5Helpen
    dcsdk_com_dg_docdoc
    Ludek

  • Switch database in Crystal Report 2013

    Hi All,
    I have Crystal Report 2013 and my client require to connect multiple database with single report. I have more than 10 MySql database and all database structure are same.
    E.g. Create one report Employee Detail and connect using ODBC (RDO) I have successfully connected my single MySql database. Now I need to use this report for another database.
    My question is how to switch database at runtime?
    Anybody help me please.
    Thanks.

    You can create either a .NET or a Java app to schedule or view the report - it would connect in to the CMS and handle things from there.  It's not difficult to set the database connection in code.  Your best bet for additional help will be to look here:  http://scn.sap.com/community/bi-platform/microsoft-net-sdk or here:http://scn.sap.com/community/bi-platform/java-sdk.  There is sample code available in both places as well.
    Also, while I know that the utility Ido is referring to  will work with Crystal reports, I'm not entirely sure it will work with reports that reside in CRS.  So, you'll need to review it closely to determine whether it will work for you.
    -Dell

  • SQL Connections remain open after Crystal Report closes

    I am wirting an interface to use the crystal report viewer to print reports, connecting to a Progress Open Edge 10.1B database.  From our application we declare the application, report, exportoptions and connectionproperties objects and pass these to the crystal reports viewer.  Once the report is printed we release the objects and set their variables for null.  However we are finding that the SQL connection to the database is remaining connected and we can only release the connection by manually going in a disconnecting.
    I have read in forums that people use .dispose or .close to release the connection, however we do not have access to these methods as we do not use .NET.  Are there any methods we can use to disconnect these sql connections?

    Hi Dean,
    Moved to the Legacy Application forums. Likely using the RDC as your report engine.
    You should still be able to close and dispose of the report objects. They are not specific to .NET.
    In VB it would look something like these lines::
        crReport.Close
        Set CrystalActiveXReportViewer1.ReportSource = Nothing
        Set crReport = Nothing
    Once the report is closed it should disconnect from the DB. If you close the application does that disconnect?
    Have you looked on 4GL's site for info on how to?
    Thank you
    Don

  • How to change the database in Crystal reports

    To give an overview there is one project going on where the oracle database is getting migrated from 10g to 11g.
    All the details of database like IP, port etc are changing as part of this.
    I can see the driver name configured as crdb_ado (Custom driver).
    We have an test environment for 11g against which we have to point all the reports and test it.
    Could you please let me know the below queries
    Where and how to change the IP details in the crystal reports to point to new test and prod databases.
    Overview on this crdb_ado driver
      Basically the database is getting changed and we want the reports to point and run from the new database.
    Thanks

    Hi Vissu,
    Thanks for your reply.
    We need to change the database from the reports which are already running from central management console.
    I can see a custom driver crdb_ado is being used and it connects to a database.
    Could you please let me know where the database configuration is done.
    Ideally we need to add one more database to a config file which i am not able to find.
    I guess it should be similar to tnsnames.ora file in oracle where the different databases are stored.
    From the above image I would like to know where the server details (NECTAR_Prod) would be configured.
    Thanks in advance

Maybe you are looking for

  • How can I convert from 8.2.1 to 7.1.1?

     I would like to convert the following files from 8.2.1 to 7.1.1.  Is this possible without just having someone else do it inside 8.2?  If not, then can someone please convert them for me?  They are listed in order of most needed.  Thanks for the hel

  • Ipod nano says cannot update playlists due to lack of available space

    Recently after I left my ipod nano charging overnight mysteriously all the songs were removed from it (not on my computer - just the ipod unit). Whenever I try to "Update Administrator iPod" it comes up with the message that it doesn't have enough sp

  • Slow logons on windows 2012 server and windows 7 sp 1 devivce

    Hello everybody, I've a windows user reporting slow logons on one of our clients. The domain is a 2012 domain and the device with the issue is a windows 7 sp1. The winlogon message event ID 6005 appears (winlogon taking too long to handle notificatio

  • Why is my Illustrator a tryout version?!

    Hi there I have had some issues with installing CS5 Design Premium (Win) but as one particular problem related to Illustrator, I thought I should post this query here. For some reason when I open this application, it is opening as a "tryout" version.

  • Recycling Program in UK?

    Hi there, is there any recycling program in UK? I saw this program on US apple website, where people could trade in old iphones as gift card. Is this provided in uk?