📄 unit1.pas
字号:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
SctVar, ExtCtrls, SctRep, UCommon, UTzODbf, UTzDbf, SctCtrl, StdCtrls,
Buttons, SctBtn;
type
TForm1 = class(TForm)
TzDbf1: TTzDbf;
SctReport1: TSctReport;
ReportPage: TSctGrouppage;
ReportHeaderBand: TSctBand;
ReportHeaderBandlevel: TSctLevel;
PageHeaderBand: TSctBand;
PageHeaderBandlevel: TSctLevel;
DetailBand: TSctBand;
DetailBandlevel: TSctLevel;
PageFooterBand: TSctBand;
PageFooterBandlevel: TSctLevel;
ReportFooterBand: TSctBand;
ReportFooterBandlevel: TSctLevel;
svarDateTime: TSctDateTimeVar;
svarPage: TSctPageVar;
ExpTitle: TSctExprVar;
SctReportButton1: TSctReportButton;
Sctvarlabel1: TSctvarlabel;
ExpYear: TSctExprVar;
ExpStars: TSctExprVar;
Sctvarlabel2: TSctvarlabel;
Sctvarlabel3: TSctvarlabel;
SctTextLabel1: TSctTextLabel;
SctTextLabel2: TSctTextLabel;
SctTextLabel3: TSctTextLabel;
TotalOfExpYear: TSctTotalvar;
SctTotalvarLabel2: TSctTotalvarLabel;
SctTextLabel4: TSctTextLabel;
SctTotalvarLabel1: TSctTotalvarLabel;
SctTextLabel5: TSctTextLabel;
Sctvarlabel4: TSctvarlabel;
ExprDir: TSctExprVar;
ExprPlot: TSctExprVar;
Sub: TSctSubBand;
Sctvarlabel5: TSctvarlabel;
SctTextLabel6: TSctTextLabel;
procedure ReportPageAfterDataSkip(Page: TSctGrouppage);
procedure ReportPageDataStart(Sender: TObject);
procedure ReportPageDataSkip(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.ReportPageAfterDataSkip(Page: TSctGrouppage);
begin
ExpTitle.AsString := TZDbf1.DataSet.FieldByName('TITLE').AsString;
ExpYear.AsString := TZDbf1.DataSet.FieldByName('YEAR').AsString;
ExpStars.AsString := TZDbf1.DataSet.FieldByName('STARS').AsString;
ExprDir.AsString := TZDbf1.DataSet.FieldByName('Director').AsString;
ExprPlot.AsString := '';
TZDbf1.DataSet.FieldByName('Plot').AsMemo.SaveToStream(ExprPlot.AsStream);
end;
procedure TForm1.ReportPageDataStart(Sender: TObject);
begin
TZDbf1.GoTop;
end;
procedure TForm1.ReportPageDataSkip(Sender: TObject);
begin
TZDbf1.Skip(1);
If TzDbf1.dEof then
TSctGroupPage(Sender).DataIsFinished := True;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -