Click here to Skip to main content
15,867,308 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Hi i have created a crystal report and i don't want user to have the ability to export my report as .rpt file and make their own report modification, is there a simple way to disable export crystal report .rpt option. what i only need and want is to allow excel, word and pdf formats only to be exported.


thanks
Posted
Updated 12-Feb-20 18:09pm
Comments
Jim Jos 22-May-12 6:01am    
There is no option to edit the viewer control and it's features.

So you can try deactivating the export button from the viewer and use your own custom code for exporting.
JMAM 22-May-12 6:32am    
Can you give me an example of custom code?

 
Share this answer
 
To remove .rpt from crystal reports export try this:

Dim formats As Integer
formats = (CrystalDecisions.Shared.ViewerExportFormats.AllFormats Xor CrystalDecisions.Shared.ViewerExportFormats.RptFormat)

CrystalReportViewer1.AllowedExportFormats = formats

'Or Shorter Version :

CrystalReportViewer1.AllowedExportFormats = (CrystalDecisions.Shared.ViewerExportFormats.AllFormats Xor CrystalDecisions.Shared.ViewerExportFormats.RptFormat)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900