Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Creating runtime chartSeries

edited September 2002 in General
Hi.
We need to create the Series of a DBChart at runtime from RAP.
We've created the RTTI classes to make this possible, but we're getting an
Acess Violation when doing the following code at RAP:

var testbar: TChartSeries;
begin

testbar := TBarSeries.Create(Report);

testbar.ParentChart := DPMyTeeChart1;



and when debuggin in delphi our code we see that the aValue has no value (it
is a variant with no value?)

here is the portion of code:


class function TPlanChartSeriesRTTI.SetPropValue(aObject: TObject;
const aPropName: string; var aValue): Boolean;
begin
Result := True;
if ppEqual(aPropName, 'ParentChart') then
TChartSeries(aObject).ParentChart := TCustomChart(aValue); //here
aValue show (No Value) in debugger


TIA.

Comments

  • edited September 2002
    Reference the Chart property of our wrapper chart component. This is the
    TCustomChart that the series should be a child of. Have you coded all of
    this in Delphi code first, before porting it to RAP code?


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited September 2002
    Ok, now we are doing this at RAP:
    testbar.ParentChart := DPMyTeeChart1.Chart;
    and works.

    We coded an chart in Delphi to know what properties and methods we need in
    rap. So now we are creating the RTTI to suport this.

    We can't create the reports in delphi because our reports can be done by the
    end-user, so now we have a lot of customsearchpanels, classes, pass-thru
    functions, and now RTTI classes.

    Thanks a lot.

    Valdir
    Planejar Brasil

This discussion has been closed.