Explorar o código

报表控件,设置了纸张大小后,还需设置打印纸张大小ID。

MaiXinRong %!s(int64=9) %!d(string=hai) anos
pai
achega
f05d49ce99
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      Forms/ReportsFrm.pas

+ 4 - 0
Forms/ReportsFrm.pas

@@ -773,6 +773,10 @@ procedure TReportsForm.InitPageSettings;
 begin
   // ÉèÖÃÒ³Ãæ´óС
   PreviewComXML.setPageSize(ReportConfig.PageSize);
+  if ReportConfig.PageSize = 'A3' then
+    PreviewComXML.PrintPageSizeIdx := DMPAPER_A3
+  else if ReportConfig.PageSize = 'A4' then
+    PreviewComXML.PrintPageSizeIdx := DMPAPER_A4;  
   // ÉèÖñ߾à
   PreviewComXML.setEdge(0, '', ReportConfig.LeftEdge/10);
   PreviewComXML.setEdge(1, '', ReportConfig.RightEdge/10);