K
kuer6983
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.BtnPrintClick(Sender: TObject);
//点击打印var i, aStart, aEnd : Integer;
begin
aStart := cmbAccStart.ItemIndex;
//开始 aEnd := cmbAccend.
ItemIndex;
//结束 if (aStart < 0) or (aEnd < 0) or (aStart > aEnd) then
Exit;
if FileExists(gRptDir + 'Acc.frf') then
//指定报表文件 begin
frReport.LoadFromFile('E:/Acc.frf');
frUserDataset1.RangeEndCount := aEnd - aStart + 1;
frUserDataset1.RangeEnd := reCount;
frReport.ShowReport;
end else
utShowMessage('打印摸板不存在!');
end;
procedure TForm1.frReportGetValue(const ParName: String;
var ParValue: Variant);
begin
if ParName = 'Acc1' then
ParValue := gAcc[cmbAccStart.ItemIndex + frUserDataset1.RecNo].Acc1;
if ParName = 'Acc2' then
ParValue := gAcc[cmbAccStart.ItemIndex + frUserDataset1.RecNo].Acc2;
if ParName = 'Acc3' then
ParValue := gAcc[cmbAccStart.ItemIndex + frUserDataset1.RecNo].Acc3;
end;
//打印预览显示页面显示有问题:1,2页面空,3页面显示第一条数据4,5页面空,6页面显示第二条数据....每隔两个页面就显示一条数据这个是哪里设置有问题吗????
//点击打印var i, aStart, aEnd : Integer;
begin
aStart := cmbAccStart.ItemIndex;
//开始 aEnd := cmbAccend.
ItemIndex;
//结束 if (aStart < 0) or (aEnd < 0) or (aStart > aEnd) then
Exit;
if FileExists(gRptDir + 'Acc.frf') then
//指定报表文件 begin
frReport.LoadFromFile('E:/Acc.frf');
frUserDataset1.RangeEndCount := aEnd - aStart + 1;
frUserDataset1.RangeEnd := reCount;
frReport.ShowReport;
end else
utShowMessage('打印摸板不存在!');
end;
procedure TForm1.frReportGetValue(const ParName: String;
var ParValue: Variant);
begin
if ParName = 'Acc1' then
ParValue := gAcc[cmbAccStart.ItemIndex + frUserDataset1.RecNo].Acc1;
if ParName = 'Acc2' then
ParValue := gAcc[cmbAccStart.ItemIndex + frUserDataset1.RecNo].Acc2;
if ParName = 'Acc3' then
ParValue := gAcc[cmbAccStart.ItemIndex + frUserDataset1.RecNo].Acc3;
end;
//打印预览显示页面显示有问题:1,2页面空,3页面显示第一条数据4,5页面空,6页面显示第二条数据....每隔两个页面就显示一条数据这个是哪里设置有问题吗????