cancel
Showing results for 
Search instead for 
Did you mean: 

CRVS2010 ISCDReportClientDocument - Exception on Creation

Former Member
0 Kudos

I have the following code block

The second line reports:

rcd.ReportDefController threw an exception of type CrystalDecisions.Shared.CrystalReportsException

The report file name was empty.

TotalUnitsByRadioTypeGraph GraphReport = new TotalUnitsByRadioTypeGraph();

CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument rcd = GraphReport.ReportClientDocument;

CrystalDecisions.ReportAppServer.Controllers.ReportObjectController controller = rcd.ReportDefController.ReportObjectController;

CrystalDecisions.ReportAppServer.ReportDefModel.ReportObjects rptObjects = controller.GetAllReportObjects();

CrystalDecisions.ReportAppServer.ReportDefModel.ChartObject chartObject;

foreach (CrystalDecisions.ReportAppServer.ReportDefModel.ReportObject reportObject in reportObjects)

{

if (reportObject is CrystalDecisions.ReportAppServer.ReportDefModel.ChartObject)

{

chartObject = (CrystalDecisions.ReportAppServer.ReportDefModel.ChartObject)reportObject;

chartObject.ChartStyle.TextOptions.Title = "GET THE SPANISH TITLE";

}

}

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Doyle,

What assemblies are you using?

I searched for:

TotalUnitsByRadioTypeGraph GraphReport = new TotalUnitsByRadioTypeGraph();

And it doesn't come up in the Object Browser or the SDK help file?

What is the fully qualified property - CrystalDecisions.Report........

Thanks

Don

0 Kudos

In the other post where I added a chart look at this line:

boChartStyle.Type = CrystalDecisions.ReportAppServer.ReportDefModel.CrChartStyleTypeEnum.crChartStyleTypeBar;

crChartStyleTypeBar is the types we support and you are allowed to use. So I believe the issue is the first line and not the second line.

Thanks again

Don

Former Member
0 Kudos

Don, TotalUnitsByRadioTypeGraph is the actual Crystal Report in the dot net project. It is represented by two files TotalUnitsByRadioTypeGraph.rpt and TotalUnitsByRadioTypeGraph.cs so you would not see this in the sdk.

Running the new on it produces the object GraphReport which is a subclass of CrystalDecisions.CrystalReport.Engine.ReportClass. I am trying to use the ReportClientDocument propery of this to get my RAS report type ISCDReportClientDocument in the second line.... this compiles but throws the runtime exception.

I have tried your method presented here but the compiler refuses to accept the new ReportClientDocumentClass reporting "Interop type CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass cannot be embedded. Use the applicable interface instead."

My Crystal usings are:

using CrystalDecisions.Shared;

using CrystalDecisions.ReportAppServer.ClientDoc;

using CrystalDecisions.ReportAppServer.Controllers;

using CrystalDecisions.ReportAppServer.DataDefModel;

using CrystalDecisions.ReportAppServer.ReportDefModel;

0 Kudos

Ah, thanks for clarifying.... Makes sense now why it can't it... Odd that you don't have a fully qualified object though, always recommended, then no mistaking what it is...

Add this to your project also:

public class frmMain : System.Windows.Forms.Form

{

CrystalDecisions.CrystalReports.Engine.ReportDocument rpt = new CrystalDecisions.CrystalReports.Engine.ReportDocument();

CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument rptClientDoc;

....

Both lines above allow you to either use the Report Engine ( rpt ) rpt is the report object or rptClientDoc is the ISCD report client document.

Thanks again

Don

Former Member
0 Kudos

Don, I have rebooted and line 2 now runs properly ? Thank you for your help.

Answers (0)