LoginSignup
0
1

More than 5 years have passed since last update.

c++ builder / FastReport > PDF出力 > 「ページXをエクスポートしています。」の表示を消す

Last updated at Posted at 2016-08-23
動作確認
C++ Builder XE4

FastReportでPDF出力するとき、「ページXをエクスポートしています。」のダイアログ表示を消したい。

frxPDFExport1->ShowProgress = false;とすれば消えるようだ。

Unit1.cpp
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "frxClass"
#pragma link "frxExportPDF"
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
    : TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
    frxPDFExport1->FileName = L"test.pdf";
    frxPDFExport1->ShowDialog = false;
    frxPDFExport1->ShowProgress = false; /***/

    frxReport1->PrepareReport(/*CLearLastRerpot=*/true);

    for(int loop=0; loop < 3; loop++) {
        bool res = frxReport1->Export(frxPDFExport1);
        String msg = BoolToStr(res);
        OutputDebugString(msg.c_str());
    }
}
//---------------------------------------------------------------------------

複数回のPDF出力処理をする時、「ページXをエクスポートしています。」ダイアログ上のキャンセルボタンを押してもExport()処理はキャンセルを識別できない。

上記のダイアログの表示を消して、代わりの進捗ダイアログをTProgressBarとTButtonを使ったフォームで代替することで、処理の停止を可能にする。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1