Hide Code Tab
Gonzalo
Madrid
Hi!
How can I hide the Tab Code in the Designer for the user?
Thanks!
Regards.
How can I hide the Tab Code in the Designer for the user?
Thanks!
Regards.
Comments
It's not possible to hide the Code Tab from your code. If you have FR.Net Pro with source code, you can tweak the designer source.
And I can disable it?
I want that the user could not introduce malicious code in the FastReport Disigner.
Thanks.
You can prevent execution of such code using the Report.ScriptRestrictions property. See more info about this property in the class reference.
Thank you for answering.
Please, where can I obtain more information about this class? Some example?
I have been searching for Internet and have not found anything of usefulness.
Regards.
/// <summary>
/// Gets or sets a set of permissions that will be restricted for the script code.
/// </summary>
/// <remarks>
/// Since the report script is compiled into .NET assembly, it allows you to do ANYTHING.
/// For example, you may create a script that will read/write files from/to a disk. This property
/// is used to restrict such operations.
/// <example>This example shows how to restrict the file IO operations in a script:
/// <code>
/// using System.Security;
/// using System.Security.Permissions;
/// ...
/// PermissionSet ps = new PermissionSet(PermissionState.None);
/// ps.AddPermission(new FileIOPermission(PermissionState.Unrestricted));
/// report1.ScriptRestrictions = ps;
/// report1.Prepare();
/// </code>
/// </example>
/// </remarks>