Welcome, Guest
Username: Password: Remember me
This forum is the place to discuss issues related to ReportPro, Xs2Ado, Vo2Ado, bBrowser and other 3rd party products
  • Page:
  • 1

TOPIC:

ReportPro 2.x .NET (X# version): PDF creation in non-interactive mode 13 Apr 2021 14:43 #18019

  • Bernhard Mayer
  • Bernhard Mayer's Avatar
  • Topic Author


  • Posts: 48
  • Dear fellow X#'ers!

    Currently ReportPro 2x needs at least two environmental prerequisites to get to work: A VO based owner as well as a default printer.

    Do you think it might be possible to change the printing process for the creation of PDFs so that both prerequisites are no longer required?

    The problem is that we are using more and more "background" tasks for our applications which create RP PDFs, and sometimes there are errors when creating handles in non-interactive sessions where we don't have an idea how to get rid of them although the user accounts launching the tasks ought to have default printer settings as well as enough privileges to create VO windows.

    Best regards,
    Bernhard

    Please Log in or Create an account to join the conversation.

    ReportPro 2.x .NET (X# version): PDF creation in non-interactive mode 14 Apr 2021 09:16 #18027

    • robert
    • robert's Avatar


  • Posts: 3293
  • Bernhard,
    I am really not sure if this can be done without owner and printer.

    For the owner you could probably create a "fake" object. We are already wrapping the owner object in a RpReportOwner object inside the PtrDevice class for performance issues (so we can cache method info ).
    One place where the owner is used is for the Progress Dialog. But we could probably suppress that when no owner is specified.

    The printerdevice is a different thing. The whole printing in Rp2 is done through the PtrDevice object. This object gets the default printer and reads the paper bin names etc.
    - this object also allocates the device context that is used for the printing, preview and export
    - this device context is passed to all objects in the report
    - the output is then saved page by page to a meta file
    - after that the meta file is "played" and the preview or export pages are created from the info in the meta file.

    In theory we could skip the step of the meta file and directly produce the PDF but that would require a major change.
    I do not see that happen in the near future.

    Robert
    XSharp Development Team
    The Netherlands

    Please Log in or Create an account to join the conversation.

    ReportPro 2.x .NET (X# version): PDF creation in non-interactive mode 14 Apr 2021 09:36 #18028

    • Bernhard Mayer
    • Bernhard Mayer's Avatar
    • Topic Author


  • Posts: 48
  • Hi Robert!

    Thank you for the information resp. for the confirmation of my thoughts that it cannot be done easily as the question originally did come from some colleagues of mine (and I said 'no' :-)).
    Meanwhile I got kind of familiar with the RP source code to a certain degree but there's always the chance that I miss something.

    BR,
    Bernhard

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1