在qrprev.pas里注意以下这段内容
constructor TQRStandardPreview.CreatePreview(AOwner : TComponent;
aQRPrinter : TQRPrinter);
var
localZoom : integer;//ZOOM FIX
begin
inherited Create(AOwner);
set captions
tabs.Pages[0].Caption := sqrThumbNails;
tabs.Pages[1].Caption := sqrSearchResults;
groupbox1.Caption := sqrSearchText;
zoomfit.Hint := SqrZoomToFit;
zoomTowidth.Hint := sqrZoomTowidth;
zoom100.Hint :=sqrZoom100;
firstpage.Hint := sqrFirstPage;
nextpage.Hint := sqrNextPage;
previouspage.Hint := sqrPrevPage;
lastpage.Hint := sqrLastPage;
gotoPagebutton.Hint := sqrPageSelect;
findButton.Hint := sqrFindCaption;
printSetup.Hint := sqrPrinterSetup;
print.Hint := sqrPrint;
saveReport.Hint := sqrSaveReport;
loadReport.Hint := sqrLoadReport;
exitButton.Hint := sqrClosePreview;
caption := sqrPreviewWindowCaption;
exitbutton.caption := sqrExitButtonCaption;
QRPrinter := aQRPrinter;
if qrprinter.parentreport is TCustomquickrep then
begin
FormStyle := TCustomquickrep(qrprinter.ParentReport).PrevFormstyle;
width := TCustomquickrep(qrprinter.ParentReport).PreviewWidth;
height := TCustomquickrep(qrprinter.ParentReport).Previewheight;
WindowState := TCustomquickrep(qrprinter.ParentReport).PreviewInitialState;
ShowThumbs := TCustomquickrep(qrprinter.ParentReport).PrevShowThumbs;
ShowSearch := TCustomquickrep(qrprinter.ParentReport).PrevShowSearch;
InitZoom := TCustomquickrep(qrprinter.ParentReport).PrevInitialZoom;
reportTitle := TCustomquickrep(qrprinter.ParentReport).ReportTitle;
QRPrinter.Title := reportTitle;
FReportOrientation := TCustomquickrep(qrprinter.ParentReport).Page.Orientation;
localZoom := TCustomquickrep(qrprinter.ParentReport).zoom;
// ZOOM FIX
end
else
begin
// this should never happen
WindowState := wsMaximized;
ShowThumbs := true;
ShowSearch := true;
localZoom := 100;
// ZOOM FIX
end;
QRPreview.QRPrinter := aQRPrinter;
QRPreview.QRPrinter.Orientation := FReportOrientation;
if (QRPrinter <> nil) and (QRPrinter.Title <> '') then
Caption := sqrPreviewWindowCaption + QRPrinter.Title;
Gauge := TProgressBar.Create(Self);
Gauge.Top := 2;
Gauge.Left := 2;
Gauge.Height := 10;
Gauge.Width := 100;
LastProgress := 0;
// qrprinter.load -> qrprinter.preview grid bug fix
Tabs.Visible := ShowThumbs or ShowSearch;
try
if Tabs.Visible and (QRPrinter.PageCount > 0) then
ThumbGrid.RowCount := QRPrinter.PageCount;
if Tabs.Visible then
TabThumbs.TabVisible := ShowThumbs;
findButton.visible := ShowSearch;
if not ShowSearch and Tabs.Visible then
begin
TabSearchResult.TabVisible := false;
findButton.Visible := false;
end;
except
end;
if InitZoom = QRZoomtofit then
begin
QRPreview.ZoomToFit ;
ZoomFit.Down := true;
end
else
if InitZoom = QRZoomtowidth then
begin
QRPreview.ZoomToWidth;
ZoomToWidth.Down := true;
end
else
begin
QRPreview.Zoom := localZoom;// ZOOM FIX
QRPreview.UpdateZoom;
Zoom100.Down := true;
end;
if qrprinter.status = mpFinished then
Print.Enabled := true;
end;
关闭上面语句里-----特别是比较前面部分
tabs.Pages[0].Caption := sqrThumbNails;
.....
.....
exitbutton.caption := sqrExitButtonCaption;