Skip to Content
0
Mar 02, 2009 at 04:00 PM

Failed to find an available RAS

72 Views

Hi all,

I am working on an add-in for Crystal Reports and try to open an existing report located on a BOE, which is installed on a different computer.

I followed the available examples however I always get the error message "Failed to find an available Report Application Server.".

I checked that the RAS is running and I tried the program on two different BOEs but always the same error. Additionally I disabled the firewalls as this was described to be the reason for this error, but it didn't help.

Does anybody know what's wrong here?

Thanks,

Tobias

My code

            SessionMgr sessionMgr = new SessionMgr();
            EnterpriseSession enterpriseSession = sessionMgr.Logon(
                  "administrator", pwd, serverName, "secEnterprise");
            EnterpriseService enterpriseService =
            enterpriseSession.GetService("InfoStore");
            InfoStore infoStore = new InfoStore(enterpriseService);
            enterpriseService =
            enterpriseSession.GetService("RASReportFactory");
            Object rrfObject = enterpriseService.Interface;
            ReportAppFactory reportAppFactory = (ReportAppFactory)rrfObject;
            string queryString = "Select SI_ID, SI_NAME, SI_PARENTID From CI_INFOOBJECTS "
                + "Where SI_PROGID='CrystalEnterprise.Report' "
                + "And SI_ID = '1150'";
            InfoObjects infoObjects = infoStore.Query(queryString);
            InfoObject infoObject = infoObjects[1];
            ReportClientDocument reportClientDocument = new
                ReportClientDocumentClass();
            reportClientDocument = reportAppFactory.OpenDocument(infoObject.ID, 0);