unit main;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls, Mask, DBCtrls,
DB, TdbLicense, TdbDataSet,
Grids, DBGrids, Buttons, QuickRpt, TdbQuery;
type
Tfrm_main =
class(TForm)
DBEdit1: TDBEdit;
Image1: TImage;
TdbTable1: TTdbTable;
DataSource1: TDataSource;
DBEdit2: TDBEdit;
DBEdit3: TDBEdit;
DBEdit4: TDBEdit;
DBEdit5: TDBEdit;
DBEdit6: TDBEdit;
DBNavigator1: TDBNavigator;
DBEdit7: TDBEdit;
DBEdit8: TDBEdit;
DBEdit9: TDBEdit;
DBEdit10: TDBEdit;
DBEdit11: TDBEdit;
DBEdit12: TDBEdit;
DBGrid1: TDBGrid;
DBEdit13: TDBEdit;
BitBtn1: TBitBtn;
DBEdit14: TDBEdit;
DBCheckBox1: TDBCheckBox;
DBEdit15: TDBEdit;
DBEdit16: TDBEdit;
DBEdit17: TDBEdit;
DBEdit18: TDBEdit;
DBEdit19: TDBEdit;
DBEdit20: TDBEdit;
DBEdit21: TDBEdit;
DBEdit22: TDBEdit;
DBEdit23: TDBEdit;
DBEdit24: TDBEdit;
DBEdit25: TDBEdit;
DBEdit26: TDBEdit;
QRCompositeReport1: TQRCompositeReport;
TdbQuery1: TTdbQuery;
procedure FormCreate(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure QRCompositeReport1AddReports(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
frm_main: Tfrm_main;
implementation
uses u_qr1, u_qr2;
{$R *.dfm}
procedure Tfrm_main.FormCreate(Sender: TObject);
var dbfrm:
string;
begin
dbfrm := ExtractFilePath(ParamStr(0))+'
db/db.tdbd';
TdbTable1.Active := False;
try
TdbTable1.DatabaseName := dbfrm;
TdbTable1.TableName := '
antragsgegner';
TdbTable1.Active := True;
except
MessageBeep(0);
ShowMessage('
Die Tabelle db.tdbd befindet' + #10#13 +'
sich nicht im angegebenen Verzeichnis!')
end
end;
procedure Tfrm_main.BitBtn1Click(Sender: TObject);
var dbqr :
string;
begin
dbqr := ExtractFilePath(ParamStr(0))+'
db\db.tdbd';
QRCompositeReport1.TdbQuery1.Close;
QRCompositeReport1.TdbQuery1.DatabaseName := dbqr;
QRCompositeReport1.TdbQuery1.SQL.Clear;
QRCompositeReport1.TdbQuery1.SQL.Add('
SELECT * FROM antragsgegner WHERE ID =' + DBEdit1.Text);
showmessage(QRCompositeReport1.TdbQuery1.SQL.text);
QRCompositeReport1.TdbQuery1.Open;
QRCompositeReport1.Preview;
end;
procedure Tfrm_main.QRCompositeReport1AddReports(Sender: TObject);
begin
with QRCompositeReport1.Reports
do
begin
Add(Seite1.Report);
Add(Seite2.Report);
end;
end;
end.