Data Connectivity
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Data Connectivity
Message Icon Topic: How to protect .rpt programming ? Post Reply Post New Topic
Author Message
GGus
Newbie
Newbie


Joined: 26 Jan 2009
Online Status: Offline
Posts: 2
Quote GGus Replybullet Topic: How to protect .rpt programming ?
    Posted: 26 Jan 2009 at 1:51am
Hi,
 
When opening a report in the CR viewer in a WinForm .Net, the file .rpt appears on the PC disk (even if the file .rpt is deployed in an assembly, when viewing the report, a .rpt is created in the temporary folder)
The .rpt file can also be regenerated by tools like Net Reflector from the assembly in which it is deployed.

Please, is there solutions to protect the content of CR reports when they are deployed on a client PC (making them not re-openable in CR)
 
Thanks !
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 26 Jan 2009 at 8:55am
AFAIK, there is no way to prevent the temp file from being created - it's part of how Crystal works.  However, try this:
 
In the FormClosing event handler for the form where the report is viewed, put something like the following:
 
myCrystalViewer.Dispose();
 
The Crystal .NET components are actually wrappers for COM components.  COM is not very good about cleaning up after itself.  By specifically calling Dispose, you force it to clean up, release memory, and (I believe) delete the temp files.
 
-Dell
IP IP Logged
GGus
Newbie
Newbie


Joined: 26 Jan 2009
Online Status: Offline
Posts: 2
Quote GGus Replybullet Posted: 26 Jan 2009 at 9:27am
Tank you for your reply.
 
I already cleaned the temporary files : "myObjectDocument.Dispose()" and it works pretty well.
 
Therefore no way to hide the temporary files.
 
And to prevent decompile assemblies containing the .rpt, someone would have a trick?
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.