Crystal Report Viewer requests login information for subreport

I am using CR 11.5 with MSSQL 2000. I have a report that includes a subreport that pulls information from a different database than the main report. When I run the report through my .net application, it requests a password for the secondary database. If I supply the password, the report will run correctly, however, I cannot give out the password to regular users.
Is there a way to supply the password for the secondary database within the application?
Thank you,
David

Log on subreport code would be something like this:
crSubreportDocument = crReportDocument.OpenSubreport("Ron")
crConnectionInfo = New ConnectionInfo
With crConnectionInfo
.ServerName = "Rcon1"
.DatabaseName = "Northwind"
.UserID = "van"
.Password = "van"
End With
crDatabase = crSubreportDocument.Database
crTables = crDatabase.Tables
For Each crTable In crTables
crTableLogOnInfo = crTable.LogOnInfo
crTableLogOnInfo.ConnectionInfo = crConnectionInfo
crTable.ApplyLogOnInfo(crTableLogOnInfo)
Next
For more help, see the samples documented in this wiki:
https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
Recommend vbnet_win_subreport_logon.zip or csharp_win_subreport_logon.zip.
Ludek
Edited by: Ludek Uher on Oct 19, 2009 8:38 AM

Similar Messages

  • 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.

  • Crystal report Viewer Session times out for more data in Portal

    Hi All,         
         I am using below java SDK code to render a report in crystal report viewer. When i refresh report with more data(more parameter value) the server session times out in portal. Is there any way to fix this issue. The report loads data and then displays in Crystal report viewer, When more data is there the server times out as the server time is set to 60 sec. Is there any way to open the crystal report viewer as and when the report loads data to avoid server time out isse.
    Please help . Please let me know if I am missing something.. Thanks in Advance!!!
    CODE;
    <%@page language="java" contentType="text/html; charset=ISO-8859-1"
           pageEncoding="ISO-8859-1" session="false"%>
    <%@page
           import="com.crystaldecisions.sdk.occa.report.application.OpenReportOptions"%>
    <%@page
           import="com.crystaldecisions.sdk.occa.report.application.ReportClientDocument"%>
    <%@page
           import="com.crystaldecisions.sdk.occa.report.application.ParameterFieldController"%>
    <%@page
           import="com.crystaldecisions.sdk.occa.report.lib.ReportSDKException"%>
    <%@page
           import="com.crystaldecisions.report.web.viewer.CrystalReportViewer"%>
           <%@page import="com.crystaldecisions.report.web.viewer.*"%>
    <%@page
           import="com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase"%>
    <%@page
           import="com.crystaldecisions.sdk.occa.report.reportsource.IReportSource"%>
    <%@page import="java.io.Writer"%>
    <%@page import="java.io.IOException "%>
    <%@ page import="com.crystaldecisions.report.web.viewer.ReportExportControl" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.exportoptions.ExportOptions" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.exportoptions.ReportExportFormat" %>
    <%@page
           import="com.crystaldecisions.sdk.occa.report.application.DatabaseController"%>
                  <%@page
           import="com.crystaldecisions.sdk.occa.report.application.ReportSaveAsOptions"%>
           <% response.setHeader("pragma","no-cache");//HTTP 1.1
    response.setHeader("Cache-Control","no-cache");
    response.setHeader("Cache-Control","no-store");
    response.addDateHeader("Expires", -1);
    response.setDateHeader("max-age", 0);
    //response.setIntHeader ("Expires", -1);
    //prevents caching at the proxy server
    response.addHeader("cache-Control", "private"); %>
    <%
           String reportPath,Sharedpath;
           ReportClientDocument reportClientDocument;
                ParameterFieldController parameterFieldController;
                try{
                    reportPath = "reportlocation";
                 Sharedpath = "Target Location";
                    reportClientDocument = new ReportClientDocument();
                    reportClientDocument.setReportAppServer(ReportClientDocument.inprocConnectionString);
                         reportClientDocument.open(reportPath, OpenReportOptions._openAsReadOnly);
                         reportClientDocument.getDatabaseController().logon("Dbname", "dbpassword");              
                         System.out.println("Connecting...");
                       parameterFieldController = reportClientDocument.getDataDefController()
                   .getParameterFieldController();
                    parameterFieldController.setCurrentValues("", "param 1",
                         new Object[] {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,29});
    parameterFieldController.setCurrentValues("", "Param 2",
                  new Object[] {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23});
    reportClientDocument.saveAs("Target Report Name","Target Location", ReportSaveAsOptions._overwriteExisting);
           reportClientDocument.close();
           System.out.println("Finished...");              
    CrystalReportViewer viewer = new CrystalReportViewer();
    viewer.setOwnPage(true);
    viewer.setPrintMode(CrPrintMode.ACTIVEX);
    viewer.setReportSource(Sharedpath);
    viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), null);
                  System.out.println("Finished...");
           }  catch (ReportSDKException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
    %>

    Hi All,         
         I am using below java SDK code to render a report in crystal report viewer. When i refresh report with more data(more parameter value) the server session times out in portal. Is there any way to fix this issue. The report loads data and then displays in Crystal report viewer, When more data is there the server times out as the server time is set to 60 sec. Is there any way to open the crystal report viewer as and when the report loads data to avoid server time out isse.
    Please help . Please let me know if I am missing something.. Thanks in Advance!!!
    CODE;
    <%@page language="java" contentType="text/html; charset=ISO-8859-1"
           pageEncoding="ISO-8859-1" session="false"%>
    <%@page
           import="com.crystaldecisions.sdk.occa.report.application.OpenReportOptions"%>
    <%@page
           import="com.crystaldecisions.sdk.occa.report.application.ReportClientDocument"%>
    <%@page
           import="com.crystaldecisions.sdk.occa.report.application.ParameterFieldController"%>
    <%@page
           import="com.crystaldecisions.sdk.occa.report.lib.ReportSDKException"%>
    <%@page
           import="com.crystaldecisions.report.web.viewer.CrystalReportViewer"%>
           <%@page import="com.crystaldecisions.report.web.viewer.*"%>
    <%@page
           import="com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase"%>
    <%@page
           import="com.crystaldecisions.sdk.occa.report.reportsource.IReportSource"%>
    <%@page import="java.io.Writer"%>
    <%@page import="java.io.IOException "%>
    <%@ page import="com.crystaldecisions.report.web.viewer.ReportExportControl" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.exportoptions.ExportOptions" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.exportoptions.ReportExportFormat" %>
    <%@page
           import="com.crystaldecisions.sdk.occa.report.application.DatabaseController"%>
                  <%@page
           import="com.crystaldecisions.sdk.occa.report.application.ReportSaveAsOptions"%>
           <% response.setHeader("pragma","no-cache");//HTTP 1.1
    response.setHeader("Cache-Control","no-cache");
    response.setHeader("Cache-Control","no-store");
    response.addDateHeader("Expires", -1);
    response.setDateHeader("max-age", 0);
    //response.setIntHeader ("Expires", -1);
    //prevents caching at the proxy server
    response.addHeader("cache-Control", "private"); %>
    <%
           String reportPath,Sharedpath;
           ReportClientDocument reportClientDocument;
                ParameterFieldController parameterFieldController;
                try{
                    reportPath = "reportlocation";
                 Sharedpath = "Target Location";
                    reportClientDocument = new ReportClientDocument();
                    reportClientDocument.setReportAppServer(ReportClientDocument.inprocConnectionString);
                         reportClientDocument.open(reportPath, OpenReportOptions._openAsReadOnly);
                         reportClientDocument.getDatabaseController().logon("Dbname", "dbpassword");              
                         System.out.println("Connecting...");
                       parameterFieldController = reportClientDocument.getDataDefController()
                   .getParameterFieldController();
                    parameterFieldController.setCurrentValues("", "param 1",
                         new Object[] {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,29});
    parameterFieldController.setCurrentValues("", "Param 2",
                  new Object[] {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23});
    reportClientDocument.saveAs("Target Report Name","Target Location", ReportSaveAsOptions._overwriteExisting);
           reportClientDocument.close();
           System.out.println("Finished...");              
    CrystalReportViewer viewer = new CrystalReportViewer();
    viewer.setOwnPage(true);
    viewer.setPrintMode(CrPrintMode.ACTIVEX);
    viewer.setReportSource(Sharedpath);
    viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), null);
                  System.out.println("Finished...");
           }  catch (ReportSDKException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
    %>

  • How to set printersettings for the crystal report viewer in SAP BI dynamically

    Hello
    I have set the URL method for my crystal report and with parameter passing as shown below, it was displaying the crystal report viewer by connecting to the SAP BI 4.0 server with this method.
    http://cr:port/businessobjects/enterprise115/desktoplaunch/opendoc/openDocument.jsp?sDocName=CRLabelParam&sType=rpt&lsSnPrinted=0&lsSsTestProjectNr=1
    This URL will be called from Web application by different users, i would like to set the printer settings differently for different users for this crystal report viewer how shall i need to set the printer options?
    shall i need to set the printer settings programatically for each user. Please advise me how do i need to proceed.
    Thanks & Regards,
    Rajeswari.

    There are no BI / CR APIs that would do this for you. The way I see it, you'll have to have your own print button and populate it with the correct printer information for each user as they request the report. Of course, alternatively, use the viewer printer button and get the users to choose the correct printer.
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Crystal Report Viewer 2008, postback causes a weird QueryString for dates

    HI,
    I'm having a weird problem that was masked with the error "".
    What is happening to me is that i have an ASPX page where the QueryString passed in is used as parameters to the report (straightforward).  When the page first loads, this is all fine the QuerySTring is properly parsed and the report is properly displayed.  Now, the problem comes when i click on the PRINT Button it performs a postback, and during that postback the querystring is read so that it can rebuild the report on the postback.  (In previous versions of crystal, this has always worked).  The issue here is that the version 12 of the report viewer here now appears to also append some information to the query string that was not previously there (like this:  ServletTask=Print&cmd=get_pg&page=1)  So the problem here for me is this is what my original QueryString looks like:
    tokenid=b2817081-6b52-43c7-8e2c-d6209af2ed98&Type=Appointment&Val=12%3b1%3b1%3b06%2f10%2f2000
    THat query string is generated by the following code (pre-encoded)
    "PrintPage.aspx?tokenid=" & Guid.NewGuid.ToString & "&Type=Appointment&Val=" & "12" & ";" & "1" & ";" & "1" & ";" & "1/1/2000"  (NOTE the date here, i'll get to that in a second)
    Then, what the problem is on the postback the Query String looks like this:
    tokenid=2a4f42de-bd90-48b5-ac82-bd34b503afd3&Type=Appointment&Type=Appointment&Val=12%3b1%3b1%3b1%2f1%2fPrintPage.aspx%3ftokenid%3d2a4f42de-bd90-48b5-ac82-bd34b503afd3&Val=12%3b1%3b1%3b1%2f1%2f2000&ServletTask=Print&cmd=get_pg&page=1
    As you can see here it's all messed up.
    So, what i found here is that the underlying cause is that we are passing a "date" in the original QueryString and it seems on the postback the Crystal Reports Viewer is having some issue with that and basically messes up the query string...
    I have Crystal Reports 2008/SP3 installed.
    Any help would be greatly appreciated.
    Thanks

    Cleaning up these forums I came across this unanswered thread.
    Very weird behavior that I have seen maybe 3 or 4 years ago - I think it was with opendocument.aspx...
    In this case, we appear to be re-adding the querystring with the aspx name and question mark (u2026.parentagesu2026).  Having two question marks (%3f) is essentially a malformed URL since this indicates where the querystring starts.
    The duplicate querystring may have been a coding error(?) where it gets added again on a postback.
    Were you able to resolve the issue?
    Ludek

  • Crystal Report Viewer 2008 paging error.  Unable to process your request

    Hi everyone,
    I encountered this error today when clicking on the next page button on the Crystal Report Viewer.  I am running Crystal 2008 SP0.  When i click on show detail i get this:
    Programming Error520|/wEWPQL/uNqsCgKLovFcAtm0IoIAoScvAHAoqK76EFApyD1ugPApqWlPcMAsX1vAHAsX1198BAsCEq8AHAtuulPcMAoaMm/kHAoaMg/YCAoSGgI0OAs/lg/YCAsWelPcMArPesvYEAreG34oIAqKak5INAtzilMNAtD9h8wDApmmIoPAti0IoIApuWgI0OAubdht0DAsSe5NMPAqOak5INAqOa9/ICAr39wAOAp79l8IOApnFpvwJAo2nlP4BAsWFxAGAsHe54QMAs/Ok/EBAp7Eo3kCgvyr9gEC9POo2gkC2qGU/gEClfLUnAMCvuWnwQgCmuLjgg4Cnv3bgg8ChuPz6gMCpeOPzAMCl6zX3wECpuuLzAMC3eqToA4CvuWXgg4Czs7nhAwCveXvww0C3OrjoQ0C3eqn4wkCvuW7wQgCnv3Hgg8Cvf3b4A4Cnv2fwg4C0e7nhAwCxei3zAMCw97nhAwC6OONrwUYE9w8XzGf1oPuoIcvJLRvyIbTWg==
    I have a simple .Net page that has a dropdown control that a user can select to pass the parameter for the report.  I have a server side button that gets the report on the onclick event. The code behind is as follows:
    protected void btnReport_Click(object sender, EventArgs e)
            CrystalDecisions.CrystalReports.Engine.ReportDocument Myreport = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
            Myreport.Load(Server.MapPath("Reports/rpt_equipment_summary.rpt"));
            ConnectionInfo crLoginInfo = new ConnectionInfo();
            Database crDatabase;
            Tables crTables;
            CrystalDecisions.CrystalReports.Engine.Table crTable;
            TableLogOnInfo crTableLogOnInfo;
            crLoginInfo.ServerName = "----";
            crLoginInfo.DatabaseName = "------";
            crLoginInfo.UserID = "-----";
            crLoginInfo.Password = "------";
            //Get Table or SP information from report
            crDatabase = Myreport.Database;
            crTables = crDatabase.Tables;
            //Loop through all tables in the report and apply the
            //connection information for each table.
            for (int i = 0; i < crTables.Count; i++)
                crTable = crTables<i>;
                crTableLogOnInfo = crTable.LogOnInfo;
                crTableLogOnInfo.ConnectionInfo =
                crLoginInfo;
                crTable.ApplyLogOnInfo(crTableLogOnInfo);
            //Add Parameter
            ParameterField paramField = new ParameterField();
            ParameterDiscreteValue spValue = new ParameterDiscreteValue();
            ParameterFields ParamFields = new ParameterFields();
            paramField.Name = "@txComments";
            spValue.Value = ddlPastInvoices.SelectedValue.ToString();
            paramField.CurrentValues.Add(spValue);
            ParamFields.Add(paramField);
            CrystalReportViewer1.ParameterFieldInfo = ParamFields;
            CrystalReportViewer1.ReportSource = Myreport;
    Is there something i am missing for paging to work?
    Thanks in advance

    Sorry i forgot to include more information.
    .Net 3.5 and I can view this report fine in Crystal report designer.  I get no error message when I switch pages.  The issue happens when i view the report inside a Crystal report viewer control that i have on the page. 
    <%@ Register assembly="CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" namespace="CrystalDecisions.Web" tagprefix="CR" %>
    I haven't tried your sample reports.  Where can i find those?  i have other reports with multiple pages so I can also try using those reports as well. 
    Thanks again,
    Pablo

  • Dynamic command execution fails in Crystal report viewer for parameters

    We are using the Crystal Report Viewer for the .Net Application on the client side.The reports are designed using Crystal Report XI R2.
    The issues that we are currently encountering is that, we are unable to load the combo-boxes in the pop-up for the parameters.
    All the reports have multiple commands and the variables are of 'dynamic' type.
    When the dialog box for requesting the pop-up comes up, It comes up empty even though they are linked to the respective commands.
    Also,For reports having multiple parameters we are unable to give a single dialog box to get in all the parameters.It appears as a series of prompts.
    Both,these issues are not encountered when the reports are launched via the Crystal reports developer tool.

    Hello Varun,
    I recommend to post this questionin the [dedicated NET forum|SAP Crystal Reports, version for Visual Studio;.
    This forum is monitored by qualified technicians and you will get a faster response there.
    Thank you for your understanding,
    Falk

  • Crystal Report Viewer fails for browser versions =10

    We're using the Crystal Reports for VS2010 SP2 and get the following error when trying to generate a report in Firefox 10.0.2 and Chrome 18.0.1025.11 beta-m:
    [NullReferenceException: Object reference not set to an instance of an object.]
       CrystalDecisions.Web.ViewerGlobal.get_IsNetscape6Up() +88
       CrystalDecisions.Web.CrystalReportViewer.Render(HtmlTextWriter output) +83
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +8991378
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +208
       System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +173
       System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +31
       System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +53
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +8991378
       System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40
       ASP.app_filters_reportviewer_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\qfmui\10eb2bd5\d0d0d3a5\App_Web_e2fg2prg.2.cs:0
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +109
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
       System.Web.UI.Page.Render(HtmlTextWriter writer) +29
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +8991378
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3060
    If I change the user agent string in Firefox to that of Firefox 7.0.1 everything works as expected, this implies there is some logic in get_IsNetscape6Up() which is failing because the major browser version as reported by the user agent string is two digits instead of one.
    We encountered a similar issue for our legacy pages containing Infragistics 2007 controls but were able to fix that by overriding the System.Web.Configuration.HttpCapabilitiesBase.BrowserCapabilitiesProvider and faking the browser version to 9.80.  Crystal Report Viewer is apparently not using .Net's built in HttpBrowserCapabilities object, is there anything else I can adjust to stop the viewer failing?

    hello Robert
    Today must be my day. I already got a reply from PM (normally it takes a "bit" longer...). Anyhow, here is what he said:
    With Firefoxu2019s release cycles, I donu2019t think weu2019ll be able to officially support the latest versions
    of Firefox at every service release.  We do our best to test the released versions of Firefox
    that align with our releases.  I donu2019t know the details but Iu2019ve heard there is a plan in place where
    the support team(s) (?) will test the most recent releases of Firefox with whatu2019s currently
    shipping by SAP and log bugs as necessary.
    (umm, this is my - Ludek note here ) -> news to me re. support doing QA... find out something new every day. Anyhow, continuation of the message from PM:
    The current plan for CR for VS2010, the SP3 release (expected in April) will support up to
    Firefox 9.  If there are reproducible bugs in Firefox 10 (or higher), then please enter a bug
    and escalate and it will be investigated for the next available release.
    I'll revisit this once SP3 is out there and do an escalation for Firefox 10 - ok?
    - Ludek

  • Crystal Report Viewer Credential Prompt for Report with Dynamic Parameters

    The .NET Crystal Report Viewer is prompting for database credentials when launching a report containing dynamic parameters. This only occurs for reports created with SAP Crystal Reports 2011 designer. Reports created with Crystal Reports XI designer (where dynamic parameters were first introduced) work correctly.
    The credential prompt window contains the following fields:
    - Server Name: <server name> (disabled)
    - Database Name: <database name> (disabled)
    - User Name: <empty> (enabled)
    - Password: <empty> (enabled)
    - Use Single Signon Key: false (disabled)
    The values in the prompt window which are disabled are the database connection values used during the design of the report in the SAP Crystal Reports 2011 designer.
    Expected Result:
    - No prompt for database credentials.
    - Values read from the database should be populated in a drop down for the dynamic parameters.
    Environment:
    - Visual Studio 2010 (C#)
    - Windows 7 Enterprise
    - SAP Crystal Reports runtime engine for .NET Framework 4
    - SAP Crystal Reports, version for Visual Studio 2010
    - SAP Crystal Reports 2011
    The database connection is being set to use a DSN. It must be a DSN as the calling application is only aware of the DSN/Username/Password values. These values are being passed to the Crystal Report Viewer contained in a Windows form.
    The database connection for the report is being set as follows:
    foreach (InternalConnectionInfo internalConnectionInfo in this.report.DataSourceConnections)
        // Must set the UseDSNProperties flag to True before setting the database connection otherwise the connection does not work
        if (internalConnectionInfo.LogonProperties.ContainsKey("UseDSNProperties"))
            internalConnectionInfo.LogonProperties.Set("UseDSNProperties", true);
        // Supposed to set the database connection for all objects in the report (ie. main report, tables, sub reports)
        internalConnectionInfo.SetConnection(this.DSN, string.Empty, this.LoginName, this.Password);
    The SetConnection method's signature is as follows:
       SetConnection(string server, string database, string name, string password)
    As you can see from the code snippet above I am setting the DSN name as the server parameter, blank for the database parameter (a database connection using DSN should only require DSN name/Username/Password) and the database username and password respectively.
    Is this a SAP bug?
    Is this the correct way of setting the database connection to use a DSN?
    Is there some other properties that need to be set somewhere else in the report through code?
    Any help would be greatly appreciated.

    Thanks for the pointer to the database connection code generator. After taking a look at the output from the tool I was able to finally get the dynamic parameters to load and populate properly without prompting for credentials. I needed to tweak the outputted code a bit to match my requirements of using a DSN only connection.
    Instead of updating the database connection properties contained within the Report.Database.Tables collection from the CrystalReports.Engine namespace, I changed it to replace the database connection properties in the Report.ReportClientDocument.DatabaseController.Database.Tables collection from the CrystalDecisions.ReportAppServer.DataDefModel namespace. For one reason or another, using the RAS namespace solved the problem.
    Below is the updated code with the change made:
    using RAPTable = CrystalDecisions.ReportAppServer.DataDefModel.Table;
    foreach (InternalConnectionInfo internalConnectionInfo in this.report.DataSourceConnections)
        // Must set the UseDSNProperties flag to True before setting the database connection
        if (internalConnectionInfo.LogonProperties.ContainsKey("UseDSNProperties"))
            internalConnectionInfo.LogonProperties.Set("UseDSNProperties", true);
        // Sets the database connection for all objects in the report (ie. main report, tables, sub reports)
        internalConnectionInfo.SetConnection(this.DSN, string.Empty, this.LoginName, this.Password);
    // The attributes for the QE_LogonProperties which is part of the main property bag
    PropertyBag innerPropertyBag = new PropertyBag();
    innerPropertyBag.Add("DSN", this.DSN);
    innerPropertyBag.Add("UserID", this.LoginName);
    innerPropertyBag.Add("Password", this.Password);
    innerPropertyBag.Add("UseDSNProperties", "true");
    // The attributes collection of the tables ConnectionInfo object
    PropertyBag mainPropertyBag = new PropertyBag();
    mainPropertyBag.Add("Database DLL", "crdb_ado.dll");
    mainPropertyBag.Add("QE_DatabaseType", "OLE DB (ADO)");
    mainPropertyBag.Add("QE_LogonProperties", innerPropertyBag);
    // Pass the database properties to a connection info object
    ConnectionInfo connectionInfo = new ConnectionInfo();
    connectionInfo.Attributes = mainPropertyBag;
    connectionInfo.Kind = CrConnectionInfoKindEnum.crConnectionInfoKindCRQE;
    connectionInfo.UserName = this.LoginName;
    connectionInfo.Password = this.Password;
    // Replace the database connection properties of each table in the report
    foreach (RAPTable oldTable in this.report.ReportClientDocument.DatabaseController.Database.Tables)
        RAPTable table = new RAPTable();
        table.ConnectionInfo = connectionInfo;
        table.Name = oldTable.Name;
        table.QualifiedName = oldTable.QualifiedName;
        table.Alias = oldTable.Alias;
        this.report.ReportClientDocument.DatabaseController.SetTableLocation(oldTable, table);
    this.report.VerifyDatabase();
    Thanks again Ludek for the help.

  • Crystal Report Viewer Print does not work for IE7

    Post Author: ssdudeveloper
    CA Forum: .NET
    When I view a report in IE7, and click the Print button in the Crystal Reports Viewer toolbar, an empty dialog window opens and no print dialog appears. The print functionality works correctly when viewing the same report using an IE6 browser.
    I have tried changing the browser security settings (as per http://technicalsupport.businessobjects.com/cs/forums/thread/3171.aspx) - with Automatic prompting for file downloads set to Enable, but this does not resolve my problem.
    Is this a known compatability issue with IE7? Are there any workarounds/solutions to this?

    Hello,
    Please search before posting.
    Visual Studio 2010 is not meant to work with Crystal Reports 10.2.
    Download CR4VS2010 here:
    [/people/blair.wheadon/blog/2010/07/29/crystal-reports-for-visual-studio-2010-beta-2-and-runtimes-now-available|/people/blair.wheadon/blog/2010/07/29/crystal-reports-for-visual-studio-2010-beta-2-and-runtimes-now-available]
    Thanks,
    Bhushan.

  • Crystal Report Viewer Closes the application after showing "The text cannot be found in the report" when searching for a text in a multipage report

    Post Author: Farooque
    CA Forum: Other
    Hi,
    I am using Crystal report viewer (Crviewer.dll) version 11.0.0.1282 to show crystal reports in my VB6 application. When we search for any text in a multipage report after the last find system shows a message "Crystal Report Viewer" "Text cannot be found in the report" and trows an unhandled error and closes the application. How can I fix this?
    Please help
    Thanks in advance.
    Farooque. ([email protected])

    Enter the following:
    viewer blank net crystal
    into the search box in the top right corner. You should get a number of hits (Kbases and articles) that should point you to a solution.
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • Install configuration for Crystal Reports Viewer 2011

    Hi,
    Is there any way to configure the defaults for Crystal Reports Viewer 2011 as part of the installation routine?
    Specifically we would like to:
    1. Switch off the attempt (on launch) to make an internet connection for community resources
    2. Hide the side bar unless the user actually goes into the view menu to turn it on.
    There's various reasons for this, but mostly it's that to get an internet connection the application has to go through the proxy server - we would rather that sort of activity was instigated by the end user on demand, not an application automatically, not least in this case because the license agreement window seems to be set to force itself to the 'front', which covers the proxy server prompt, so we can't write a script to provide automatic authentication without user intervention. It would be far better if there was a way to simply switch off this feature - and at the same time set the default 'view' settings to hide the side bar in the first place.

    Hi,
    Do you mean the Standalone Crystal Reports Viewer 2008: http://www.sap.com/solutions/sapbusinessobjects/sme/reporting/viewer/index.epx
    If you do then you can perform a slient install by following the instructions from the release notes:
    http://help.sap.com/businessobject/product_guides/crv2008/en/xi3-1_crviewer_release_en.pdf
    Those notes are provided from this webpage:
    http://help.sap.com/content/bobj/bobj/index.htm

  • Is there a recommended crystal reports viewer for Mavericks?

    I am having some trouble finding a Crystal reports viewer for Mavericks and was wondering if someone might have some guidance as to the best solution(s).
    Thanks!

    This is the most current:
    http://scn.sap.com/docs/DOC-29774
    I don't know about Mavericks support, but it at least launches on my system.
    Regards.

  • Crystal report Viewer for 8.5 reports

    We are using an older version of Crystal reports (8.5) and use an application called RePortal (that use Crystal Enterprise) to view the reports through out the building. We recently had a report that was created and we are getting an error:
    Error encountered by Crystal PageServer
    Unable to connect: incorrect table location. File Worksheet.rpt. On Cache/Page Server:
    I tried a few solutions I found on line, but that didn't work.
    My thought was to bypass and download the free Crystal Report viewer, but the one I found was only compatible with Reports written in 9 or higher.
    Does anyone know how to resolve the error above or we I can find an older version of Viewer to work on 8.5

    Hi
    Now am using Crystal Report 8.5 with Visual Basic 6.0
    i want to use latest of crystal report with Visual basic 6.0
    can anyone suggest which version i have to use
    it must be compatible with Visual Basic 6.0
    Regards
    Abhi

  • 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

Maybe you are looking for

  • Can I sync my iPhone 5 with my ipad3

    Can I sync my iPhone 5 with my I pad3

  • MDX Driver WIS 10901 Error in Query as a Web service Tool

    Hello, I'm trying to design the query as a web service to use for Xcelsius Dashboard (created connection, universe etc in Designer), but can't proceed with query definition - it's only possible to put one characteristic otherwise error WIS 10901 is t

  • How can I get bi-fold greeting card to print?

    I have Elements 9 and created a card in bi-fold format and cannot figure out how to get it to print in that format.  I have a Dell V715W printer.  Photoshop help is of no help.  I am trying to figure out if I need to print add a blank page to the fro

  • Smart Albums are broken!

    I upgraded to 3.3, and Smart Albums are now broken! For example, I have a recent event broken down into 3 Smart Albums for my 3 star, 4 star, and 5 star images. The 3 and 4 star albums display the photos correctly. But the 5 star album doesn't displa

  • Dreamweaver crashes a startup

    Dear people, The strangest error occurs when I install my adobe package. ALL the programs work fine, exept for Dreamweaver. Dreamweaver starts up, but the last thing in the loading screen which I can see is initiating files, and then it crashes (or s