C#, VS 2005, Crystal Reports XI, Business Objects Enterprise/Crystal Reports Server XI.

Hi,

I must be missing something with my versions, etc, but for the life of me I can't work this out.

I have my report which happened to be written in Crystal Reports (or the Visual Studio version, it doesn't seem to matter) that I have loaded in to Crystal Enterprise.

I create a web page with a crystalreportviewer in it (version 11.0.3300.0)
all my references in the project are the same.

and then in my codefile I do this as per the documentation:

enterpriseSession = sessionMgr.Logon("Administrator", "", "WEBSERVER-01", "secEnterprise");

enterpriseService = enterpriseSession.GetService("InfoStore");

infoStore = (InfoStore)enterpriseService;

Session["InfoStore"] = infoStore;

Session["EnterpriseSession"] = enterpriseSession;

enterpriseService = enterpriseSession.GetService("RASReportFactory");

Object rrfObject = enterpriseService.Interface;

ReportAppFactory reportAppFactory = (ReportAppFactory)rrfObject;

string queryString = "Select SI_CUID From CI_INFOOBJECTS WHERE SI_ID='" + rptId.ToString() + "'";

InfoObjects infoObjects = infoStore.Query(queryString);

InfoObject infoObject = infoObjects[1];

ReportClientDocument reportClientDocument = new ReportClientDocumentClass();

reportClientDocument = reportAppFactory.OpenDocument(infoObject.ID, 0);

CrystalReportViewer1.ReportSource = reportClientDocument;

***
The object is successfully found within the store, however the page eventually returns the following error:
A first chance exception of type 'System.Exception' occurred in CrystalDecisions.CrystalReports.Engine.dll
System.Exception: Load report failed. ---> System.Runtime.InteropServices.COMException (0x80041017): Request timed out because there has been no reply from the server in 600000 ms.
   at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options)
   at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options)
   at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
   --- End of inner exception stack trace ---
   at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
   at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)
   at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename)
   at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(InfoObject infoObject, EnterpriseSession enterpriseSession)
   at viewReport.Page_Load(Object sender, EventArgs e) in c:\Inetpub\wwwroot\providerTest\viewReport.aspx.cs:line 52

help




Answer this question

C#, VS 2005, Crystal Reports XI, Business Objects Enterprise/Crystal Reports Server XI.

  • Crystal1

    Are you attempting to use XI on .NET 2.0 < xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

    The next release of XI (XI release 2) will include support for the .NET 2.0 framework and thus I recommend utilizing that with .NET 2.0.

    Kue

     


  • M i k e

    (russian)

    Exists quick update from XI to XI R2 (less than 1Gb)



  • Mei Liang - MSFT

    Change the asp.net version used to host the aspx pages on the test server to .net 1.1.

    You can access these in the  aspnet tab of the properties of the virtual directory... it is important that the aspx page is hosted in this version cos vstudio .net 2003 compiles applications for .net frwk 1.1



  • wwy94621

    Very good dear thank you for your kind suggestion, That's how I think you have done your MBA just find a student to write the paper give them the question sheet and just ask to write down the answer and MBA done.

  • ElitePilotMan

    no, i'm afraid that no ;-)


  • LenKelly

    I got these dynamic parameters to work in VS 2003 on my development box, but I seem to be having trouble getting them to work on any other computer

    I think it has to do with the order I have installed stuff, and that I might be able to work out the references eventually. (vs 2003 with .net 1, .net 2, crystal XI, .net 2 again)

    It would be nice if I knew what dlls I needed, and which ones the web site was looking at. I thought avoiding this reference hunting was why I learned .net

    Anyhow, my best guesses is that I need to get the web server and or the GAC to look at the dlls that seem to work on my development computer,somehoe reinstall that viewer app, play with the assembly linker...

    Everything seems to be the same version: v11.0.3300.0

    c:\windows\assembly\gac\crystaldecisions.crystalreports.engine\11.0.3300.0__692fbea5521e1304\

    CrystalDecisions.CrystalReports.Engine.dll

    C:\Program Files\Common Files\Business Objects\3.0\managed

    CrystalDecisions.CrystalReports.TemplateEngine.dll

    CrystalDecisions.ReportSource.dll

    CrystalDecisions.Shared.dll

    CrystalDecisions.Web.dll

    My web config has:

    <compilation defaultLanguage="c#" debug="true">

    <assemblies>

    <add assembly="*"/>

    </assemblies>

    </compilation>

    My ASPX file starts with:

    <%@ Register TagPrefix="cr" Namespace="CrystalDecisions.Web" Assembly="CrystalDecisions.Web, Version=11.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" %>

    I don't pass in any login info right now, since it is already hard-coded in the report, and I only pass in a parameter (a record id) if I find it in my URL:

    CrystalDecisions.CrystalReports.Engine.ReportDocument crDoc;

    crDoc=new CrystalDecisions.CrystalReports.Engine.ReportDocument();

    crDoc.Load(Server.MapPath("Rec.rpt"));

    if (Request.QueryString.ToString() != "")

    {

    crDoc.SetParameterValue("Rec#",Request.QueryString.ToString());

    }

    CrystalReportViewer1.ReportSource=crDoc;

    Works fine on my computer…

    On my test web server, I tried putting the dlls in my bin,in the gac, no change:

    Method 'IPromptingHTMLRenderOption_reserve10' on type 'CrystalDecisions.ReportAppServer.Prompting.PromptingHTMLRenderOptionClass' from assembly 'CrystalDecisions.ReportAppServer.Prompting, Version=11.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' is overriding a method that has been overridden.

    Would appreciate any help. if someone else gets this to work.

    Alden


  • clrudolphi

    Addintionally, Crystal Reports for Visual Studio 2005 does not support all of the features added in Crystal Reports XI.  In your case, the Dynamic Cascading Parameters is a feature that is not supported in Crystal Reports for Visual Studio 2005.

    Even though Crystal Reports XI shipped before the release of Visual Studio 2005, the product is in fact a more recent version.  This has to do with the longer development cycle that Visual Studio has.

    There will be a release of Business Objects XI and Crystal Reports XI that will support Visual Studio 2005 and .NET 2.0 Framework.

    Keith - Business Objects



  • jkolonko

    Just a bit of an update. I've shortened my code down to this:

    string serverName = "WEBSERVER-01";

    SessionMgr sessionMgr = new SessionMgr();

    EnterpriseSession enterpriseSession = sessionMgr.Logon(

    "Administrator", "", serverName, "secEnterprise");

    EnterpriseService enterpriseService = enterpriseSession.GetService("InfoStore");

    InfoStore infoStore = new InfoStore(enterpriseService);

    string queryString = "Select SI_CUID From CI_INFOOBJECTS WHERE SI_ID='466'";

    InfoObjects infoObjects = infoStore.Query(queryString);

    InfoObject infoObject = infoObjects[1];

    Report report = (Report)infoObject;

    CrystalReportViewer1.EnterpriseLogon = enterpriseSession;

    CrystalReportViewer1.ReportSource = report;



    and I receive this error:

    Method 'IPromptingHTMLRenderOption_reserve10' on type 'CrystalDecisions.ReportAppServer.Prompting.PromptingHTMLRenderOptionClass' from assembly 'CrystalDecisions.ReportAppServer.Prompting, Version=11.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' is overriding a method that has been overridden.

    However when I load the sample report: World Sales Report, everything works fine.


  • NimbusSoftware

    That's because you tried coding this stuff yourself. I always try to find a developer to do these things. I give them the spec, or one of my business analysts gives them the spec, and the programmer does the coding and testing.

  • Randall Sutton

    only setting the parameters can not be sufficient if your document is having dynamic or cascading prompts.There are few other objects to be created and few properties should be set to view or pass a parameter's value.

  • bram

    even worse... it would seem that adding parameters like below doesn't stop the error from occurring... any ideas

            ReportParameterSingleValue paramValue;

            foreach (ReportParameter param in report.ReportParameters)
            {
                paramValue = param.CreateSingleValue();
                param.CurrentValues.Clear();

                if (param.ParameterName == "Begins With")
                {
                    paramValue.Value = "a";
                    param.CurrentValues.Add(paramValue);
                }
            }

    btw, all this obviously works in infoview.


  • Ricardo Casquete

    hi !!

    try puting in the CrystalDecisions.CrystalReports.Engine.dll file into your webpage directory.




  • dreamlordzwolf

    you could try :

    http://www.sqlobserver.com

    SQLobSERVER is a new independent forum specialising in BI/ETL across the major vendors (ie., Business Objects) and SQL Server

    Sorry about the blurb, but thought it might to be useful..




  • Learning

    It would seem that any report without a parameter displays perfectly well. Any report that tries to display the parameter screen doesn't work.

    Can someone point my to some samples that show how to programatically add parameters to a Report object

    thanks.

  • C#, VS 2005, Crystal Reports XI, Business Objects Enterprise/Crystal Reports Server XI.