Chart painting problem
Hi!
I use ReportBuilder 9.01 and a have to create a special chart. I created a
new chart component which is TppDPTeeChart descendant. But unfortunatelly
sometimes it not paints itself on the Design tab. I tried to find the
painting method and I found it. There is a mtehod in ppChrtUI.pas, it
refreshes the control. Here is the code:
procedure TppDPTeeChartDesignControl.PaintDesignControl(aCanvas: TCanvas);
begin
if TppCustomDBChart(Component).RefreshingData then Exit;
inherited;
end;
The problem is the next: TppDPTeeChart is not a TppCustomDBChart descendant.
So the Delphi does the hard casting runtime (TppCustomDBChart(Component)),
but the state of the RefreshingData property is ambiguous, because this
class doesn't have RefreshingData property. It means the value sometimes is
True, sometimes is False. Fortunatelly there is no runtime error through the
hard casting.
Here is the class hierarchy:
TppCustomDBChart = class(TCustomChart)
TppDPTeeChart = class(TppCustomTeeChart)
I really appreciate some help ASAP, for this issue, and a solution for this
problem...
Regards
Robert Makra
I use ReportBuilder 9.01 and a have to create a special chart. I created a
new chart component which is TppDPTeeChart descendant. But unfortunatelly
sometimes it not paints itself on the Design tab. I tried to find the
painting method and I found it. There is a mtehod in ppChrtUI.pas, it
refreshes the control. Here is the code:
procedure TppDPTeeChartDesignControl.PaintDesignControl(aCanvas: TCanvas);
begin
if TppCustomDBChart(Component).RefreshingData then Exit;
inherited;
end;
The problem is the next: TppDPTeeChart is not a TppCustomDBChart descendant.
So the Delphi does the hard casting runtime (TppCustomDBChart(Component)),
but the state of the RefreshingData property is ambiguous, because this
class doesn't have RefreshingData property. It means the value sometimes is
True, sometimes is False. Fortunatelly there is no runtime error through the
hard casting.
Here is the class hierarchy:
TppCustomDBChart = class(TCustomChart)
TppDPTeeChart = class(TppCustomTeeChart)
I really appreciate some help ASAP, for this issue, and a solution for this
problem...
Regards
Robert Makra
This discussion has been closed.
Comments
info@digital-metaphors.com with your serial number and registration info and
request download information. (RB 10.03 is the latest release and includes
support for D2006, D2005, D7, and D6).
I think updating to RB 9.03 will fix your issue. I checked the version
control history and that code was fixed about a year and half ago.
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Thanks for your fast answer. I'm going to udate my version.
Regards,
Robert