views:

21

answers:

1

Hi All,

I am using Visual Studio 2008 and Crystal Reports that is shipped with it. I would like to set certain properties of a chart such as Chart Title at Runtime. I have tried via ChartObject but there are only limited properties such as top, width, height etc. and not the properties I'm interested in. I included "craxddrt.dll" in my solution which provides IGraphObject but am obviously trying to cast the wrong class with it as it returns an invalid object reference...

(myReportDocument.ReportDefinition.ReportObjects[0] as IGraphObject).Title

Any help in retrieving the chart properties would be much appreciated...

thanks,

Paul

A: 

Instead of trying to set the chart title at runtime, set it to be blank and display a Crystal formula in the same place.

Mark Bannister
Hi Mark,I appreciate your answer. Effectively, I was looking at exposing the properties of the Chart through a C# property grid so that the end user can customize the properties themselves similar to the Properties grid in C#.
PJP