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

PassTrough for TeeChart

edited March 2004 in General
This would have been a working function (tested it first in a regular form
and than modified it in pp/Passtrough).
But the aQry (TdaADOQueryDataView) his DataSource is empty. Might be normal
with DADE but how can i access the data from the passtrough ???

Kind Regards, Harry.

procedure TSdwRapTeeChartActualVsBudget1Function.ExecuteFunction(aParams:
TraParamList);
var
CompId : String;
aQry : TdaADOQueryDataView;
aChart : TppTeeChart;
aSeries : TChartSeries;
begin
LogIt('PieBuild', 'Start');
GetParamValue(0, aQry);
GetParamValue(1, aChart);
ShowMessage(aChart.Chart.Title.Text[0]);
LogIt('PieBuild', 'aQry', aQry);
LogIt('PieBuild', 'aQry.DataSource', aQry.DataSource);
LogIt('PieBuild', 'aQry.DataSource.DataSet', aQry.DataSource.DataSet);
while not aQry.DataSource.DataSet.Eof do
begin
LogIt('PieBuild', 'Complex_1');
LogIt('PieBuild', 'Complex_2',
aQry.DataSource.DataSet.FieldByName('COMP_ID').AsString);
if aQry.DataSource.DataSet.FieldByName('COMP_ID').AsString <> CompId
then
begin
aSeries := aChart.Chart.AddSeries(TBarSeries);
aSeries.Title :=
aQry.DataSource.DataSet.FieldByName('COMP_ID').AsString;
TBarSeries(aSeries).MultiBar := mbSideAll;
CompId :=
aQry.DataSource.DataSet.FieldByName('COMP_ID').AsString;
end;
aSeries.Add(aQry.DataSource.DataSet.FieldByName('ACTVSREVISED').AsFloat,
aQry.DataSource.DataSet.FieldByName('XMONTH').AsString);
aQry.DataSource.DataSet.Next;
end;
aChart.Chart.Legend.Visible := True;
aChart.Chart.View3D := False;
end;

Comments

  • edited March 2004
    Hi Harry,

    Instead of passing the TdaQueryDataView, pass the entire pipeline. From
    there you can access any of the fields in the pipeline and there for get
    access to the record of your choice.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2004
    Nico,

    Works wonderfull, Thx
This discussion has been closed.