QuickReport复合报表预览大小

时间:2017-03-18 11:09:22

标签: printing c++builder quickreports

与简单的TQuickRep相反,TQRCompositeReport组件没有PreviewInitialState属性来控制预览尺寸。

有没有办法预览最大化的复合报告?

(默认状态为wsNormal

1 个答案:

答案 0 :(得分:1)

使用TQRCompositeReport::OnFinished事件:

#include "QuickRpt.hpp"
#include "QRPrev.hpp"

void __fastcall TForm1::QRCompositeReportFinished(TObject *Sender)
{
  for(int i(0); i < Screen->FormCount; ++i)
    if (Screen->Forms[i]->ClassNameIs("TQRStandardPreview"))
      static_cast<TQRStandardPreview *>(Screen->Forms[i])->WindowState = wsMaximized;
}