hi,
does anyone here knows how can i specify my own filename when a user clicks on the export button? it always defaults to the filename of the report that i'm using.
or do i need to create my own exporting module?
thanks in advance.
ann
Printable View
hi,
does anyone here knows how can i specify my own filename when a user clicks on the export button? it always defaults to the filename of the report that i'm using.
or do i need to create my own exporting module?
thanks in advance.
ann
Welcome to the forums. :wave:
Creating your own export module would probably be better as you would have total control over what happened. What do you want to export it to?
So there is no way to provide a default filename for the export functionality other than writing a custom pdf export module from ground up?
My situation: The user would like the application to provide a default filename in the export dialog (i.e. where you specify the filename and location) so they don't have to type it in everytime.
Any help would be greatly appreciated.
The Report Viewer Control lets you over-ride any of its default processing.
A few lines of code is all you need.
VB Code:
Private Sub rptViewer_ExportButtonClicked(UseDefault As Boolean) Dim objReport As CRAXDRT.Report Set objReport = rptViewer.ReportSource With objReport.ExportOptions .DestinationType = crEDTDiskFile .FormatType = crEFTPortableDocFormat .PDFExportAllPages = True 'Using a Common Dialog control you could 'prompt the user for the file name/location .DiskFileName = "c:\blah.pdf" End With objReport.Export False UseDefault = False End Sub