Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

refresh preview dialg

edited February 2003 in General
Hello.
I have added a check box to the printdialog to choise if some information
must be printed or not. I'd like to make my decision visible to the preview
either, but I can manage it.

I have tried to put this code on the check click event :

ppReport.PrintToDevices;

but the preview doesn't refresh.

thanks
marco

Comments

  • edited February 2003
    When you are in the print dialog close event, you are still in the call to
    Report.Print. The first thing to try is to make a page request on the screen
    device. Here is an example that rerequests the page from a draw command
    click event. Adapt this code to work from the print dialog close event.

    http://www.digital-metaphors.com/tips/DrawCommandClickReRequestPage.zip


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited February 2003

  • edited February 2003
    You have to rerequest the page from the report engine. The demo show show to
    do that, although from a different mechanism. The calls to rerequest the
    page are going to be the same. Copy the RedrawThePage method of this example
    and use it from your print dialog event. The print dialog knows what a
    Report is, although you'll have to typecast the Report property call with
    TppReport to call ResetFromPageNo and to get the viewer and screen device
    objects in the print dialog. You should pass 1 as the page to reset from.
    The rest of the RedrawThePage method should stay the same and it should
    work.


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.