Crystal Report Viewer navigation slow in ASP

Hi all,
We have a simple asp page that is rendering a report in a crystal report viewer.  We are using the using the default parameter panel for parameter selection, and are setting the db credentials in the report document, see code below. 
Two things we are seeing.....
First, this isn't a big report, and it seems to take about 20 seconds for the progress bar on the bottom of the Internet Explorer to complete loading
Second, navigating the tree to other nodes is really slow.  In the code, the pageload event is firing each time.  I tried checking the Page.IsPostBack value, but that is false only for the time the default parameter panel renders, and then the code throws and exception when the actual report is trying to render. 
Can you help?
Thanks,
Cindy
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using CrystalDecisions.Shared;
using CrystalDecisions.CrystalReports.Engine;
public partial class _Default : System.Web.UI.Page
    protected void Page_Load(object sender, EventArgs e)
        if (Page.IsPostBack == false)
            ReportDocument rdReport = new ReportDocument();
            rdReport.Load(this.Server.MapPath("MyReport.rpt"));
            System.Configuration.ConnectionStringSettings connString = System.Configuration.ConfigurationManager.ConnectionStrings["MyConnectionString"];
            if (connString != null)
                SqlConnectionStringBuilder sb = new SqlConnectionStringBuilder(connString.ConnectionString);
                ConnectionInfo ci = new ConnectionInfo();
                ci.ServerName = sb.DataSource;
                ci.UserID = sb.UserID;
                ci.Password = sb.Password;
                ci.DatabaseName = sb.InitialCatalog;
                ci.Type = ConnectionInfoType.CRQE;
                if (CrystalReportViewer1.ReportSource == null)
                    rdReport.DataSourceConnections[0].SetConnection(ci.ServerName, ci.DatabaseName, ci.UserID, ci.Password);
                    CrystalReportViewer1.ReportSource = rdReport;
                CrystalReportViewer1.ReportSource = rdReport;

Hello Amit,
Thank you for your quick response.
That did help; however, in order for the code to compile, I needed to move the instantiation of the report document out of the IsPostBack loop, as well as the reportdocument.load (or I get that exception again).  As a result, I'm then prompted for the db credentials, which we cannot have happen..
Is there another way around this?
Thanks so much,
Cindy

Similar Messages

  • How do I make Crystal report viewer navigation icons display

    Visual Studio 8 accessing Crystal Reports Server 11 r2 using development web server.
    Report renders just fine in viewer but none of the viewer icons seem to find their image - all appear as X. 
    Debugging shows the src for icons is "this.src='/crystalreportviewers11/images/toolbar/(gif name)" such as "this.src='/crystalreportviewers11/images/toolbar/export_over.gif'".   I have such a directory\file in c:\program files\common files\business objects\3.0\crystalreportviewers11\images\toolbar\export_over.gif .
    perhaps related or a different problem: I get java script error when trying to print or export the rendered report: "Microsoft JScript runtime error: Object doesn't support this action" pointing to line: print = false;crystal_postback="<input type='hidden' name='__EVENTTARGET' value='myCrystalReportViewer'><input type='hidden' name='__EVENTARGUMENT' value='export'><input type='hidden' name='__LASTFOCUS' value=''><input type='hidden' name='__VIEWSTATE' etc.
    I see that java src is in the same neighborhood as the missing images: "JavaScript" src="/crystalreportviewers11/js/export.js" and using same hierarchy as above, I find this java file.
    Regarding missing images, how do I make viewer see these?  Where do I copy the images or how do I point the viewer to where they are?
    alan

    Out of the frying pan and into the fire...   I offer the following for other novices like myself and hope that experts will correct any misconceptions.
    My Crystal viewer control still does not display icons or print and now behaves badly when trying to display a report.  I would appreciate any advice.  Details follow.
    We have a Crystal Reports Server XI r 2.  I obtained the installation disks from tech support to install client tools on my development workstation.  These disks installed version 11.0.3300 .  After some research I have come to believe the following:
    Crystal Reports XI r1 = 11.0 = Managed 3.0
    Crystal Reports XI r2 = 11.5 = Managed 3.5
    Crystal Reports 2008 = 12 = Managed 4.0
    So I actually installed release one client tools.  The disks I received were the only installation disks we have, but I believe the server was updated to release 2 via web.  I could not find anywhere on web where I could download the release 2 client tools nor could I find any executable on server installation of release 2 to install the client tools to the development workstation.
    However, I also hold a license to the full blown BOE server at XI r2 release  I installed the client tools from these disks to my development workstation.  This installed version 11.5.3300 .  Based on other messages, I believe I need to get to 11.5.3700, but I am lost as to how to get this version.  The differences in versions may be the sole cause of my remaining problems, but I doubt it.
    To make sure I had no conflicts on development workstation, I removed all vestiges of Visual Studio and Crystal and then reinstalled VS2008, then Crystal designer, then Crystal Server client tools.  I also installed all service packs for these.  Tech Support tells me Crystal Reports Server has all service packs installed.  I noticed that the release one toolset installation created needed .dll's in both a program files\business objects\common folder and a program files\common\business objects folder, but the release two installation created only the former, not the latter - don't know if that matters.
    I had a Crystal viewer app at version 10.5 that worked fine for all reports except those that use the Server business view layer.  I am creating a new web version that can handle all Crystal reports including those using business view layer.  I am following the BOE SDK tutorial for creating a viewer.  I am binding to Crystal Viewer with an infoObject cast as report per one of the tutoral ways of binding. (I wonder if I need to use a different kind of binding though the tutoral indicates this should work.)
    When I was using release 1 tools with release 2 server, the report would render just fine but the navigation icons appeared as X's and the print/export buttons resulted in error of "Microsoft JScript runtime error: Object doesn't support this action".
    Per suggestions, I got everything in sync (to version 11.5.3300 which is only release two version I have available) - all references, viewer control, image handler.  I did have to change the image handler type to "CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandlerPage, to get a successful build because type CrystalImageHandler (no "page" suffix) is not defined in Crystal Decisions.Web version 11.5.3300,  I also had to add a reference to CrystalDecisions.Enterprise,PlugInManager for the constant CePictureState.cePictureThumbnail to be defined.  This reference was not necessary with version 1 toolset and not mentioned in tutoral.  Now I have the following symptoms:
    1.  When I bind to a very simple .rpt file stored in filing system of my workstation (displays a constant), the report will render in viewer but the navigation icons are still X's and print/export buttons still get JScript error message.
    2.  When I bind to this same simple report copied into Server folder using an infoObject cast as report (which used to render fine with release one client tools), I get the message: "The Page Server you are trying to connect to is not accessible. Please contact your system administrator."  This same report in Server folder runs fine using my Crystal Designer client.  I am able to display other attributes of the report object so I know I have a good report object.  So, my upgrade to 11.5.3300 has now additionally broken the report render.
    I would love to get to version 11.5.3700 and see what is still broken (I suspect there will still be some), but haven't a clue how to get this version of client tools.  Upgrading server to 2008 is not an option.  Downgrading Visual Studio to an earlier release is an option if VS2008 is contributing to the problem.  If I have to downgrade VS, what release is recommended?
    Any advice about any of these problems is welcome!
    alan

  • Very slow loading time - Crystal Reports Viewer 2008

    Hi,
      I search this forum to find another thread regarding this issue.  Since I've found nothing in particular, I started this one.
      We are currently developping a new report engine based on the .Net Crystal Report Viewer. This engine will be used in our applications to show, print and export reports.  We based the engine on the Crystal Report 2008 version (12.0.2000).  The code is in C#, targeted on the Framework 3.5 SP1.  For the CR runtime, we tested on machines with the SP2 and SP3 versions, as well as on a computer with Crystal Report Developper installed (v12.3.0.601) with no runtimes.  Since the runtime is in x86 only, the engine is compiled in x86 (not ANY CPU)
      When we try to open a report in an application, the first report loading is unusally slower than the others.  If I open a report, close it and open it a second time, the second time is much faster than the first.  While reading the threads, I realized that the first load implies some assembly loading from the Framework (which is normal).
      But since i can take as long as 20-30 seconds to load the first report, I ran some test.  Using the System.AppDomain.CurrentDomain.AssemblyLoad event, I've tracked the assemblies being loaded when opening the report and the start time of the loading.  I've discovered that, while most of the CR assemblies takes less than 500 milliseconds to load, there is one that takes at least 3 seconds (20 seconds sometimes) to load : BusinessObjects.Licensing.KeyCodeDecoder.  Each time I ran the tests, it is the assembly that is the slowest (and by far) among them all.
      Prior to this, we were using Delphi with the Crystal Report 10 runtime.  We never had such issues.  Now, some customers are complaining about this behavior.
      For you information, we are using the ReportDocument.Load() method to load documents.  Our reports are all dynamically linked to the database with the DataSourceConnections.SetConnection() method.  The report is being loaded in the viewer using the CrystalReportViewer.ReportSource property.
      Why does it takes so long to load/execute ? Is there something implied with registry keys or Internet access ?  Is there a way to speed up things ?
      Thanks !

    Thanks for your help Don ! :o)
    I know that the CR10 runtime was built on win32 and while I knew that the .Net version of the runtime would be slower due to the Framework and .Net architecture, we did not expect such differences between the two methods.
    You are right that the hardware could play a great factor here, but since I work on this machine for a few years now and I saw the performance from the old CRPE32.dll and the new .Net counterpart, I am really surprised that there is such a difference.  Most of our customers have entry-level desktops and our application always ran well on it, until now.
    So, if it is the way that the CR 2008 runtime works, do you know if your developpers optimized this part with the next version (CR 2010) or it is based on the same engine ?
    Thanks again for your time !

  • Crystal Report Viewer integration with Sharepoint 2010

    We had a requirement in our project to view crystal report off an hyper link embedded into sharepoint web part developed using ASP .NET. The report accepted few parameters from the sharepoint page and passed those on to the SQL server to retrive data and
    display the data in the report. The challenge was to open the report in the web browser.
    The first difficulty was to find the right control to use, the report viewer tool that comes with Visual Studio 2010 is not the right one to use to view Crystal reports, I realised this after spending half a day trying to figure out why wouldn't the report
    load. I then downloaded the Crystal Report Viewer for VS 2010 Standard from http://www.businessobjects.com/jump/xi/crvs2010/us2_default.asp. After you install this, you get the crystal report viewer in your toolbar. All you have to do is drag and drop it on
    to the web part and configure it to use your report. If any one needs help with this let me know I will show how to do that.
    So far so good. The biggest challenge was to deploy this on to the production server which took better part of 3 days to figure out how its done. If you deploy the WSP file as it is expecting that the crystal DLLs would be embedded in it then be ready to
    expect a rude shock because it isn't. Here are the steps -
    1. Deploy the WSP to the sharepoint server
    2. Install the crystal dlls used in the project (CrystalDecisions.CrystalReports.Engine.dll, CrystalDecisions.ReportSource.dll, CrystalDecisions.Shared.dll, CrystalDecisions.Web.dll) into the GAC using GacUtil command
    3. Add following entries to Web.Config file (C:\inetpub\wwwroot\wss\VirtualDirectories\80\web.congif)
        <SafeControl Assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" Namespace="CrystalDecisions.CrystalReports.Engine" TypeName="*" Safe="True" SafeAgainstScript="False"
    />
          <SafeControl Assembly="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" Namespace="CrystalDecisions.ReportSource" TypeName="*" Safe="True" SafeAgainstScript="False" />
          <SafeControl Assembly="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" Namespace="CrystalDecisions.Shared" TypeName="*" Safe="True" SafeAgainstScript="False" />
          <SafeControl Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" Namespace="CrystalDecisions.Web" TypeName="*" Safe="True" SafeAgainstScript="False" />
    4. Install crystal redistributable package which can be downloaded from http://www.businessobjects.com/jump/xi/crvs2010/us2_default.asp (
    SAP Crystal Reports runtime engine for .NET Framework 4 (64-bit))
    5. Copy aspnet_client folder from C:\>inetpub\wwwroot and overwrite it on C:\>inetpub\wwwroot\wss\VirtualDirectories\80
    And we are done. Fingers crossed it should all work.
    Prasad Matkar MCP, MCTS

    Hi Mahesh,
    How are you loading the report in your webpart? This is what I have done. I have tried to explain what I am doing in the program comments. Hope this helps. Good luck.
                    SPSite mySite = new SPSite(SPContext.Current.Site.Url.ToString());
                    SPWeb thisSite = mySite.OpenWeb();
                    // Writing to event log after every step in debug mode so that you get to know if there was a failure what step the failure occured after.
                    EventLog.WriteEntry("Reports", "Inside PAge Load ", EventLogEntryType.Error);
                    SPFolder folder = thisSite.GetFolder("Reports");
                    if (folder.Exists)
                        // get collection of Crystal Reports rpt files in the document library
                        SPFileCollection files = folder.Files;
                        // open the rpt file and get the contents
                        SPFile srcfile = files[reportToLaunch];
                        byte[] content = srcfile.OpenBinary();
                        // make a temporary folder
                        DirectoryInfo dir2 = new DirectoryInfo("~/temp");
                        if (!dir2.Exists)
                            dir2.Create();
                        if (File.Exists("~/temp/temp.rpt"))
                            File.Delete("~/temp/temp.rpt");
                        // write the report definition to a temporary file
                        // EventLog.WriteEntry("Reports", "Before Creating temp report ", EventLogEntryType.Error);
                        //EventLog.WriteEntry("Reports", "Before Create ", EventLogEntryType.Error);
                        BinaryWriter bw =
                          new BinaryWriter(File.Open("~/temp/temp.rpt", FileMode.Create));
                        bw.Write(content);
                        bw.Close();
                      //  EventLog.WriteEntry("Reports", "After Create ", EventLogEntryType.Error);
                        // set up the crystal report
                        ReportDocument reportDoc = new ReportDocument();
                        reportDoc.Load("~/temp/temp.rpt");
                        EventLog.WriteEntry("Reports", "after report load ", EventLogEntryType.Error);
                        ConnectionInfo connection = new ConnectionInfo();
                        connection.ServerName = "SQLServerName";
                        connection.DatabaseName = "SQLDatabase";
                        connection.UserID = "sqluser";
                        connection.Password = "sqlpassword";
                        TableLogOnInfo logon = new TableLogOnInfo();
                        logon.ConnectionInfo = connection;
                        reportDoc.SetParameterValue("@Parameter1", parameter1);
                        reportDoc.SetParameterValue("@Parameter2", parameter2);                                               
                        EventLog.WriteEntry("Reports", "after assigning parameters ", EventLogEntryType.Error);
                       foreach (CrystalDecisions.CrystalReports.Engine.Table t in reportDoc.Database.Tables)
                            t.ApplyLogOnInfo(logon);
                        EventLog.WriteEntry("Reports", "after applying login info ", EventLogEntryType.Error);
                        // and the Crystal report Viewer                                    
                        CrystalReportViewer1.ReportSource = reportDoc;
                        EventLog.WriteEntry("Reports", "Before delete ", EventLogEntryType.Error);
                        // clean up
                        File.Delete("~/temp/temp.rpt");
                        EventLog.WriteEntry("Reports", "after delete ", EventLogEntryType.Error);
    Prasad Matkar MCP, MCTS

  • Integration of Crystal Report Viewer in VS2010 WPF

    Hello,
    I google and research and founded that the viewer control is not attached with VS2010 so, we have to install it separately. I found it form here    [http://www.businessobjects.com/jump/xi/crvs2010/us2_default.asp].
    I installed "SAP Crystal Reports, version for Visual Studio 2010".
    Now, I want to add Crystal Report Viewer on my WPF Page. how can I do this ?
    I tried to find that control to add in toolbox but I didn't find it.
    Please can someone help me int this that how can I add that control and call the report to view in that and change the sql server dynamically for that crystal report.
    Bunch of thanks in advance, this would save me a lot....Appreciated any ones help.
    Thanks

    See [this|http://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/a09f7025-0629-2d10-d7ae-df006a51d1a8] demo and search these forums too.
    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]

  • 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 Reports Viewer Toolbar Images missing

    I have Crystal Reports XI R2 installed on a windows server 2008 R2 Enterprise server and when a when I browse to my asp.net page withe the crystal reports viewer I get the red x's for the toolbar images.  The viewer and web.config entries all reference the 11.5.3700.0.  When I view the source of the page the source is "../aspnet_client/system_web/2_0_50727/crystalreportviewers115".  At first the crystalreportviewers115 was not in subfolder at my sites root aspnet_client folder and so I copied it there.  But it still doesn't work.
    What seems odd is that we I was using the embedded version from VS 2008 (10.5.3700.0) the view source of the page showed the image path as "/aspnet_client/system_web/2_0_50727/CrystalReportWebFormViewer4" and this worked fine but when I use XI R2 (11.5.3700.0) the path is "../aspnet_client/system_web/2_0_50727/crystalreportviewers115" so where and why is there ".." for the XI R2 version.

    CR 11.5 is not supported on WIn 2008 server. See [this|https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=56787567] wiki.
    You may also want to take a look at the article [Viewer toolbar images appear as red u2018X on Crystal Reports VS .NET web viewer|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50aa68c0-82dd-2b10-42bf-e5502b45cd3a]. It may help, but if not, you'll have to move on to a supported version of CR.
    Ludek
    Follow us on Twitter
    http://twitter.com/SAPCRNetSup

  • Crystal Reports Viewer Control  - Visual Studio 2008 WEB Application

    My question is this:  Has ANYONE on this planet been able to get the ASP .NET CR Viewer control to actually work?
    Why does this editor NOT recognize End-of-line or CR characters or any whitespace??
    I have developed a Crystal Reports "Viewer" web application in VS2008 using C#.
    It's a simple app, in that it's a single page with a treeview control (containing the grouped names of the reports to which the user has access) and the CR Viewer control.
    The report files live on a network share, and permissions to them is controlled via a SQL Server database, which, for each report, stores the UserID and Logion for the oracle database, as well as any required parameter values.
    The reports themselves are all hititng an Oracle 10g database.
    I managed to do this in a Windows desktop applcation using Visual Studio 2005 and VB .net, but now, upon trying to make this a web application in VS2008, I have completely failed. The application works when run locally, but when deployed to the web server, I experience database login prompts when I should not, (the dreaded "Report requires further information" message) even thought the setdatabaselogin has already been set. I have tried saving the reportdocument in viewstate and re-assigning the viewer Datasource property to it, that also fails. However, it only does it on some reports, and not others. (admittedly, the reports may have been created using different CR versions)
    The viewer also displays data it should not be displaying when I attempt to scroll, when I do manage to get a report to run.
    I am setting parameters dynamically at run time, whose values are stored in the SQL database.
    Code Sample:
    protected void ShowReport(int ReportID)
            SQLDataPortal2005.Common sql = new SQLDataPortal2005.Common();
            Hashtable outParms = new Hashtable();
            string sAccess;
            IDataReader dr;
            CrystalDecisions.CrystalReports.Engine.ReportDocument rptDocument = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
            System.Security.Principal.WindowsPrincipal p = System.Threading.Thread.CurrentPrincipal as System.Security.Principal.WindowsPrincipal;
            sAccess = p.Identity.Name;
            int j = 0;
            int i = -1;
            if (!IsAdmin())
                sql.ExecNonQuery("CrystalReports", outParms, "proc_CRM_Check_Permissions", sAccess, Convert.ToInt32(TreeView1.SelectedNode.Value));
                if (outParms["@Allow"].ToString() != "True")
                   Response.Redirect("ErrorPage.aspx");  // redirect to  error page
            string sPath = System.Configuration.ConfigurationManager.AppSettings["WareHouse"].ToString();
            sPath = sPath + TreeView1.SelectedNode.Text.Trim() + ".rpt";      
            rptDocument.Load(sPath);
            dr = sql.GetDataReader("CrystalReports", "proc_CRM_Get_Report", Convert.ToInt32(TreeView1.SelectedNode.Value));
            while (dr.Read() == true)
                j += 1;
                if (j < 2)
                    rptDocument.SetDatabaseLogon(dr["DB_Login"].ToString(), dr["DB_Pwd"].ToString(), "PLAW", "LAWDB", true);
                    pList = dr["ParmList"].ToString().Split(',');
            dr.Close();
            dr.Dispose();
            if (pList.Length > 0 && pList[0].ToString().Trim() != "")
                foreach (CrystalDecisions.Shared.ParameterField x in rptDocument.ParameterFields)
                    i++;
                    switch (x.ParameterValueType)
                        case CrystalDecisions.Shared.ParameterValueKind.BooleanParameter:
                            rptDocument.SetParameterValue(x.Name, Convert.ToBoolean(pList<i>));
                            break;
                        case CrystalDecisions.Shared.ParameterValueKind.CurrencyParameter:
                            rptDocument.SetParameterValue(x.Name, Convert.ToDouble(pList<i>));
                            break;
                        case CrystalDecisions.Shared.ParameterValueKind.DateParameter:
                            rptDocument.SetParameterValue(x.Name, Convert.ToDateTime(pList<i>));
                            break;
                        case CrystalDecisions.Shared.ParameterValueKind.DateTimeParameter:
                            rptDocument.SetParameterValue(x.Name, Convert.ToDateTime(pList<i>));
                            break;
                        case CrystalDecisions.Shared.ParameterValueKind.NumberParameter:
                            rptDocument.SetParameterValue(x.Name, Convert.ToInt32(pList<i>));
                            break;
                        case CrystalDecisions.Shared.ParameterValueKind.StringParameter:
                            rptDocument.SetParameterValue(x.Name, Convert.ToString(pList<i>));
                            break;
                        case CrystalDecisions.Shared.ParameterValueKind.TimeParameter:
                            rptDocument.SetParameterValue(x.Name, Convert.ToDateTime(pList<i>));
                            break;
            Session["CReport"] = rptDocument;
            CRV1.ReportSource = rptDocument;
            CRV1.DisplayGroupTree = false;
            CRV1.HasRefreshButton = true;
            CRV1.ShowFirstPage();
    Is there a better/different way of accomplishing this very simply process? All I need this application to do is to view a report, while setting it's parmeters (if required) dynamically at run time. I don't EVER want the user to be prompted for DB LOGIN INFO.
    Edited by: RichardK on May 10, 2010 4:14 PM
    Edited by: RichardK on May 10, 2010 4:14 PM
    Edited by: RichardK on May 10, 2010 4:16 PM
    Edited by: RichardK on May 10, 2010 4:18 PM
    Edited by: RichardK on May 10, 2010 4:22 PM
    Edited by: RichardK on May 10, 2010 4:23 PM

    To answer you question; Yes, I suspect that most of the users in this community have managed to successfully create web apps. And this is the tiniest of sampling of the developers out there...
    A few suggestions;
    1) Keep the posts to under 1200 characters. Otherwise, the formatting is lost which makes it difficult to read.
    2) Try out a few sample apps from here:
    https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
    Suggest; csharp_web_simplelogonengine.zip, csharp_web_simplelogonviewer.zip and csharp_web_subreport_logon.zip.
    3) Start simple; one table, one field, no subreports. Hard code the database logon parameters. Convince your self that this does work. Increase the complexity - add fields, tables, subreports. Do not mix connection methods (e.g.; if ODBC for main, than ODBC for sub is a good idea, though not a requirement).
    4) See the article [Troubleshooting Guide to Database Connectivity Issues with Crystal Reports in Visual Studio .NET Applications|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b0225775-88c4-2c10-bd80-8298769293de].
    5) See  [this|http://www.sdn.sap.com/irj/boc/go/portal/prtroot/docs/library/uuid/d05b3bb7-0f28-2c10-4ea3-84dbdc4e414e?quicklink=index&overridelayout=true] article.
    6) Consider creating a phone case here:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300
    Ludek
    Follow us on Twitter
    http://twitter.com/SAPCRNetSup

  • Crystal Report Viewer and Windows Vista

    Hi,
    We are using RDC methodology for launching the crystal reports in the web using ASP.
    The web server operating system is Windows 2003, Crystal Reports XI is installed in it.  Report is not launching in only one client machine.  For all the other client machines reports are launching perfectly.  The problem is blank white activex control is displayed.  I tried to register the crystal reports viewer (ActiveXViewer.cab available in the crystal installation folder) deliverables in the client machine but after installing the deliverables same problem persists.
    When I click on the Crystal Report viewer Internet Explorer Exception occurs
    The following add-on was running when this problem occurred:
    Add-on Name:      CRViewer.dll
    Company Name:      (Not verified)Business objects
    Description:                           Crystal Report Viewer
    Two buttons
    Advanced... and Continue are shown but when we click on the button IE crashes
    The client machine operating system is u201CWindows Vistau201D service pack 2
    Internet Explorer 7 version is installed in it.
    In the client machine event viewer log the following details are available.
    Log Name:      Application
    Source:        Application Error
    Date:          10/29/2010 9:18:35 AM
    Event ID:      1000
    Task Category: (100)
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      BillVista.toyalloc.local
    Description:
    Faulting application iexplore.exe, version 7.0.6002.18005, time stamp 0x49e01e78, faulting module CRViewer.dll, version 11.0.0.893, time stamp 0x41b6ac85, exception code 0xc0000005, fault offset 0x0001f8e7, process id 0x210, application start time 0x01cb7773d2b1c584.
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Application Error" />
        <EventID Qualifiers="0">1000</EventID>
        <Level>2</Level>
        <Task>100</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2010-10-29T14:18:35.000Z" />
        <EventRecordID>98684</EventRecordID>
        <Channel>Application</Channel>
        <Computer>BillVista.toyalloc.local</Computer>
        <Security />
      </System>
      <EventData>
        <Data>iexplore.exe</Data>
        <Data>7.0.6002.18005</Data>
        <Data>49e01e78</Data>
        <Data>CRViewer.dll</Data>
        <Data>11.0.0.893</Data>
        <Data>41b6ac85</Data>
        <Data>c0000005</Data>
        <Data>0001f8e7</Data>
        <Data>210</Data>
        <Data>01cb7773d2b1c584</Data>
      </EventData>
    </Event>
    Could any one help me regarding this.

    Hello,
    First thing to do is upgrade to [CR XI R2 SP4 full build|https://smpdl.sap-ag.de/~sapidp/012002523100011802732008E/crxir2_sp4_full_build.exe]. Then get up to Service Pack 6 and you should not have problems with Vista.
    CR XI R1 will not and has never been tested on that OS.
    If you do not want to upgrade though use Process Monitor to watch for Access Denied errors. Also run IE in Compatibility mode.
    Likely what is happening is your test PC doesn't have rights to install ActiveX controls.
    Thank you
    Don

  • Crystal Report Viewer (SmartViewerActiveX/ActiveXViewer) barcode problem

    I am using the crystal reports viewer to show my reports in my asp website.
    In the reports, I have a barcode using the font source IDAutomationHC39M.ttf.
    This code must be a certain size that I indicated in my report design.
    The problem is that the viewer appears in the browser with the barcode expanded to full size, and not with the size that I indicated in report design.
    If I print from the program Crystal Reports, it appears according to the size indicated.
    It seems that this is a problem of the Viewer in the browser.
    Someone can help me? this matter is very urgent.
    Thank you.

    Thread moved to the .NET - SAP Crystal Reports forum.
    A few details missing:
    1) Version of CR?
    2) CR updates applied?
    3) Version of .NET?
    4) OS?
    5) What browser and version?
    6) is the issue present on dev / deployed computer / both?
    Oh, BTW.; if this is urgent, consider creating a phone case here:
    http://store.businessobjects.com/store/bobjamer/en_US/pd/productID.98078100?resid=S6I@hgoHAkEAAGsiyVkAAAAR&rests=1282226845369
    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]
    Edited by: Ludek Uher on Feb 3, 2012 10:26 AM

  • Crystal Report Viewer Microsoft JScript runtime error

    When I use the crystal viewer control to render a report on the screen I receive the following error message:
    Microsoft JScript runtime error: Object doesn't support property or method 'isObject' ... and the following line is hilighted:
    if(!bobj.isObject(json)).
    Here is the markup for the test page I'm using
    {<body>
    <form id="form1" runat="server">
    <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"
    AutoDataBind="true" ReportSourceID="crSource" />
    <CR:CrystalReportSource ID="crSource" runat="server">
    </CR:CrystalReportSource>
    </form>}
    I believe I set all info on crSource correctly (report path etc ...) because If I remove the Crystal reports viewer from the page and just use the crsource (i.e crptSource.ReportDocument.ExportToHttpResponse ...) I can export the report OK. Its only when I have the crViewer on the page Is when I recieve this error.
    Web Config
    <assemblies>
    <add assembly="CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
    <add assembly="CrystalDecisions.Shared, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
    <add assembly="CrystalDecisions.ReportSource, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
    <add assembly="CrystalDecisions.Enterprise.Framework, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
    <add assembly="CrystalDecisions.Enterprise.Desktop.Report, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
    <add assembly="CrystalDecisions.CrystalReports.Engine, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
    <add assembly="CrystalDecisions.Enterprise.InfoStore, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
    <add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
    <controls>
    <add assembly="CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" namespace="CrystalDecisions.Web" tagPrefix="CR" />
    <http handlers>
    <add path="CrystalImageHandler.aspx" verb="GET" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
    appsettings
    <add key="CrystalImageCleaner-AutoStart" value="true" />
    <add key="CrystalImageCleaner-Sleep" value="60000" />
    <add key="CrystalImageCleaner-Age" value="120000" />
    I am using crystal reports 2008, visual studio 2008, windows 7 pro, MS Sql Server 2005, IE9
    I uninstalled crystal reports, and reinstalled crystal reports 2008 sp3 (Full build) - No help
    When I goto help about visual studio it says crystal reports 2008 (No specific version info)
    Assembly cache on the machine has
    12.0.2000.0 and 12.0.1100.00 as the vast majority ... a few (Design and Engine) have older 10.5.3700 and so forth (There are so many)
    I found this problem on the web with different solutions involving frame work folder or not having IIS setup to server the crystal reports viewer ... this is happening to me on my local development machine using the ASP.Net Develepoment server included with VS2008 ..
    Any help you could give me would greatly be appreciated
    Thanks in advance
    Kevin

    Hi Kevin,
    Take a look at below SAP Note.
    [1531003 - Error: bobj undefined - javascript error |http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533333331333033303333%7D.do]
    I got this result just by searching 'bobj is undefined javascript' in the top right search box.
    Thanks,
    Bhushan.

  • Crystal Report Viewer Not viwed - Through APP Server Re-Direction

    Hello Team
    I have a critical problem in my organizaion for viewing the reports.
    Configuration that we are using:
    1. Windows Server 2008 R2
    2. Crystal 13 - Server Trial Version - Expiring on Aug-25th, 2014
    3. Used Visual Studio 2010 - .NET
    4. IIS 7.0 - configured a  Virtual Directory for ASP.NET application
    Out Application is using an Oracle APP Server to view the HTML. A button is provided in the HTML to redirect to view the Crystal Report.
    when I click on the Hyperlink and the url is directly accessed, then the Report is being shown without any issue.
    But ours is a corporate application and we have given a provision of accessign this application when users are outside of network. Hence the Crystal Server is under fire-wall. So, I cannot access it directly with a URL. Hence the app server is configured in such a way that if it find a name like "Reports" in the URL, then it redirects to the actual Web Server and gets back the data to the browser.
    for URL redirection, the app server is configured as below
        ProxyPass /crystalreportviewers/ http://<<ServerIP>>/crystalreportviewers/
        ProxyPassReverse /crystalreportviewers/ http://<<ServerIP>>/crystalreportviewers
        ProxyPass /reports10/ http://<<ServerIP>>/reports10/
        ProxyPassReverse /reports10/ http://<<ServerIP>>/reports10
    When the user redirects from the APP server using those redirection rules, the pages are being executed but the final crystal report viewer control is not being shown on the browser. I am not sure if we need to perform any other steps to get these thigns done.
    Our server is behind fire-wall and whenever I am in network, I used to get the output but when the redirection happens not able to load the Crystal Report Viewer. Not sure, if there are any other security rules that I need to consider to get back the CrystalReportViewer.
    Also, there is something called CrystalReportInteractiveViewer prior to Crystal13. Do we have anything as such in Crystal 13 also? Please help me in getting this worked.
    Please let me know if I am not clear in my explanation and I can certainly provide you a better information based on your queries.
    Thanks
    -Srinivasa Nadella

    Hi Srinivasa,
    Please move this thread to SAP Crystal Reports, version for Visual Studio
    Helpful threads: Having issues with Crystal reports report viewer
    c# - Application level assembly redirection not working - Stack Overflow
    asp.net mvc - Why is my Crystal Report and Viewer invisible on a Web Form in an MVC application? - Stack Overflow
    Regards,
    DJ

  • Crystal Report Viewer and border problems

    Post Author: catalinandrei00
    CA Forum: Deployment
    Hello there,    I've created an report and I've added borders for the fields in the report (Right click on the field > Format Object -> Border -> Choose for the 4 margins the line-style single). The report is correctly exported to different formats (.doc, .pdf, .xls). My problem is that when I display the report in an ASP.NET 2.0 page using an Crystal Report Viewer the report is correctly shown but the borders don't appear.My question is why the borders don't appear in the Crystal Report Viewer? Thanks for helping for solving this issue. It's very important.Catalin  

    Hello catalinandrei00
    I have the exact opposite problem as yours.
    I am using integrated crystal reports with Visual Studio 2005 and I have put a Crystal Viewer on a web page.
    First I also had the same problem like yours and then in one of the post i found a solution for this. Hope it will work for you too. here it is :-
    Just remove the following line from your aspx page.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    Now regarding my problem. My problems is that now i can view the borders and everything correctly in the viewer but when i try to print the report it automatically exports to Adobe first and BAM!!! the format disappears. Though if i export to word Doc format it export perfectly fine with all the borders and everything
    I hope some other reader will come to my rescue...pls HELP.

  • Picture not showing in Crystal Report Viewer

    We have an asp.net web solution that shows Crystal Reports using the crystal report viewer and also exporting the reports to PDF, Word and Excel The reports are working fine, but when showing the reports in the crystal report viewer the picture in the report is not shown (see crystalviewer.png), but when exporting to PDF, Word, Excel and so on, this picture is shown (PDF.png).
    Can you check if this is an error in crystal report ? or is there some kinda security issue?
    The report is not attached to this document, because the file type is not allowed.
    We have even tried to install the latest version (13.0.9.1312) from your homepage.
    This version also has the problem. http://scn.sap.com/docs/DOC-7824 Exporting crystal report
    report.ExportToHttpResponse(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, Response, False, Page.Title)
    CrystalReportViewer1.ReportSource = report

    Please provide more info on:
    We use register to this page.
    How is that done? Or, what is it that you do in the registry to manage the CR viewer?
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • I couldn't use Crystal Report Viewer Control in my ASPX page.

    Please I'm having a problem with crystal report viewer control which I couldn't resolve. I'm using VS 2008 and Framework 3.5.
    I building an ASP web application and when I add a CrystalReportViewer to my ASPX page I'm getting the following
    error.
    "Error     20     Type 'CrystalDecisions.Web.CrystalReportViewer' is not defined."
    I think maybe because I'm not having the right reference file. I'm using Crystal Reports 2008 and also I installed the following
    Service Packs:
    cr121_redist_install
    CR2008-SP1
    CR2008SP1-Fixes 1 and 2
    cr121_clickonce
    I check all the reference files in my project and they are as follow:
    CrystalDecisions.CrystalReports.Engine  (12.0.2000.0)
    C:\Program Files\Business Objects\Common\4.0\managed\dotnet2\CrystalDecisions.CrystalReports.Engine.dll
    CrystalDecisions.Enterprise.Framework  (12.0.1100.0)
    C:\Program Files\Business Objects\Common\4.0\managed\CrystalDecisions.Enterprise.Framework.dll
    C:\Program Files\Business Objects\Common\4.0\managed\CrystalDecisions.Enterprise.InfoStore.dll  (12.0.1100.0)
    C:\Program Files\Business Objects\Common\4.0\managed\dotnet2\CrystalDecisions.ReportSource.dll  (12.0.2000.0)
    C:\Program Files\Business Objects\Common\4.0\managed\dotnet2\CrystalDecisions.Shared.dll  (12.0.2000.0)
    Please Why I'm getting this problem? How I can resolve it?
    Thanks.

    If you have a viewer on one of your forms, delete it off the form and re-add it, ensuring that the crystalreports.web assembly referenced in your project is version 12.
    Ludek

Maybe you are looking for

  • Communication between BSP and Web Dynpro JAVA

    Hello All! I'm wondering whether the communication between a web dynpro application and a BSP application is possible. To ellaborate more, we have developped a web dynpro application acting as sender and we would like to develop a bsp application tha

  • Cannot browse Windows networks in Leopard

    In Tiger, I could click the Network icon and get the Windows domains listed for me. Of course, there was an issue in that it would only show the first 1500+ domains, ending somewhere in the Ms when I needed the Ts but at least I could browse the many

  • MDX Formula (Level.Ordinal) Problem

    I'm converting some calculations to MDX to use in ASO however I am having trouble converting the condition: @curlev(Flight)<=2) I thought I would be able to do '[Flight].CurrentMember.Level.Ordinal <= 2' but i get the error: Error(1260052) - Syntax e

  • Web service URL configuration for Xcelsius in BO XI3.1

    Currently we can evaluate the BOE R2 and BOE XI3.1, and we are facing such a problem: In R2, we configure the Web service URL for Tomcat in "...\Tomcat\webapps\businessobjects\enterprise115\desktoplaunch\WEB-INF\web.xml ", there is a parameter called

  • IPhone 6 plus won't rotate to landscape - small lock with circle around it

    I have an iPhone 6 plus - and I have an small icon that is a padlock with a circle around it - how do I unlock the screen orientation lock?