|
|
@@ -101,6 +101,7 @@ type
|
|
|
xlbToHeadExcel: TdxBarLargeButton;
|
|
|
tbRemoveSelection: TToolButton;
|
|
|
chkShowUpperNum: TCheckBox;
|
|
|
+ sdOutputPdf: TSaveDialog;
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
procedure xlbCloseClick(Sender: TObject);
|
|
|
procedure FormResize(Sender: TObject);
|
|
|
@@ -1642,17 +1643,16 @@ begin
|
|
|
//directPrintReport(PreviewBox.Canvas, strFile, PreviewComXML, True);
|
|
|
if (isFirst) then
|
|
|
begin
|
|
|
- strOutputFile := Format('%s%s.pdf', [FHistoryOutputPdfPath, FReportManager.FieldValue['名称']]);
|
|
|
- if GetSaveFileName(strOutputFile, 'PDF文件|*.pdf', '.pdf') then
|
|
|
+ sdOutputPdf.FileName := FReportManager.FieldValue['名称'];
|
|
|
+ if sdOutputPdf.Execute then
|
|
|
begin
|
|
|
isFirst := False;
|
|
|
- FHistoryOutputPdfPath := ExtractFilePath(strOutputFile);
|
|
|
- directPrintReport(PreviewBox.Canvas, strFile, PreviewComXML, True, False, oemNormal, strOutputFile, '', chkExcel2010.Checked);
|
|
|
+ directPrintReport(PreviewBox.Canvas, strFile, PreviewComXML, True, False, oemNormal, sdOutputPdf.FileName, '', chkExcel2010.Checked);
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
- strOutputFile := FHistoryOutputPdfPath + FReportManager.FieldValue['名称'] + '.pdf';
|
|
|
+ strOutputFile := ExtractFilePath(sdOutputPdf.FileName) + FReportManager.FieldValue['名称'] + '.pdf';
|
|
|
directPrintReport(PreviewBox.Canvas, strFile, PreviewComXML, True, False, oemNormal, strOutputFile, '', chkExcel2010.Checked);
|
|
|
end;
|
|
|
end;
|
|
|
@@ -1677,13 +1677,11 @@ begin
|
|
|
intEndPage := StrToInt(xcbEndPage.Text);
|
|
|
if (intStartPage>0) and (intEndPage <= PreviewComXML.TotalPages) then
|
|
|
begin
|
|
|
- strOutputFile := Format('%s%s.pdf', [FHistoryOutputPdfPath, PreviewComXML.ReportName]);
|
|
|
- if GetSaveFileName(strOutputFile, 'PDF文件|*.pdf', '.pdf') then
|
|
|
+ sdOutputPdf.FileName := PreviewComXML.ReportName;
|
|
|
+ if sdOutputPdf.Execute then
|
|
|
begin
|
|
|
- FHistoryOutputPdfPath := ExtractFilePath(strOutputFile);
|
|
|
- PdfHelper.ExportPages(PreviewComXML, strOutputFile, intStartPage, intEndPage);
|
|
|
+ PdfHelper.ExportPages(PreviewComXML, sdOutputPdf.FileName, intStartPage, intEndPage);
|
|
|
end;
|
|
|
- //PreviewComXML.PrintPDF(PreviewBox.Canvas, intStartPage, intEndPage);
|
|
|
end;
|
|
|
finally
|
|
|
Screen.Cursor := crDefault;
|