Autor Beitrag
Buggi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 35



BeitragVerfasst: Di 30.07.02 10:36 
Hi Leutz,

ich steh mal wieder vor 'nem Problem. Mein Chef möchte gern einen Fortschrittsbalken im Report haben. Ich denke das müsste mit so ein paar Shapes realisierbar sein. Diese müßten allerdings zur Laufzeit generiert werden. Ich krieg das nur nicht gebacken.

Mein Test-Code-Fragment :
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
procedure TRepArbeitsfolgeplan.QRBand1BeforePrint(Sender: TQRCustomBand;
  var PrintBand: Boolean);
var frame : TQRShape;
begin
   frame := TQRShape.Create(self);
   frame.Left := 50;
   frame.Top:=5;
   frame.Height := 20;
   frame.Width := 400;
   frame.Brush.Color := clBlue;
   frame.Enabled := true;
end;


Aber so funzt es nicht.

Kann mir da jemand weiterhelfen?

Gruß Buggi

_________________
Delphi 4, BDE, Paradox
MrSpock
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 262



BeitragVerfasst: Di 30.07.02 11:22 
Hallo Buggi,

möglicherweise muss PrintBand explizit auf True gesetzt werden. Ich weiß nämlich nicht, was an dieser Stelle der Default - Wert ist.
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
procedure TRepArbeitsfolgeplan.QRBand1BeforePrint(Sender: TQRCustomBand;
  var PrintBand: Boolean);
var frame : TQRShape;
begin
   frame := TQRShape.Create(self);
   frame.Left := 50;
   frame.Top:=5;
   frame.Height := 20;
   frame.Width := 400;
   frame.Brush.Color := clBlue;
   frame.Enabled := true;
   PrintBand := True
end;

_________________
Live long and prosper
MrSpock \\//
Buggi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 35



BeitragVerfasst: Di 30.07.02 11:55 
Dank Dir für die schnelle Antwort Mr Spock,

aber das wars leider nicht. Das Band wird schon dargestellt. Sind auch noch ein paar andere Dinge mit drauf.
Hab die Sache noch ein bischen erweitert:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
procedure TRepArbeitsfolgeplan.QRBand1BeforePrint(Sender: TQRCustomBand;
  var PrintBand: Boolean);
var frame : TQRShape;
begin
   frame := TQRShape.Create(self);
   frame.ParentReport := self;
   frame.Left := 1;
   frame.Top:=1;
   frame.Height := 20;
   frame.Width := 200;
   frame.Brush.Color := clBlue;
   frame.Enabled := true;
   frame.Visible := true;
   PrintBand := True;
end;


Hat aber nichts gebracht

Hast vielleicht noch 'ne Idee?

Gruß Buggi

_________________
Delphi 4, BDE, Paradox
MrSpock
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 262



BeitragVerfasst: Di 30.07.02 16:40 
Hallo Buggi,

ich habe einmal ausprobiert, ob es funktioniert, wenn man TQRShape nicht dynamisch erstellt, sondern als TQRShape direkt in das Band setzt. Du kannst ja dann über visible steuern, ob es angezeigt werden soll oder nicht.

Dann funktioniert es.

_________________
Live long and prosper
MrSpock \\//
Buggi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 35



BeitragVerfasst: Mi 31.07.02 11:13 
So hab ich es jetzt auch gemacht. Trotzdem danke für deine Antwort Mr Spock.

_________________
Delphi 4, BDE, Paradox