on 07-15-2011 8:28 PM
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";
}
}
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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;
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
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.