Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No Code, just need advice 2

Status
Not open for further replies.

Saint1234

Programmer
Feb 18, 2004
25
0
0
IE
Hello, I have a problem and I can't think of the best way round it, I would like a bit off advice.

Problem: I have developed a mobile c# app (win forms) that runs off XDA's, this information is then automatically sent to a database back in the office. In the office we have to manually click on a job and print out the work report sent by the engineer using the XDA. What I was wondering was what would be the best way to get the work report to print out automatically to a specific printer? I have been thinking of using SQL triggers. I would have to be able to call the Report form so that it could populate the report (pdf) with the data in the database (sent from the XDA). I was wondering if anyone could give me their personal advice on how they would do it if it was their project. Many Thanks in advance. G
 
Why not create a windows service that will check every - say 15 minutes for the report data and if it is available then process it and print it.

-Kris
 
I think you can do this work e.g print out the report using a trigger and extended procedures but as Kris11 said you can use a windows service as well.
The trigger will generate the report file (pdf) and will put this file in a given folder.
The windows service will use a FileSystemWatcher to detect when the pdf file is put then print it to a given printer.
The same service could notify by e-mail or by another messaging system the designed person about new report was printed or notify an administrator when there is a printer failure.
The pdf files will be datetime stamped and will keep track of the printed files in a log file associated to the service.
A housekeeping process should also be implemented in the service to remove the pdf files older than a given number of days after a successful printing.
-obislavu-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top