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

RAP object is not retrieved

edited December 2012 in RAP
Running the following loop only sets the title of the first series.

procedure TitleAfterPrint;
var Series: TChartSeries;
Title: string;
X: integer;
begin
for X := 0 to 3
do begin
Series := DPTeeChart1.Chart.Series[X];
ChartSeriesSetTitle(Series, 'blabla');
end;
end;


class function TRapChartSeriesSetTitle.IsFunction: Boolean;
begin
Result := False;
end;

class function TRapChartSeriesSetTitle.GetSignature: String;
begin
Result := 'procedure ChartSeriesSetTitle(ASeries: TChartSeries;
ATitle: string);';
end;

procedure TRapChartSeriesSetTitle.ExecuteFunction(aParams: TraParamList);
var lSeries: TChartSeries;
lTitle: string;
begin
GetParamValue(0, lSeries);
GetParamValue(1, lTitle);

lSeries.Title := lTitle;
end;

Comments

  • edited December 2012
    Hi Jeroen,

    We were able to recreate this and are currently researching a solution.
    I will post here when one is found.

    Currently you will need to call the ChartSeriesSetTitle routine for each
    series manually (outside a loop).

    lSeries := DPTeeChart1.Chart.Series[0];
    ChartSeriesSetTitle(lSeries, 'MySeries1');

    lSeries := DPTeeChart1.Chart.Series[1];
    ChartSeriesSetTitle(lSeries, 'MySeries2');

    ...



    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.