NAS failure on second SAVEASHTML

njhansen
Member Posts: 37
The following code is in a code-unit:
report.saveashtml(50013, 'C:\Temp\50013.html');
report.saveashtml(59101, 'C:\Temp\59101.html');
If I run it from NAS, the first report is generated properly, and the second is not.
Both reports work fine. If I run the code-unit from a classic client (using the same credentials that NAS uses), both come out. If I swap the two lines and run again from NAS, 59101 gets generated and 50013 does not.
Is there some limitation that a NAS session can only save one report as HTML during one job? I actually have about four of them, and I've tried them in various combinations, and it always seems that the first one works, and the latter ones do not. The intent is to eventually e-mail the results, but that is obviously impossible if the file doesn't come out.
report.saveashtml(50013, 'C:\Temp\50013.html');
report.saveashtml(59101, 'C:\Temp\59101.html');
If I run it from NAS, the first report is generated properly, and the second is not.
Both reports work fine. If I run the code-unit from a classic client (using the same credentials that NAS uses), both come out. If I swap the two lines and run again from NAS, 59101 gets generated and 50013 does not.
Is there some limitation that a NAS session can only save one report as HTML during one job? I actually have about four of them, and I've tried them in various combinations, and it always seems that the first one works, and the latter ones do not. The intent is to eventually e-mail the results, but that is obviously impossible if the file doesn't come out.
0
Answers
-
My apologies. Naturally, I spend hours beating my head against it, and as soon as I post something, I figure it out. :oops:
Turns out there was a failed printer driver installed on the server running NAS, and it happened to be the default printer for the user NAS was using. Apparently even though SAVEASHTML doesn't generate a print, it still needs the printer to be in working order. Presumably, the printer driver failure was preventing the second report from executing properly (why not the first? don't know).
Hope no one put any time into figuring this out.0 -
+1 for the update..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