Print Report from Webservice (No PDF)
Answers
-
I am having problems with this technique of printing PDF files from NAV. I have one environment on my laptop with all 3 tiers (SQL, NAV Server, RTC) running on the same machine and this works just fine. In our corporate development environment it is not working. This environment has SQL running on one machine and a terminal server that users connect to which is also running the NAV Server. In this environment this technique fails. Process.Start() runs and exits immediately without error, but nothing prints.
Actually, I have simplified things a bit by replacing the call to Foxit Reader with a call to a simple batch file that copies a file. On my laptop all works fine, but in the other environment the batch file fails to run. I have checked permissions for the domain account that is running the NAV server and all is in order.
There is obviously something different in the two environments that is causing this difference, but I can’t figure out what that important difference is.
Thanks in advance for any help.0 -
Check the permissions of the user you are using for the webservice. This one needs the permissions! the user of the nav-server is not the one executing the method.
Further for printing: the user executing needs access to the printer you are using. If you can't run a batch file with this method, you have 99% permission issues. where is your batch file located? Win7 / Win Server 2008 ? then you can only have permissions on the user folder.0 -
Important Update: At the time i posted this solution, it was not in productional use, i tested it only on a demo environment. Now that i'am implementing this for a customer i have to admit, that this solutions is not fully working.
In fact you need another component to print the pdfs if you wan't to use "Network Service" Account as the Account for the Webservice. Since Network Service doesn't have any printers, you need another Service that is running under an account that has printers available.
What i did was a small .Net Service that uses the FolderWatcher Class to watch a folder for incoming pdf files. in the Filename i put the printers name and parsed it out to print to the correct printer. This is working perfectly fo rme. I hope it helps someone else too.0 -
I have a similar challange (automated print of pdf files) and this solution seems as very elegant - however, could someone tell me which type of variable from deV.ch's script above this is??: PrintDoc := PrintDoc.PrintDocument();
Best regards
Hans0 -
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions