cancel
Showing results for 
Search instead for 
Did you mean: 

Error viewing reports in .Net Apps after upgrade to Crystal Server 14.1.5

Former Member
0 Kudos

We have recently upgraded to Crystal Reports Server version 14.1.5.1501 from 11.5.  We have a few legacy apps written in VS 2005 and VS 2008 that view reports on Crystal Server using the CrystalReportViewer control.  We are trying to get the old code to work with minimal effort but have thus far been unsuccessful. We've resolved numerous firewall issues, but now we receive the following error message while trying to view reports: “The Page Server you are trying to connect to is not accessible. Please contact your system administrator.”  Are we missing something?  Can the code used to access reports on Server 11.5 be used to access reports in 14.1?  Sample code of the page used to view reports is attached.  Any assistance is appreciated.

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Hi Steve,

It should work for you.

I assume you are using 32 bit mode for your app pool?

One thing you may want to do is try changing your query to, CR object name has changed.

"Select SI_ID, SI_CUID, SI_NAME, SI_PARENTID From CI_INFOOBJECTS Where SI_PROGID='CrystalEnterprise.Report' And SI_NAME='" + ReportName + "'"

And Dell is not quite right, .NET for BOE 4.x is supported in VS 2008 and above or what ever MS supports. CR for VS ( different product ) is not supported in earlier versions of VS than 2010.

But I do agree with her and you should upgrade to VS 2013, I don't think VS 2015 is supported in BOE .NET yet, it will likely work but not in supported platform so if there is an issue we can't fix it.

It's the framework that may be the problem 3.5 SP 1 or above.... Change your Framework to 3.5 or higher and see if that works.

I use this and it works for me, builds a list box of the report my BOE Server and allows me to select Managed/unmanaged RAS Server or Page Server:

else if (rptServer.Equals("pageserver"))

{

    String boeUser = Request.QueryString["boeUser"];

    if (boeUser == null)

        boeUser = "Administrator";

    String boePassword = Request.QueryString["boePassword"];

    if (boePassword == null)

        boePassword = "Password1";

    String boeAuthType = Request.QueryString["boeAuthType"];

    if (boeAuthType == null)

        boeAuthType = "secEnterprise";

    //Enterprise Variables

    SessionMgr sessionMgr = new SessionMgr();

    EnterpriseSession enterpriseSession = sessionMgr.Logon(boeUser, boePassword, boeServer, boeAuthType);

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

    InfoStore infoStore = new InfoStore(enterpriseService);

    if (contentLocale != null && contentLocale.Length > 0)

        enterpriseSession.UserInfo.PreferredViewingLocale = LocaleUtils.getEntCeLocale(contentLocale);

    else

        enterpriseSession.UserInfo.PreferredViewingLocale = CrystalDecisions.Enterprise.CeLocale.ceLocaleEnglishUS;

    string queryString = "Select SI_ID, SI_CUID, SI_NAME, SI_PARENTID From CI_INFOOBJECTS "

        + "Where SI_PROGID='CrystalEnterprise.Report' "

        + "And SI_NAME='" + reportName + "'";

    InfoObjects infoObjects = infoStore.Query(queryString);

    CrystalDecisions.Enterprise.InfoObject infoObject = infoObjects[1];

    ISCRReportSource doc;

    PSReportFactory psFactory = (PSReportFactory)enterpriseSession.GetService("PSReportFactory").Interface as PSReportFactory;

    Session["reportSource"] = psFactory.OpenReportSource(infoObject.ID);

    //CrystalViewer.ReportSource = Session["rptSrc"];

}

Parameters may be an issue also. Try a basic report that doesn't use Parameters and see if that works. Try one with no data source also to remove the DB connection out of the picture.

Don

DellSC
Active Contributor
0 Kudos

Unfortunately, you're in a bit of catch-22 situation:

- The 11.5 version of the SDK will not connection to the latest version of CRS correctly.

- The latest version of the SDK will only work in Visual Studio 2010 or newer.

One option you may want to look at is using an "OpenDocument" call instead of using the CrystalViewer component.  OpenDocument is a URL that you can append parameter values to that will open a viewer with the specific report you want to show.  If you don't send the parameters, it should show the parameter screen to the user.

You have to have a valid session in CRS in order to use it.  However, I believe that CRS has the new RESTful Web Services functionality which will allow you to open a session using HTTP GET and PUT commands.  The beauty of the RESTful Web Services, is that you don't need to install or use any SDK files in order to use it - the responses are in XML, so you just need to be able to parse that to get what you need.

You can find more information about OpenDocument and RESTful Web Services in the Developer Information section here:  http://help.sap.com/bobip.  Note that CRS and the full BI Platform share the same code base, so the non-Webi documentation in the BI Platform help site applies to CRS.

-Dell