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!

security in rpt 1

Status
Not open for further replies.

swetham

Programmer
May 5, 2010
257
DE
Hi,
I have created a report report1.rpt using crystal reports software.Now i am using vb.net crystalreportviewer to view the report and i pasted the report1.rpt inthe server in reports folder and mentioned that path in vb.net. Now my problem is anyone in the network can download crystal reports software and modify the report. How can i provide security? Is there any other standard procedure to follow?

Thanks,
sweish.
 
You can compile it into your vb.net application. You add it to your project and it will become a class that is available within your project. Instead of loading the report from a file, you create an instance of the class. I don't do vb.net, but a C# example is this:

MyCrystalReport myRpt = new MyCrystalReport();

instead of something like

ReportDocument myRpt = new ReportDocument();
myRpt.Load("C:\MyCrystalReport.rpt");

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
That means in add new project->add new file we will add the rpt file? if place the exe in the client's machine will it work?
 
Yes. The report will be included inside the .exe, so you don't have to distribute it separately.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
However there are several catches with that approach:
1) Everyone must have the same version of the report
2) If you want to distibute a new version of the rpt, then you have to rebuild and redistribute the entire EXE
3)They can still export the rpt to Crystal Report format as an external file, and then open that with their version of Crystal.

A better solution is to encrypt the rpt file and only every decrypt it when you want to view the report. You can solve the export problem by trapping the export event and deny any export to Rpt format.

To my knowledge Ido Millet is the only developer with a report viewer that does exactly this. A clever solution.

Editor and Publisher of Crystal Clear
 
Thanks you so much for the reply. Can you Please explain me the process or can you provide me with any example on how to encrypt the rpt file and decrypt it.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top