Parent of TFrxReport.Print() Progress Bar

My application needs to print a TFrxReport silently. It does this as follows:
<!--fonto:Courier New--><span style="font-family:Courier New"><!--/fonto-->
frxReport1->PrintOptions->ShowDialog = false;
frxReport1->PrepareReport();
frxReport1->Print();
<!--fontc--></span><!--/fontc-->

Unfortunately, the progress window that appears has it's parent set to Application.MainForm, rather than Screen.ActiveForm, which is what I would expect. This means that when the progress window appears it drags the Application.MainForm window from the background and puts it over top of the the Screen.ActiveForm window.

If I suppress the progress window with <!--fonto:Courier New--><span style="font-family:Courier New"><!--/fonto-->frxReport1->ShowProgress = true;<!--fontc--></span><!--/fontc--> the problem does not occur, but this is not acceptable - I need the progress window to appear.

Interestingly, if I show the print options dialog with <!--fonto:Courier New--><span style="font-family:Courier New"><!--/fonto-->frxReport1->PrintOptions->ShowDialog = true;<!--fontc--></span><!--/fontc-->, that dialog uses the Screen.ActiveForm window as its parent, so TFrxReport.Print() is aware of Screen.ActiveForm.

This seems like a bug to me. TFrxReport.Print() should consistently use Screen.ActiveForm as its parent.

Does anyone know how to get around this problem? I.e. is there anyway to explicitly set the Parent of the progress window?

Comments

  • gpigpi
    edited 10:44PM
    I think you should modify FR's sources only

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.