QReport换页问题(50分)

  • 主题发起人 主题发起人 龙之吻
  • 开始时间 开始时间

龙之吻

Unregistered / Unconfirmed
GUEST, unregistred user!
报表结构如下
group header
detail
group footer
要求detail每5行换一页,第二页的格式也要和上一页一样
 
是我问题描述得有问题?
为什么没人回答我的问题呢?
 
Function TfrmWKOTMas.PrintReport(PrtType:Integer):Boolean;
var
FilePath:String;
i,iRecord,iRec:integer;
begin
FilePath:=ExtractFilePath(Application.ExeName)+'/Reports/'+'WKOTReport.frf';
if not FileExists(FilePath) then
begin
MessageDlg(SReportFileNotExists,mtError,[mbOK],0);
Exit;
end;
qryForPrint.Active :=False;
qryForPrint.SQL.Text :='SELECT * FROM [Person].[dbo].[FN_EmpWKOT_GetBillDetForPrint]('+ qryHead.fieldByName('sysBillNo').AsString +')';
qryForPrint.SQL.Text :=qryForPrint.SQL.Text + ' Order by Class_Name DESC,Serial_Name DESC,Line_Name DESC,Item_Name DESC';
qryForPrint.Active:=True;
iRecord:=qryForPrint.RecordCount;
iRec:=iRecord;
iRecord:=25-(iRecord MOD 25);
if iRecord<25 then
begin
qryhead.Edit;
for i:=1 to iRecorddo
begin
qryForPrint.Append;
iRec:=iRec+1;
qryForPrint.Post;
end;
end;
frReport.LoadFromFile(filePath);
if frReport.PrepareReport then
if PrtType=1 then
frReport.ShowPreparedReport
else
frReport.PrintPreparedReportDlg;
end;
 
接受答案了.
 
后退
顶部