Home Component Writing

Creating a Custom Viewer

edited December 2008 in Component Writing
Hi,
I have created an MDI child form where the user is prompted to enter the
various report parameters. Once they press the 'Report' button on this form,
a second form is dynamically created (also a MDI child). The second form has
all of the logic to access the data, it also has on it the TppReport and a
TppViewer. In the onShow() event the report is displayed.

This works perfectly well except for one thing, my report is displayed
correctly on the second child form (which is now a standalone report) and
can be executed multiple times. However, the built in registered viewer also
displays, which means that the report is displayed twice, each time I run
the report. Is it possible to only display my report in the custom form that
I have created and not also in the registered TppViewer?

Thanks for your help.

Robert.

Comments

  • edited December 2008
    Hi Robert,

    How and where are you initially running the report? Typically when showing
    a report inside a TppViewer object, you will want to connect the viewer to
    the report and call Report.PrintToDevices. This will prevent the preview
    window from displaying and send the report drawcommands directly to each
    connected device.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.