cancel
Showing results for 
Search instead for 
Did you mean: 

Binding CrystalReportViewer control to report published from BOE

Former Member
0 Kudos
55

Hi,

I have gone through several sample application and seen two ways the binding has taken place...

one is getting the ReportClientDocument object throught the RASReportFactory as follows:

EnterpriseService tempService = enterpriseSession.GetService("", "RASReportFactory");

ReportAppFactory reportAppFactory = (ReportAppFactory)tempService.Interface;

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

CrystalReportViewer1.ReportSource = reportClientDocument ;

The other way I have come across is assigning the infoObject retrieved based on the query to the reportViewer control:

Report report = (Report)infoObject;

CrystalReportViewer1.EnterpriseLogon = enterpriseSession;

CrystalReportViewer1.ReportSource = report;

My question is:

How does the two binding ways different?

Is the second method not using the RASReportfactory to retrieve the report from BOE?

Which one is the best approach going forward?

Thanks

Kajal

View Entire Topic
former_member184995
Active Contributor
0 Kudos

The first one is using RAS to run and render the report, the second method is using the Page Server to run and render the report.

Jason

Former Member
0 Kudos

I am confused because on msdn help topic "Binding to InfoObject Cast as Report".

its stated that one of the drawback of the second method is that "Not as fast a method for displaying reports as when the RAS server or Page Server is used instead".

Moreover if we need to pass parameter to the report at run-time then we have to use the second method using the following code:

CrystalReportViewer1.ParameterFieldInfo = parameterFields;

CrystalReportViewer1.EnterpriseLogon = enterpriseSession;

CrystalReportViewer1.ReportSource = (Report)infoObject;

Is there a way to do the same with RAS Serve method to pass parameter to the report.

Thanks

Kajal

former_member208657
Active Contributor
0 Kudos

Have a look at the [SDK Library |http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/en/RAS_SDK/rassdk_net_doc/doc/rassdk_net_doc/html/SampleCode16.html#231053] for some info on passing parameters with RAS.