|
-
Oct 31st, 2005, 07:55 PM
#1
Thread Starter
New Member
how to change the filename when export button is clicked
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
-
Nov 2nd, 2005, 12:35 PM
#2
Re: how to change the filename when export button is clicked
Welcome to the forums. 
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?
-
Jun 25th, 2006, 02:20 PM
#3
Junior Member
Re: how to change the filename when export button is clicked
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.
-
Jun 26th, 2006, 01:21 PM
#4
Re: how to change the filename when export button is clicked
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|