Automating Save as HTML

Is there any way to automatically save a report as HTML once it is printed or previewed without the user having to go to File>Save As HTML? I tried REPORT.SAVEASHTML(reportname,filename) attached to a command button on the requeest form, but this just runs the whole report again from scratch and ignores any filters or options the user picked. Also, it doesn’t let me do CurrReport.SAVEASHTML(filename). I would also like to specify a default filepath and filename for the HTML report at the Save dialog if possible. Phil Derksen phil.derksen@astonit-us.com

Why not run a copy of your report as a C/AL Global on post report. Copy all the filters from your report to the new report,then save as HTML? It will have to run the report twice, but you should be able to Copy/Pass the Table Filters. If you have variables on the Report Options Tab then you would have to create a function on you report to initialise these. Mr David Cox MindSource (UK) Limited Navision Solutions Partner Email: david@mindsource.co.uk Web: www.mindsource.co.uk

Thanks for the help. Creating a function to intialize the request form variables worked, but I was not able to copy all the table filters using COPYFILTERS. Passing a record to the initializing function erases all the filters. The only way I can pass a filter is to pass each individual filter as a string to the initializing function. Of course the problem with this is that I have to make sure I pass every filter possibility into the function. Is there an easier way? Phil Derksen Aston IT Group - Colorado phil.derksen@astonit-us.com

Try setting the filters/ranges in the variable you are passing to the report. Alfonso Pertierra