?
Solved

printing a report from within a service application

Posted on 2003-02-27
3
Medium Priority
?
182 Views
Last Modified: 2010-04-04
Hello,

Before turning to rave reports I tried using TPrinter, but this doesn't seem to work because the service has no Tform ?

Then I tried the rave thingies and managed to save some pdf files and also the preview is working, but when I try to print on paper (by setting the DefaultDest property from TRvSystem to rdPrinter) it doesn't work anymore. In fact it seems the app is hanging after that.

I got no problems in a normal application (containing a form).

Now I wonder if it's possible for a service (application) to print some report.

My service app is written in D7.

Can anyone help me to get a printout on paper from within a service ?

thanks in advance,
mdiwo
 
0
Comment
Question by:mdiwo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Author Comment

by:mdiwo
ID: 8393986
Hello again,
Recently I quit working with rave on my problem and began playing on TPrinter again. What I found out is that whenever I access the Printer.Printerindex or similar as for example in the line below, the program stops.

{Original TPrinter code}
procedure TPrinter.SetState(Value: TPrinterState);
...
   with TPrinterDevice(Printers.Objects[PrinterIndex]) do

Is there an expert that could tell me reason for this behaviour ?
An example how the printout would work would be even better...

thanks in advance


0
 
LVL 2

Author Comment

by:mdiwo
ID: 8396229
my problem seems to be solved as I found the tzprinter-object from logicomm that seems to work as intended.

imho there is a problem with delphi's own tprinter-object when a service application tries to access some of the printer-properties/methods like on printerindex.
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 8396368
PAQ'd and points refunded

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses
Course of the Month13 days, 11 hours left to enroll

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question