unit ArtikelFixedPrintIB;
interface
{$I Konfig }
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, forms, tntforms, Dialogs,
VORLAGEREPORT,
Db, SctCtrl, SctRep, SctVar, extctrls, tntextctrls,
menus, tntmenus, AcePage, gpTimeZone
, AbstractDataBase
, TranslateAbstract
, CustomDefs
, ArtikelDefs
, CommonUtils
, SetUtils
,PSETUP
{$IFDEF Taktmatrix }
, MatrixTypes, IBCustomDataSet
{$ENDIF Taktmatrix }
;
type
TArtikelFixedPrtFrm =
class(TrepVorlage)
Sctvarlabel2: TSctvarlabel;
tblmainIDVar: TSctDBVar;
tblmainPARTNUMBERVar: TSctDBVar;
tblmainREVIDVar: TSctDBVar;
tblmainCREATEDVar: TSctDBVar;
tblmainCREATEPERSVar: TSctDBVar;
tblmainCHANGEDVar: TSctDBVar;
tblmainCHANGEPERSVar: TSctDBVar;
tblmainPERMITVar: TSctDBVar;
tblmainPERMITPERSVar: TSctDBVar;
tblmainCHANGEDBIASVar: TSctDBVar;
tblmainCREATEDBIASVar: TSctDBVar;
tblmainPERMITBIASVar: TSctDBVar;
tblmainREMARKVar: TSctDBVar;
tblmainTQUALITYDATAMASTER_IDVar: TSctDBVar;
tblmainGRAFIKNAMEVar: TSctDBVar;
tblmainBEZEICHNUNGVar: TSctDBVar;
tblmainABFUELLEN_IN_KISTEVar: TSctDBVar;
tblmainPARTREMARKVar: TSctDBVar;
varlabel5: TSctvarlabel;
Sctvarlabel4: TSctvarlabel;
Sctvarlabel26: TSctvarlabel;
Sctvarlabel38: TSctvarlabel;
Sctvarlabel39: TSctvarlabel;
Sctvarlabel40: TSctvarlabel;
Sctvarlabel46: TSctvarlabel;
Sctvarlabel47: TSctvarlabel;
Sctvarlabel48: TSctvarlabel;
Sctvarlabel49: TSctvarlabel;
Sctvarlabel50: TSctvarlabel;
Sctvarlabel51: TSctvarlabel;
Sctvarlabel3: TSctvarlabel;
Sctvarlabel7: TSctvarlabel;
iqryDetails: TAbstractDataSet;
dsiqryDetails: TDataSource;
DataSourceGuide1: TSctDataSourceGuide;
iqrydetailsPROCESSNUMBERVar: TSctDBVar;
iqrydetailsSETVALUEVar: TSctDBVar;
iqrydetailsUPPERLIMITVar: TSctDBVar;
iqrydetailsLOWERLIMITVar: TSctDBVar;
iqrydetailsANLAGEVar: TSctDBVar;
iqrydetailsTPARTMASTER_IDVar: TSctDBVar;
iqrydetailsNAMEVar: TSctDBVar;
iqrydetailsSTATIONVar: TSctDBVar;
iqrydetailsEINHEITVar: TSctDBVar;
iqrydetailsSTATIONNAMEVar: TSctDBVar;
Data: TSctSubDataBand;
DataLevel: TSctLevel;
DataHeader: TSctDataHeadBand;
DataHeaderLevel: TSctLevel;
Data1: TSctSubDataBand;
Data1Level: TSctLevel;
Data1Header: TSctDataHeadBand;
Data1HeaderLevel: TSctLevel;
Sctvarlabel33: TSctvarlabel;
Sctvarlabel34: TSctvarlabel;
Sctvarlabel35: TSctvarlabel;
Sctvarlabel36: TSctvarlabel;
Sctvarlabel37: TSctvarlabel;
evAnlage: TSctExprVar;
iqrydetailsSTATIONENVar: TSctDBVar;
iqrydetailsSORTERVar: TSctDBVar;
Sctvarlabel9: TSctvarlabel;
Sctvarlabel10: TSctvarlabel;
Sctvarlabel11: TSctvarlabel;
Sctvarlabel12: TSctvarlabel;
Sctvarlabel13: TSctvarlabel;
Sctvarlabel14: TSctvarlabel;
Sctvarlabel15: TSctvarlabel;
evAbfuelen: TSctExprVar;
evRevKorb: TSctExprVar;
Sctvarlabel16: TSctvarlabel;
Sctvarlabel17: TSctvarlabel;
Sctvarlabel21: TSctvarlabel;
Sctvarlabel19: TSctvarlabel;
iqry2Details: TAbstractDataSet;
dsIqry2Details: TDataSource;
DataSourceGuide2: TSctDataSourceGuide;
iqry2detailsPROCESSNUMBERVar: TSctDBVar;
iqry2detailsSETVALUEVar: TSctDBVar;
iqry2detailsUPPERLIMITVar: TSctDBVar;
iqry2detailsLOWERLIMITVar: TSctDBVar;
iqry2detailsANLAGEVar: TSctDBVar;
iqry2detailsTPARTMASTER_IDVar: TSctDBVar;
iqry2detailsNAMEVar: TSctDBVar;
iqry2detailsSTATIONVar: TSctDBVar;
iqry2detailsSTATIONENVar: TSctDBVar;
iqry2detailsEINHEITVar: TSctDBVar;
iqry2detailsSORTERVar: TSctDBVar;
iqry2detailsSTATIONNAMEVar: TSctDBVar;
Sctvarlabel8: TSctvarlabel;
procedure DataDataStart(Sender: TObject);
procedure DataDataSkip(Sender: TObject);
procedure Data1DataStart(Sender: TObject);
procedure Data1DataSkip(Sender: TObject);
procedure evAnlageGetData(oVar: TSctVar);
procedure evAbfuelenGetData(oVar: TSctVar);
procedure evRevKorbGetData(oVar: TSctVar);
private
{ Private-Deklarationen }
GroupValue:
string;
GroupValue1:
string;
protected
procedure BeforeRun(Filter:
string; SortIndex: INTEGER);
override;
procedure BeforeRun(aID: Integer);
override;
procedure BeforeRun(aID: Integer; aSubID: Integer);
override;
public
{ Public-Deklarationen }
end;
const
FieldBreak :
Array[0..1]
of string[20] = ('
PROCESSNUMBER','
STATIONNAME');
REVERS :
string = ('
Reversieren');
KORB :
string = ('
Korb Reinigen nach Loswechsel');
implementation
{$R *.DFM}
uses ArtikelEditFrame;
procedure TArtikelFixedPrtFrm.BeforeRun(Filter:
string; SortIndex: INTEGER);
begin
end;
procedure TArtikelFixedPrtFrm.BeforeRun(aID: Integer);
begin
ReportPage.PageSetup.Destination := destScreen;
report.Prompt := TRue;
end;
procedure TArtikelFixedPrtFrm.BeforeRun(aID: Integer; aSubID: Integer);
begin
end;
procedure TArtikelFixedPrtFrm.Data1DataSkip(Sender: TObject);
var
NextValue,
NextValue1 :
string;
begin
with Sender
as TSctSubDataBand
do
begin
DataSource.DataSet.Next;
if DataSource.DataSet.Eof
then
DataIsFinished := True
else
begin
NextValue := DataSource.DataSet.FieldByName(FieldBreak[0]).AsString;
NextValue1 := DataSource.DataSet.FieldByName(FieldBreak[1]).AsString;
if (GroupValue <> NextValue)
or (GroupValue1 <> NextValue1)
then
DataIsFinished := True
end;
end;
end;
procedure TArtikelFixedPrtFrm.Data1DataStart(Sender: TObject);
begin
with Sender
as TSctSubDataBand
do
begin
if DataSource.DataSet.Eof
then
DataIsFinished := True
else
begin
GroupValue := DataSource.DataSet.FieldByName(FieldBreak[0]).AsString;
GroupValue1 := DataSource.DataSet.FieldByName(FieldBreak[1]).AsString;
DataIsFinished := False;
end;
end;
end;
procedure TArtikelFixedPrtFrm.DataDataSkip(Sender: TObject);
var
NextValue :
String;
begin
with Sender
as TSctSubDataBand
do
begin
DataSource.DataSet.Next;
if DataSource.DataSet.Eof
then
DataIsFinished := True
else
begin
NextValue := DataSource.DataSet.FieldByName(FieldBreak[0]).AsString;
if (GroupValue <> NextValue)
then
DataIsFinished := True
end;
end;
end;
procedure TArtikelFixedPrtFrm.DataDataStart(Sender: TObject);
begin
with Sender
as TSctSubDataBand
do
begin
if DataSource.DataSet.Eof
then
DataIsFinished := True
else
begin
DataSource.DataSet.First;
GroupValue := DataSource.DataSet.FieldByName(FieldBreak[0]).AsString;
DataIsFinished := False;
end;
end;
end;
end.