Click here to Skip to main content
14,449,862 members
Rate this:
Please Sign up or sign in to vote.
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 19: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?
Rate this:
Please Sign up or sign in to vote.

Solution 1

   
Rate this:
Please Sign up or sign in to vote.

Solution 2

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)
   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100