How to save without a "save dialog"

I am trying to save a report when clicking a button.
In the action event for that button I have the following code:

report = event.source.parent.getComponent(‘Report Viewer’)
report.saveAsPDF(“c:\TestReport.pdf”)

The problem is that a “Save dialog” box pops up.

Is it possible to save the PDF without seeing the dialog?

Thanks

Hi,

I don’t really see why the file save dialog has to be displayed with the saveAsPDF method, but as a workaround try the following:report = event.source.parent.getComponent('Report Viewer') fpmi.file.writeFile("C:\TestReport.pdf",report.getBytesPDF()) Note that this will overwrite any existing file without warning!

Al