(Gast)
n/a Beiträge
|
Quick Report hat falsches design
29. Dez 2009, 17:14
hallo,
also ich habe ein problem mit quick report. ich möchte ein paar graphen mit ein paar infos ausdrucken. dafür habe ich das quick report benutzt das drucken funzt auch ganz gut bloß die seiten vorschau sieht genauso aus wie im design modus. die controllleiste am oberen fenster rand fehlt. hier ist das wichtigste von unserem quellcode.
Delphi-Quellcode:
nit Linienform1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, TeeProcs, TeEngine, Chart, math, Series;
type
TForm1 = class(TForm)
Edit1: TEdit;
Label1: TLabel;
Edit2: TEdit;
Label2: TLabel;
Edit3: TEdit;
Label3: TLabel;
Edit4: TEdit;
Label4: TLabel;
Edit5: TEdit;
Label5: TLabel;
Edit6: TEdit;
Label6: TLabel;
Edit7: TEdit;
Label7: TLabel;
Edit8: TEdit;
Label8: TLabel;
Chart1: TChart;
Button1: TButton;
Edit9: TEdit;
Label9: TLabel;
Edit10: TEdit;
Label10: TLabel;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Button5: TButton;
Button6: TButton;
Timer1: TTimer;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Chart1DblClick(Sender: TObject);
procedure Button5Click(Sender: TObject);
procedure Button6Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure Button4Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
shift, wid, pop, freq, step,hoehe,scale, tau, gg, gg1, a1, a2, a3, a4, MHz: real;
shape, x: array of real;
list: array of TlineSeries;
i, j, nstep: integer;
const
coloranz: integer = 16;
ColorPalette : Array[1..15] of TColor = (clRed, clGreen, clBlue, clGray, clFuchsia, clTeal, clNavy, clMaroon, clLime, clOlive, clPurple, clSilver, clAqua, clBlack, clyellow);
implementation
uses Linienform2;
{$R *.dfm}
procedure TForm1.Button4Click(Sender: TObject);
begin
form2.QuickRep1.Preview;
end;
end.
und der quellcode vom qrfenster:
Delphi-Quellcode:
unit Linienform2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, QuickRpt, TeeProcs, TeEngine, Chart, DbChart, QRTEE,
QRCtrls, series, StdCtrls, DB, DBTables;
type
TForm2 = class(TForm)
QuickRep1: TQuickRep;
Button1: TButton;
QRSubDetail1: TQRSubDetail;
QRMemo1: TQRMemo;
QRMemo2: TQRMemo;
QRChart1: TQRChart;
QRDBChart1: TQRDBChart;
procedure QuickRep1Preview(Sender: TObject);
procedure add;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
clist: array of Tlineseries;
implementation
uses Linienform1;
{$R *.dfm}
procedure TForm2.add;
begin
setlength(clist, length(clist) + 1);
clist[length(clist) - 1] := Tlineseries.Create(qrchart1.chart);
qrchart1.chart.AddSeries(clist[length(clist) - 1]);
clist[length(clist) - 1].DataSource := list[length(clist) - 1];
clist[length(clist) - 1].SeriesColor := colorpalette[length(clist) mod coloranz];
end;
procedure TForm2.QuickRep1Preview(Sender: TObject);
var
i : integer;
begin
qrmemo2.Lines.Clear;
qrmemo2.Lines.Add(' ' + form1.edit1.text);
qrmemo2.Lines.Add(' ');
qrmemo2.Lines.Add(' ' + form1.edit2.text);
qrmemo2.Lines.Add(' ');
qrmemo2.Lines.Add(' ' + form1.edit3.text);
qrmemo2.Lines.Add(' ');
qrmemo2.Lines.Add(' ' + form1.edit4.text);
qrmemo2.Lines.Add(' ');
qrmemo2.Lines.Add(' ' + form1.edit5.text);
qrmemo2.Lines.Add(' ');
qrmemo2.Lines.Add(' ' + form1.edit6.text);
qrmemo2.Lines.Add(' ');
qrmemo2.Lines.Add(' ' + form1.edit7.text);
qrmemo2.Lines.Add(' ');
qrmemo2.Lines.Add(' ' + form1.edit8.text);
qrmemo2.Lines.Add(' ');
qrmemo2.Lines.Add(' ' + form1.edit9.text);
qrmemo2.Lines.Add(' ');
qrmemo2.Lines.Add(' ' + form1.edit10.text);
qrmemo2.Lines.Add(' ');
qrchart1.Chart.SeriesList.Clear;
setlength(clist, 0);
for i := 0 to length(list) -1 do add;
show;
end;
procedure TForm2.Button1Click(Sender: TObject);
begin
quickrep1.Print;
end;
end.
ich hoffe auf frühe rückmeldungen
euer
MADDIN
|