Skip to Content
0
Former Member
Sep 28, 2010 at 08:39 PM

Cannot create object CrystalEnterprise.PSReportFactory.

33 Views

Hello,

I'm getting the following error when I try to obtain the PSReportFactory:

Cannot create object CrystalEnterprise.PSReportFactory.

I am using BusinessObjects XI R2 .Net sdk and Visual Studio 2005. I am also connecting to Crystal Reports Server 2008. Here is my code:

static EnterpriseSession ceSession;

EnterpriseService ceEnterpriseService;

ceEnterpriseService = ceSession.GetService("PSReportFactory");

Object serviceAsObject = ceEnterpriseService.Interface;

PSReportFactory psReportFactory = (PSReportFactory)serviceAsObject;

int reportIDAsInteger= Convert.ToInt32(ReportId);

ReportSource reportSource = psReportFactory.OpenReportSource(reportIDAsInteger);

ISCRReportSource iscrReportSource = reportSource;

return iscrReportSource;

The error occurs at the following line:

ceEnterpriseService = ceSession.GetService("PSReportFactory");

Thanks for your help,

koko1313