Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Preventing e-mail exports while keeping other export types

Status
Not open for further replies.

Keoki

Programmer
Feb 22, 2000
22
US
We are using the Automation Server in Crystal Reports
7.0 and Visual Basic 6.0. From the report preview window, the users can click on the export button to export their reports to multiple destinations: drives, exchange folders, e-mail, etc.

Due to privacy requirements in the medical care industry, we want to ensure that no one "accidentally" uses the export e-mail ability, but would like to allow them to continue to export to their hard drives.

I have been unable to come up with a way to not have the e-mail or Exchange folder destination types available. I have tried specifying only the drives, but the other types remain available.

I hope you can help me stop this availability for only certain reports.

Thank you,

Keoki
 
keoki: All you need to ensure is that your code sets DestinationType to either:

0 No destination (export not possible)
1 Diskfile
5 Application

Avoid either 2, 3 or 4 as these are the e-mail options
David C. Monks
david.monks@chase-international.com
Accredited Seagate Enterprise Partner
 
I tried that. Below is the code I used, but when the preview window came up, the e-mail export options were still available.

'remove e-mail export option
Set ADTExportOptions = ADTReport.ExportOptions
ADTExportOptions.DestinationType = 1

I was still able to e-mail. When I first set the code up for the preview window, I didn't do anything special to have the export or print buttons appear. They just seem to be there by default.

Do I have to totally remove the export option, then set it up manually? If so, how would I do this?

Thanks,

Keoki

Keoki
gb@cardinalhill.org

 
Keoki: I would suggest that you either code a trap for the event ExportButtonClicked ( UseDefault As Boolean ) to reset DestinationTypes 2, 3 or 4 to 0 or you could just not distribute the U2DMapi, U2DNotes or U2DVim DLL's as these are the ones which control actually e-mailing a report ( You'll probably then need to trap the resultant error from calling the non-existent DLL!) David C. Monks
david.monks@chase-international.com
Accredited Seagate Enterprise Partner
 
Hmmmm. That didn't work. The ExportButtonClicked event didn't even hit when I clicked the button, so the code within it was never processed. I do need to distribute the export dll's because there are only certain reports that we don't want to have the e-mail export ability. For other reports it would be great.

Thanks for trying to help Dave. If you have any other ideas, I am open to trying them.

Keoki

Keoki
gb@cardinalhill.org

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top