Home General

Create ppLabels at runtime - the Database-Record is not the right one if i want read a value

Hy,

in a Subreport - i want to create ppLabels at runtime

for this - i use:
procedure Tw_druck_analyse.write_cost_line_small(ausrichtung, links, breite, position: Integer; Name: String);
begin
mypplabel := TppLabel.Create(ppSummaryBand4);
mypplabel.band := ppSummaryBand4;
mypplabel.AutoSize := false;
mypplabel.Caption := Name;
mypplabel.Top := position;
mypplabel.Left := links;
mypplabel.Width := breite;
mypplabel.Font.Name := 'Arial';
mypplabel.Font.Size := 9;
if ausrichtung = 0 then mypplabel.TextAlignment := taRightJustified;
if ausrichtung = 1 then mypplabel.TextAlignment := taLeftJustified
end;

in the subreport -/ summaryBand - i have:
procedure Tw_druck_analyse.ppSummaryBand4BeforePrint(Sender: TObject);
begin
...
write_cost_line_small(1, 20, 194, i + x, UniMainModule.Z_Reportliste.FieldByName('s3_work1_text').asstring);


The "UniMainModule.Z_Reportliste" is the ZQuery -> TDataSource -> PPDBPipeline for the Subreport

BUT THE VALUES ARE NOT the values of the printed Subreport-Record ???

What are i make wrong???

Thanx Erich

Sign In or Register to comment.