locked
Visual Studio 2010, Crystal Reports Viewer and Crystal Reports Server 2008

    Question

  • Hi all - I'm trying to use the Crystal Report Viewer for Visual Studio 2010 with Crystal Reports Server 2008, and I'm not having much success.  I'm attempting to view the report from an ASP.Net page.

    I have this code in an ASP.Net Page:

    string serverName = "MyServer";
    
    SessionMgr sessionMgr = new SessionMgr();
    EnterpriseSession enterpriseSession = sessionMgr.Logon("User", "Password", serverName, "secEnterprise");
    
    EnterpriseService enterpriseService = eterpriseSession.GetService("InfoStore");
    InfoStore infoStore = new InfoStore(enterpriseService);
    InfoObjects infoObjects = infoStore.Query("SELECT * FROM CI_INFOOBJECTS WHERE SI_PROGID='CrystalEnterprise.Report' AND SI_NAME LIKE 'MyReportName%' AND SI_INSTANCE=0");
    
    InfoObject infoObject = infoObjects[1];
    enterpriseService = enterpriseSession.GetService("RASReportFactory");
    Object rrfObject = enterpriseService.Interface;
    ReportAppFactory reportAppFactory = (ReportAppFactory)rrfObject;
    
    ReportClientDocument reportClientDocument = reportAppFactory.OpenDocument(infoObjects[1]);
    CrystalReportViewer1.ReportSource = reportClientDocument;
    

    When the OpenDocument call is made, I get an exception: "The parameter was incorrect".  Note that most of the sample code that I've found passes the ID property of the InfoObject, but that gives me another exception: "No such interface supported". 

    I've also tried to use the DSWSPortal sample from BusinessObjects to access the report via a web service, but drilldown doesn't work: the javascript to do a drilldown doesn't exist on my system.  I've installed both the Crystel Reports Viewer 2010 and the .NET SDK from Crystal Reports Server 2008.

    Am I just missing something really obvious?

    Thanks,

    Phil

     

    Wednesday, January 26, 2011 2:20 PM

All replies

  • Crystal Reports for Visual Studio 2010 is the only version that is supported in VS 2010.

    It does not include connectivity to CRS 2008 or any CR or BOE Servers. The next release OF CR and SDK's will only be able to connect to BOE 4.0.

    Use VS 2008 and CR 2008 SDK to connect to CRS 2008.

    Don

    Saturday, February 12, 2011 6:34 PM
  • HI Marino,

     

                  you not mention that you are using which crystal report in VS-2010. Is it SAP or other..?


    atik sarker
    Wednesday, March 02, 2011 8:59 AM
  • SAPDon, I am also using VS 2010.  So I can not download the CR 2008 SDK to connect to CRS 2008 from within VS 2010?
    Thursday, April 21, 2011 3:58 AM
  • Correct, It may work but if there are issues we can't get them fixed. For now you'll have to stay on VS 2008 /2005 with CR 2008 until BOE 4.0 and the .NET SDK is released with Service Pack 2. Also, you can't simply download the SDK and use it, you are not licensed to do so, you must own a copy of Crystal Reports to be able to use the SDK. For a complete reference on licensing see this Paper written by Blair Wheadon who is one of SAP Crystal Reports Senior Product Managers.

    Atik, from the code Marino posted it is definitely SAP Enterprise code to access the CMC Server. For BOE/CRS samples see this link.

    To connect to BOE/CRS/CRSE there are 2 assemblies you need to add to your project:

    CrystalDecisions.Enterprise.Framework

    CrystalDecisions.Enterprise.InfoStore

    Neither are included with CR for VS 2010 and there are no plans to add this functionality to this free product.

    Thank you

    Don

    Senior Support Engineer 
    AGS Primary Support, Business User
    SAP Canada, Inc.


    Don Williams
    Thursday, April 21, 2011 4:31 AM