Delphi console app prints to nowhere when run as a process but OK when run from command line.
I have a Delphi console app prints an Report Builder report to
nowhere when run as a process but OK when run from command line.
I have cut down the app to nothing but an unlinked text
ReportBuilder report. When run from the command line it prints
to the default printer. However this app needs to be summoned by
a .Net scheduler app but when that calls the Delphi Console app
as a process it goes through all the motions (I have inserted
error log lines at every step of the code in my original app,
and my minimal app has nothing but report.print in the
datamodule oncreate) but nothing happens, no errors, nothing in
the print queue - the print job just disappears.
Pat Bell
nowhere when run as a process but OK when run from command line.
I have cut down the app to nothing but an unlinked text
ReportBuilder report. When run from the command line it prints
to the default printer. However this app needs to be summoned by
a .Net scheduler app but when that calls the Delphi Console app
as a process it goes through all the motions (I have inserted
error log lines at every step of the code in my original app,
and my minimal app has nothing but report.print in the
datamodule oncreate) but nothing happens, no errors, nothing in
the print queue - the print job just disappears.
Pat Bell
This discussion has been closed.
Comments
We have not experienced this behavior before but the following comes to
mind.
Be sure that the user of the .Net scheduler has access to the proper files
and print drivers to print from that machine. Is the scheduler app being
run locally or remotely over a network or terminal service?
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
The scheduler is being run locally but the point is that it is my app that is
doing the printing, so it works when run from the command line. He has
successfully done what my app does from within the code itself but he calls
my app as a process and it runs says its doing each line of code yet nothing
happens.
When you run the app from the command line - the application process runs
under your Windows user account.
The Scheduler might be running under a different Windows user account. For
example, the Scheduler might be running as a windows service - which
typically runs under the Local System account. Or it might be running under
a different Widowsuser account created for the scheduler. As such the
processes it creates might be running under a different Windows account and
that user account probably has no printer drivers installed to it and might
have restrictions.
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com