Home Devices

Printing issue

edited August 2005 in Devices
Hi there,
I have the following situation.
We have built a report server from Report builder ver 9.01. One of the
function in the Report server is Execute (ReportID: Integer; const
ReportDevice, Printername: WideString; ReportParams: OleVariant). Within the
procedure it loads the report and prints using the print command. Now I have
a COM Server which opens and calls this Execute function. If I run the COM
Server as a Windows program, it's all working. But when I run this COM
Server as service. Report.Print hangs. why?

Comments

  • edited August 2005

    If you need a server, I recommend evaluating RB Server Edition.

    1. The Windows user account under which the application is executing needs
    to have a valid printer driver installed. A windows service typically runs
    under a user account called Local System, though you can configure a windows
    service to run under any user account. Options are to install a printer
    driver to the loca system account or configure the service to run under an
    account that has a valid printer driver installed.

    2. A windows service typically displays no user interface, unless it is
    specifically configured to interact with the desktop. Options are to
    configure the report to suppress all dialogs or configure the service to
    interact with the desktop.





    --
    Nard Moseley
    Digital Metaphors Corporation
    http://www.digital-metaphors.com


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited August 2005
    Hi Nard,
    I am using RB Enterprise version v9.01

    1. If I am the local administrator, why do I need to set the service run
    under my account rather than Local System? Anyway, I have tried login with
    my account. Still didn't print. It didn't hang this time though.

    2. I don't have any pop up dialogs.

    Thanks
    Jude

  • edited August 2005

    ReportBuilder Server Edition is a high performanc, robust, multi-threaded
    report server that can run within the context of a windows service and can
    run under the local system account.

    An overview of its architecture can be found here

    http://www.digital-metaphors.com/products/report_server/architecture.html


    Perhaps reread my prior post, I never said that you can not run the service
    under Local System.

    What I said was...

    "Options are to install a printer driver to the local system account or
    configure the service to run
    under an account that has a valid printer driver installed."

    In other words, you can run the service application under Local System or
    any other account. The bottom line is that the account needs to have a valid
    printer driver installed.

    There are may issues that you may encounter while building a server.
    Multi-threading, thread safety, user interface issues,
    networking/communications issues, COM issues, etc. A service application is
    different from a standard application and the Local System account is
    different from other user accounts. And running a report in a thread is
    different from running a report in the main thread of a forms based
    application.





    --
    Nard Moseley
    Digital Metaphors Corporation
    http://www.digital-metaphors.com


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.