If I hide some fields on forms, will they be hidden also in the reports ? If I use DevExpress
reporting or even crystal reports ?
Visual Guard does not offer this feature out of the box.
If you hide some fields on forms, you have to hide also fields on the report like in the sample below:
You have a report named “CrystalReport11” this report is a typed report document. In this report you have a section “section3” and in this section you have a field named “nom1”.
We want to hide the field “nom1” when I have the permission “perm2”
1. In Visual Guard console, I create a permission “perm2” on this form.
2. In Visual studio I write this code in the form where the reportviewer and the reportdocument are.
if (VGSecurityManager.Principal.HasPermission ("perm2"))
CrystalReport11.Section3.ReportObjects["nom1"].ObjectFormat.EnableSuppress = true;
3. You can execute the project, and if the user connected to the report have the permission “Perm2” he cannot show the field “nom1”.
Visual Guard .NET