Connection String with Crystal Report XI R2

Hello,
I am having an issue with Crystal Reports XI R2 and figured this would be a good place to start and post my question.
I created a report in Crystal Reports XI and am now trying to pass the user id and password so that the user can just run the report. I attempted to use the Crystal Report connection string setup but receive an Microsoft ODBC error when trying to use that.
My question is how can you pass a userid and password to crystal report XI so that when you open the report it runs without prompting the user? I do not have access to .NET. Can this be done using Crystal Reports XI only?
Thanks in advance for your help
Shaun

Hi Shawn,
Standalone CR can only do that if using a URL to open a report in BOE.
For CR Designer itself the only option is to turn on Trusted Authentication in your Server, used Mixed mode and then import all of your users into SQL Server. Refer to MS's Help file on how to.
Now when the user runs the reports CR will simply pass the local user info to SQL Server and no prompting will be required. We still respect DB security so if the user is not allowed to access the table then CR respects that.
Thank you
Don

Similar Messages

  • Linq2sql Connection string for crystal report. Report requires logon

    If I take out the connection string info the report runs fine from my machine but any other user it asks for logon information so I am trying to add the connection info. The line that is not compiling is `cr1.SetDatabaseLogon(connection, cr1);`
    What am I doing wrong? Any help would be appreciated!
        private void launchReport(int pKReport)
            using (DataClasses1DataContext db = new DataClasses1DataContext())
                var query = (from s in db.expenseHdrs
                             join d in db.expenseDtls on s.rptNo equals d.rptNo
                             where s.rptNo == pKReport
                             from g in db.employees
                             join r in db.expenseHdrs on g.pk equals r.empPk
                             select new
                                 s.period,
                                 s.description,
                                 s.department,
                                 s.rptNo,
                                 s.reimbursement, g.name,
                                 d.expDate,
                                 d.expType,
                                 d.expDesc
                CrystalReport1 cr1 = new CrystalReport1();
                ConnectionInfo connection = new ConnectionInfo();
                connection.DatabaseName = "intranet";
                connection.UserID = "sa";
                connection.Password = "*****";
                cr1.SetDatabaseLogon(connection, cr1);
                cr1.SetDataSource(query);
                crystalReportViewer1.ReportSource = cr1;
    I also tried changing the code after my query to below but I still have the exact same problem as before when I didnt have the connection string credentials. On every user but myself I get the same sql server login screen and no matter what I enter it fails. I think it is due to there being no database name which it will not allow me to manually enter.
         CrystalReport1 cr1 = new CrystalReport1();
                    cr1.FileName = @"C:\Intranet\CrystalReport1.rpt";
                    ConnectionInfo connectionInfo = new ConnectionInfo();
                    connectionInfo.ServerName = "svr-sql";
                    connectionInfo.DatabaseName = "intranet";
                    connectionInfo.UserID = "sa";
                    connectionInfo.Password = "*****";
                    SetDBLogonForReport(connectionInfo, cr1);
                    cr1.SetDataSource(query);
                    crystalReportViewer1.ReportSource = cr1;
        private void SetDBLogonForReport(ConnectionInfo connectionInfo, CrystalReport reportDocument)
                Tables tables = reportDocument.Database.Tables;
                foreach (CrystalDecisions.CrystalReports.Engine.Table table in tables)
                    TableLogOnInfo tableLogonInfo = table.LogOnInfo;
                    tableLogonInfo.ConnectionInfo = connectionInfo;
                    table.ApplyLogOnInfo(tableLogonInfo);

    The code I use is as follows:
    Dim crDatabase As Database
    Dim crTables As Tables
    Dim crTable As Table
    Dim crTableLogOnInfo As TableLogOnInfo
    Dim crConnectionInfo As ConnectionInfo
    Dim crReportDocument As ReportDocument
    CrConnectionInfo = New ConnectionInfo
    With crConnectionInfo
    .ServerName = "dbconn1"
    .DatabaseName = "Pubs"
    .UserID = "vantech"
    .Password = "vantech"
    crDatabase = crReportDocument.Database
    crTables = crDatabase.Tables
    End With
    crDatabase = crReportDocument.Database
    crTables = crDatabase.Tables
    For Each crTable In crTables
    crTableLogOnInfo = crTable.LogOnInfo
    crTableLogOnInfo.ConnectionInfo = crConnectionInfo
    crTable.ApplyLogOnInfo(crTableLogOnInfo)
    Next
    This assumes that there are no subreports (or at least that if there are subreports, they use identical db connection info).
    My recommendation would be to test the above code with a simple test report (one table, one field). If you have subreports, you may need to set the logon for those also - depends on how the subreports are implemented. Subreport logon code would be something like this:
    Dim crSubreportDocument As ReportDocument
    crSubreportDocument = crReportDocument.OpenSubreport("Ron")
    crConnectionInfo = New ConnectionInfo
    With crConnectionInfo
    .ServerName = "Rcon1"
    .DatabaseName = "Northwind"
    .UserID = "vantech"
    .Password = "vantech"
    End With
    crDatabase = crSubreportDocument.Database
    crTables = crDatabase.Tables
    For Each crTable In crTables
    crTableLogOnInfo = crTable.LogOnInfo
    crTableLogOnInfo.ConnectionInfo = crConnectionInfo
    crTable.ApplyLogOnInfo(crTableLogOnInfo)
    Next
    Alternatively, you could download the db logon writing utility that is attached to this KB and implement that.
    - Ludek
    Follow us on Twitter
    Got Enhancement ideas? Try the SAP Idea Place
    Share Your Knowledge in SCN Topic Spaces

  • How to Connect Oracle with Crystal Reports

    Hi Everyone,
    I am new to Crystal Report,
    Just tell me how to connect Crystal Report thro' Oracle 9i or 10g Forms
    With regards,
    Krishnan

    You may want to use ODBC for the connectivity.

  • Connection error with Crystal Report XI, VB6 and Sybase ASE15

    Hello !
    I have an error #4002 when I want to launch a report in VB6 with the ActiveX Crystal Report Viewer.
    I use Sybase ASE 15 with an ODBC link and the reports run stored procedures.
    This error seems to be an authentification error, but I don't know what parameters are missing or wrong...
    - My reports works well in the report designer.
    - The reports connected to a text file or an ADO recordset work in VB6.
    - The Verify Database works in design mode in VB6.
    - The problem is the same with tables, stored procedures, SQL and with or without parameters...
    - I tried to connect the report to a DataEnvironnment but I get the same error.
    The problem appears when I use the Crystal Wizard to create a form automatically AND when I create objects directly in code like :
        Dim crapp As CRAXDRT.Application
        Dim oReport As CRAXDRT.Report
        Set crapp = New CRAXDRT.Application
        Set oReport = crapp.OpenReport("C:\myreport.rpt")
        CRViewer.ReportSource = oReport
        CRViewer.viewReport
    Please help !

    Hello,
    I don't see any database logon code in what you posted.  You need to log onto the database at runtime since Crystal Reports will never store passwords.
    You can download and review the [Connection Properties|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00635998-751e-2b10-9cba-f50ee1e4ef81] document for more information on how to log onto your database at runtime.  This document was written for CR9, but it's the same for CR10, CR XI (v11.0), and CR XI R2 (v11.5).
    I hope this helps.
    Sincerely,
    Dan Kelleher

  • How to connect Java to crystal report

    How to connect java with crystal report ?
    Which are the API's for that

    In all this time you never considered searching?
    Cross post
    http://forum.java.sun.com/thread.jspa?threadID=791154

  • 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

  • INTERNET CONNECTION NOT DETECTED message with Crystal Reports 2011

    Hello:
         We upgrade from SQL 3008 R2 to SQL 2012 SP1.   Had trouble with Crystal Reports not opening reports.  Information on the internet indicated that you had to reinstall Crystal Reports after upgrading SQL.  We did a repair of Crystal Reports 2011.  I have the box checked to check for updates when Crystal Reports starts.  I am now getting INTERNET CONNECTION NOT DETECTED and the application will not check for updates.  We have tried turning of the firewall and almost everything else we can think of.  I have access to the internet from that server and IE9 works just fine.  Can anyone help, please.
    Thank You,
    Jack G.

    Hello Jack,
    This one helps: INTERNET CONNECTION NOT DETECTED
    Internet Connection failure
    --Dhana

  • Can JDeveloper work with Crystal Report?

    I try to open Crystal Report with Jdeveloper, but I could not. Do anyone know if JDeveloper worked with Crystal Report. If anyone knows how, please show me. Thank you in advance.

    For example, I have a report name "report1.rpt" which was saved under "C:\oracle\Jdev9052\jdev\mywork\HR\HR\public_html". Beside that I also have all the required jar files and folder crystalreportviewer added to my project. But everytime I run it, I received "The page cannot be displayed". Please help me to point out the problem. Thanks.
    <%@ page import= "com.crystaldecisions.report.web.viewer.*,
    com.crystaldecisions.sdk.occa.report.data.*" %>
    <%@ page import="com.crystaldecisions.reports.reportengineinterface.JPEReportSourceFactory,
    com.crystaldecisions.sdk.occa.report.reportsource.IReportSourceFactory2,
    com.crystaldecisions.sdk.occa.report.reportsource.IReportSource" %>
    <%
    // This is the database logon section of this report
    IReportSourceFactory2 rptSrcFactory = new JPEReportSourceFactory();
    String report = "report1.rpt";
    IReportSource reportSource = (IReportSource) rptSrcFactory.createReportSource(report, request.getLocale());
    CrystalReportViewer viewer = new CrystalReportViewer();
    viewer.setName("Test Report");
    viewer.setReportSource(reportSource);
    // now provide the viewer with the connection information
    response.getOutputStream().flush();
    viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), out);
    viewer.dispose();
    %>
    -- A part of the config.xml file
    <?xml version="1.0" encoding="utf-8"?><CrystalReportEngine-configuration>
    <!--<reportlocation>../..</reportlocation>-->
    <timeout>10</timeout>
    <ExternalFunctionLibraryClassNames>
              <classname></classname>
              <classname></classname>
    </ExternalFunctionLibraryClassNames>

  • Error: Failed to open the connection when opening Crystal Report in CMC or

    Hello all,
    I am getting theError: Failed to open the connection when opening Crystal Report in CMC or Infoview
    with access database as the datasource which is in the network drive.

    Hi Sonali,
    This is because Crystal Reports does not recognize database connection from share drive
    1. Save the database locally on server machine
    2. Create a new database on server and link the new database with the database on Network.
    Steps to link the database.
    1.Create a new test database on server.
    2. Go to File --> Get External Data --> Link tables | Select the database on Network Drive.
    3. Select all the tables from the database.
    4. Save the Database  e.g. Test.mdb.
    5. Create an ODBC Connection on server machine, with the same name as on client machine using test.mdb database.
    Note: Click on Advanced button, enter the default user id and password for the odbc connection, it is not mandatory to give Login Name and Password, only if the user id and password are given then we need to provide the same user id and password in the CMC database configuration.
    6. Create a report using this ODBC connection, and save the report to Enterprise.
    Regards,
    Navin

  • How to start with crystal reports

    Dear Experts,
    I am new to crystal reports, request you to kindly provide any tutorials or How to guides, so that I can start with  Crystal reports.
    Also tell what would be the Software/Hardware required to start with crystal reports.
    Currently we are on ECC 6.0 and SAP enterprise portal 7.0.
    Kindly Suggest.
    Warm Regards
    Upendra Agrawal

    I am assuming that u r going to develop reports off SAP datasource.For that purpose, You need to install Crystal Reports 2008 sp1/2 and SAP soluton KIt.
    Please read the following blog series which is the best place to start with Crystal Reports and SAP Connectivity:
    [http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417700)ID1177950950DB01199698694723595985End?blog=/pub/wlg/8560]
    SAP Integration Kit Blog:
    [http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417700)ID1177950950DB01199698694723595985End?blog=/pub/wlg/11076]
    Hope this will help you!

  • JDBC connection error in Crystal Reporting through ESRI Dekho product

    Wow, I am so far out of my depth here I am not even sure I am in the correct forum.  I have recently started using the GIS software ESRI product Dekho (a web based browser basically) and the reporting tool is Crystal Reports.  The JDBC connection required for me to connect to data held in a corporate oracle db is failing with a driver error and I don't know how to troubleshoot it.  ESRI support seem to think it's a Crystal Reports issue.  If anyone has any idea what I am talking about please respond, including pointing me to a forum which might assist, if this one is not where I should be asking such a question.  Thanks in advance.

    Simon here from Esri Australia, I work in the support team for the Dekho product, that this client was having problems with.
    We established that our Dekho product was passing the relevant information over to Crystal and that Crystal was having issues connecting to a database due to an issue with Crystal not having the correct JBDC drivers installed.
    = Therefore we concluded that the client should get in touch with you to resolve these JDBC driver issues.
    The error in the report is:
    ['Failed to open the connection, Details:JDBC driver not found"|http://i7.photobucket.com/albums/y254/jak-c/Outlook1.jpg]
    We believe that the issue is specifically a Crystal Reports issue on connecting to an Oracle database. 
    If we take Dekho out of the equation, the issue is still apparent.
    We did some testing on Oracle XE and were able to get it to communicate with Crystal Reports ok.
    We had to make the following change:
    1. copied the database drivers from:
    C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib
    to
    C:\Program Files (x86)\Business Objects\Common\4.0\java\lib\external\
    2. Edit "C:\Program Files (x86)\Business Objects\Common\4.0\java\lib" to include the above JAR file into the classpath tag.
    We touch on this in [our own web-help|http://www.dekho.com.au/help/31/default.htm?turl=Documents%2Fconfigurecrystalreports.htm], although this is more specific to SQL Server.
    The client had problems setting up this Crystal Reports to Oracle link, due to drivers missing.
    Can you generate a support ticket for this client and assist her with getting CR drivers working with her version of Oracle?
    As a sidenote - Esri Australia is a distributor for Esri, and not sure if the OEM extends to us?
    We would like to get a better relationship with you on how to deal with Crystal related issues with our own product.
    For issues like the above, we would like to come up with a more efficient means for our clients to get resolutions to their issues, and if the issue stems to outside our product - a good process for our support team to log a ticket on behalf of our client and pass all the relevant info across, so that a solution can be resolved quickly.
    - Do you have a contact in Australia that we could talk to about this?
    Let me know if you need the clients contact details - I believe this is still an issue for her.

  • Images with Crystal Reports

    Somebody pls. advise if it's possible to display images with Crystal Reports ?!
    I want to generate a Price Catalog with images.   I have uploaded images into the system.
    Unfortunately, Oracle Report Builder has let me down.
    A short tutorial on how to achieve this will be useful as i am still trying to get acquainted with CR.
    Cheers - Mave

    Hi..
    I saw your snap shot, in your snap shot you are selecting table fields.  The option is much before selecting table fields.
    Like :
    a. Select Standard Report wizard
    b. It ask you to connect to your datasource (ODBC / OLE DB /Native)
    c.Once you connect to your database you will see below options
       - Your Database Name
          Add Command
          Tables
          Views
          Stored Procedures
    Here you need to select Add Command and it will opend a window to type your sql.
    Thanks,
    Sastry

  • Building Connection string in Crystal 10

    Hi,
    How to build a connection string in Crystal 10 using DSN as data source?
    I tried the following syntax, but failed to establish connection...
    Driver={SQL Server};Server=;Uid=<username>;Pwd=<pwd>;
    Help me to fix this out.
    Thanks
    Viswa

    Hey Prathamesh,
    I was asking the option available in the crystal client itself!
    In the data source selection, there is three options available:
    1. Data Source Name
    2. File name DSN
    3. Enter Connection String
    I asked about the 3rd option in that dialog; in which we can directly enter the connection string for the data source connection. I don't think this is related with SDK Application Development.
    Thanks
    Viswa
    Edited by: Viswanathan Madhavan on Nov 27, 2008 3:08 AM

  • Expression Based Connection String Failing on Report Manager

    Hello,
    i have this report, where i want it the language selection to be dynamic. And so implemented the below expression, to my surprise everything works fine on BIDS but when i deploy to report Manager it errors out! (report manager language is en-US)
    ="Data Source=localhost;Initial Catalog=" & CHR(34) &"AdventureWorks
    DW SSAS" &CHR(34)&";Locale Identifier=" & switch(User!Language="en-US","1033")
    Any help would be greatly appreciated.
    Thanks,
    naveej

    Hi naveej,
    As per my understanding, connect string with “Locale Identifier” is used to select the language to make dataset return any translations we have present in the cube. The connect string which you posted is used to make the report with English language appears
    to the user. After testing the connect string in my environment, it works well. Even when the report manager use other language (not en-US), the report also work well. So I’m curious about what error you received, could you post it more detail?
    The following document about how language versions are used throughout a Reporting Services installation is for your reference:
    http://msdn.microsoft.com/en-us/library/ms156493.aspx
    If there are any misunderstanding, please elaborate the issue for further investigation.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Error when startup WPF Application with Crystal Report !

    Hi!
    I have an error when build & run a WPF Application with Crystal Report. Can anyone help me ?
    First, I created 2 project, one is the WPF Application & one is Shell Start Up project (to show loading screen, then show main window when loaded, is WPF Application too)
    WPF Application:
    /// <summary>
        /// Interaction logic for MainWindow.xaml
        /// </summary>
        public partial class MainWindow : Window {
            public MainWindow() {
                InitializeComponent();
               // crViewer is SAPBusinessObjects.WPF.Viewer.CrystalReportsViewer
                crViewer.ViewerCore.ReportSource = new CrystalReport1(); // Assign report to viewer
    Shell Startup:
    [STAThread]
            public static void Main(string[] args) {
                AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
                Application app = new Application();
                ShowLoadingWindow(); // Show loading screen
                MainWindow mw = new MainWindow();
                mw.Show();
                app.Run();   
            static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) {
                // Exception was throw here
    And here is the exception & it's stack trace
    Message:  Object reference not set to an instance of an object.
    Stacktrace:
    at SAPBusinessObjects.WPF.Viewer.ViewerCore.<>c__DisplayClass1.<set_ReportSource>b__0()
       at SAPBusinessObjects.WPF.Viewer.DelegateMarshaler.<>c__DisplayClass29.<QueueOnThreadPoolThread>b__28(Object )
       at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

    As far as I know the error is typically due to the fact that I'm trying to address an object that has not been set. E.g.; this could be due to  bad scoping, bad inits/constructs, trying to access a member of a class without instance object and so on. I suspect this is a design \ code issue. You might be able to confirm this using [Process Monitor|http://technet.microsoft.com/en-ca/sysinternals/bb896645.aspx].
    Other than that, I'd recommend creating a phone case here:
    http://store.businessobjects.com/store/bobjamer/en_US/pd/productID.98078100?resid=S6I@hgoHAkEAAGsiyVkAAAAR&rests=1282226845369
    - Ludek

Maybe you are looking for