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

Show MDI Reports more than once

edited June 2013 in Devices
Hello Nico, okay?
Nico, just a question.
We currently have the need to view the same report (MDI -> Modal Preview =
False) two or more times with different params.

I can do this in two ways:

1) How our reports are in DataModules, we want to create as many instances
of DataModules and print to screen the report. Works 100%.

2) The other way would be to specialize the printing method TppReport and
rebuild validation that prevents the display of the report more than once.
This option is not yet possible because the method "PrintToScreen" does not
allow specialization.

Besides these two alternatives, there is another?

Thanks.

Regarts,

Eliseu Corrona.

Comments

  • edited June 2013
    Hi Eliseu,

    I'm a bit unclear about your requirements. Do you need to view the same
    report with different parameters at the same time or in sequential order?

    If you need to view the same report in separate MDI windows of your
    application, you could load the report as a template into two separate
    TppReport objects then display them separately.

    Perhaps some more information about what you would like your application
    to accomplish would help me understand better.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2013
    Hi Nico, no problem. I'll try explain again.

    My current solution is what you answered to me. My reports are stored in
    TDataModules. For this, I create the DataModule with the selected model and
    display separately. Works perfectly and I can show the report how many times
    I want, just by changing the display parameters.

    My other question is if I have any possibility to implement this feature in
    a specialization TppReport.

    Examples: TMyppReport

    Thus, there need to be creating instances of my report models, because
    everything is controlled in TMyppReport own.


    Was this Nico.
    My English is not very good, I hope you managed to explain.

    Thanks.

    Regarts,

    Eliseu Corrona.





  • edited June 2013
    Hi Eliseu,

    It is definitely possible to create a TppReport descendent that is
    tailored to your needs. You mentioned that "PrintToScreen" does not
    allow specialization (because it is private in TppProducer). If you
    need to alter this routine, you would need to re-name/re-code the
    routine inside your own descendent and call it from the Print routine
    rather than the original.

    It may be more trouble than it's worth to do this as you would
    constantly need to update the descendent each time we release a new
    version (if changes are made to the ancestors). For maintenance
    purposes, it may be easier to stay with the method (DataModules) you are
    using currently.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2013
    Hi Nico,
    Thanks for your answer.

    Without problems, I'll continue with my solution, in this case, creating
    many instances from my Report Templates (DataModules).
    My question was to confirm the possibility.
    Currently we have a specialized version of TppReport where I created several
    new features.

    But it sure is simpler I keep with the situation that I have today.

    Thanks friend.

    Regarts,

    Eliseu Corrona.


This discussion has been closed.