How can I change output report name at run-time?

How can I change output report name at run-time?

Forum member · Jul 20, 2007
How can I change output report name at run-time? No matter what report name I pass to "DrawToWeb" method, when I save the PDF, I always get report name = class name (in my example "ER_ReportGenerator.pdf" instead of "Test.pdf") Example of my code: _____________________________________________ Public Class ER_ReportGenerator Inherits ceTe.DynamicPDF.ReportWriter.DplxWebForm Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim MyLayout As DocumentLayout = New DocumentLayout("MyReport.dplx")) Dim MyParameters As ParameterDictionary = New ParameterDictionary() MyParameters.Add("ReportDetails", "some data") Dim MyDocument As Document = MyLayout.Run(MyParameters) MyDocument.DrawToWeb("Test.pdf") End Sub End Class _____________________________________________

Re: How can I change output report name at run-time?

Support · Jul 20, 2007
Hello, It will automatically inherit the filename of the aspx page or the class name as the PDF file name. In order to have control over the filename while saving the PDF, you will have to use the overloaded DrawToWeb constructor that takes filename and also forces the user to download the file by setting the forceDownload parameter to true; else it is not possible and the default name will be the name of your class. public Void DrawToWeb(Page page, String downloadAsFileName, Boolean forceDownload) Thanks, ceTe Software Support Team.

Re: How can I change output report name at run-time?

Forum member · Jul 20, 2007
Thank you for your help. Any plans to implement a property that specifies the default file name for the streamed file? Should not be so difficult?

Re: How can I change output report name at run-time?

Support · Jul 20, 2007
Hello, There is nothing we can do to set the output file name. Acrobat takes the ASPX file name or the class name as the PDF file name and our product will not have control over this. Thanks, ceTe Software Support Team.

Re: How can I change output report name at run-time?

Forum member · Jul 21, 2007
Thank you for clarification.