Hi, I’m trying to use the function SAVEASHTML to write a report run to HTML as opposed to sending the report to the printer with RUNMODAL. I’m doing this because the report has the potential to print off a lot of pages (Approx. 150). This report is run as a start of day automated job so I can’t write to PDF and I don’t want the print dialog box to wait for someone to click ‘OK’. I replaced a report.RUNMODAL call with report.SAVEASHTML and Navision has been playing up. I’m running SAVEASHTML from within another report. Another Navision window opens for the print dialog box (what the?) but I can’t select the window from the windows toolbar unless I minimise other windows (what the? no.2). Is there anything weird about SAVEASHTML that I should know about? I only changed one line of code and Navision doesn’t like it. Cheers, Tom
That sounds weird to me as well, but why can’t you use a PDF printer ? For some (or most) PDF printers you can set up a default file name it is printing to whithout asking the user for a filename again. You just need to install a “second” PDF driver which writes to your file in the morning. Just define that “second” PDF printer as default printer for your report and the user id running that task. Then you can call report.runmodal and that’s it.
Since you haven’t explained th code r posted a sample its just guess work. [:(!] But It looks to me that you are using one report to call a second report. The first (Calling report) should be to processing only, and you should by pass the request screen option. PS It is well docuemnted in navision that previeing reports whilst in Full screen mode is problematic.