API/CodeSamples/FieldFilterRegex.md
... ...
@@ -1,59 +0,0 @@
1
-#FieldsRegex
2
-
3
-[[_TOC_]]
4
-
5
-##About
6
-
7
-Sets the regular expression used for column filtering for data selection. This setting allows the user to use a regular expression to filter certain fields from being added to the report through the Fields tab in the Report Designer. An example of when this may be used is if you don't want social security numbers added to reports. You could add part of the name of that field to the regular expression so it is not listed as an option in the list. For example, to hide only fields ending with "ID", use the following value: ``AdHocSettings.FieldsRegex = "^.*(?<id)$``. There are also many excellent regular expression tools on the internet to build and test regular expressions that you can use with Izenda.
8
-
9
-_**Note:** You still will be able to use any fields to join tables at the Data Sources tab._
10
-
11
-**Troubleshooting:** If you see the message "No fields available to select" your regular expression might be too general. Check your regular expressions and your data source fields and try again.
12
-
13
-##Global.asax (C♯)
14
-
15
-```csharp
16
-//main class: inherits DatabaseAdHocConfig or FileSystemAdHocConfig
17
-public class CustomAdHocConfig : Izenda.AdHoc.DatabaseAdHocConfig
18
-{
19
- // Configure settings
20
- // Add custom settings after setting the license key and connection string by overriding the ConfigureSettings() method
21
- public static void InitializeReporting() {
22
- //Check to see if we've already initialized.
23
- if (HttpContext.Current.Session == null || HttpContext.Current.Session["ReportingInitialized"] != null)
24
- return;
25
- AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE";
26
- //Creates a connection to Microsoft SQL Server
27
- AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE";
28
- Izenda.AdHoc.AdHocSettings.AdHocConfig = new CustomAdHocConfig();
29
- Izenda.AdHoc.AdHocSettings.FieldsRegex = "pass|pw|admin";
30
- HttpContext.Current.Session["ReportingInitialized"] = true;
31
- }
32
-}
33
-
34
-```
35
-
36
-##Global.asax (VB.NET)
37
-
38
-```visualbasic
39
-'main class: inherits DatabaseAdHocConfig or FileSystemAdHocConfig
40
-Public Class CustomAdHocConfig
41
- Inherits Izenda.AdHoc.DatabaseAdHocConfig
42
-
43
- Shared Sub InitializeReporting()
44
- 'Check to see if we've already initialized
45
- If HttpContext.Current.Session Is Nothing OrElse HttpContext.Current.Session("ReportingInitialized") IsNot Nothing Then
46
- Return
47
- 'Initialize System
48
- AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE"
49
- AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE"
50
- Izenda.AdHoc.AdHocSettings.AdHocConfig = New CustomAdHocConfig()
51
- Izenda.AdHoc.AdHocSettings.FieldsRegex = "pass|pw|admin"
52
- HttpContext.Current.Session("ReportingInitialized") = True
53
- End Sub
54
-End Class
55
-```
56
-
57
-##Screenshots
58
-
59
-![](http://www.izenda.com/Site/Images/Screenshots/FieldsRegexDS.png)
... ...
\ No newline at end of file
API/CodeSamples/FieldsRegex.md
... ...
@@ -0,0 +1,59 @@
1
+#FieldsRegex
2
+
3
+[[_TOC_]]
4
+
5
+##About
6
+
7
+Sets the regular expression used for column filtering for data selection. This setting allows the user to use a regular expression to filter certain fields from being added to the report through the Fields tab in the Report Designer. An example of when this may be used is if you don't want social security numbers added to reports. You could add part of the name of that field to the regular expression so it is not listed as an option in the list. For example, to hide only fields ending with "ID", use the following value: ``AdHocSettings.FieldsRegex = "^.*(?<id)$``. There are also many excellent regular expression tools on the internet to build and test regular expressions that you can use with Izenda.
8
+
9
+_**Note:** You still will be able to use any fields to join tables at the Data Sources tab._
10
+
11
+**Troubleshooting:** If you see the message "No fields available to select" your regular expression might be too general. Check your regular expressions and your data source fields and try again.
12
+
13
+##Global.asax (C♯)
14
+
15
+```csharp
16
+//main class: inherits DatabaseAdHocConfig or FileSystemAdHocConfig
17
+public class CustomAdHocConfig : Izenda.AdHoc.DatabaseAdHocConfig
18
+{
19
+ // Configure settings
20
+ // Add custom settings after setting the license key and connection string by overriding the ConfigureSettings() method
21
+ public static void InitializeReporting() {
22
+ //Check to see if we've already initialized.
23
+ if (HttpContext.Current.Session == null || HttpContext.Current.Session["ReportingInitialized"] != null)
24
+ return;
25
+ AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE";
26
+ //Creates a connection to Microsoft SQL Server
27
+ AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE";
28
+ Izenda.AdHoc.AdHocSettings.AdHocConfig = new CustomAdHocConfig();
29
+ Izenda.AdHoc.AdHocSettings.FieldsRegex = "pass|pw|admin";
30
+ HttpContext.Current.Session["ReportingInitialized"] = true;
31
+ }
32
+}
33
+
34
+```
35
+
36
+##Global.asax (VB.NET)
37
+
38
+```visualbasic
39
+'main class: inherits DatabaseAdHocConfig or FileSystemAdHocConfig
40
+Public Class CustomAdHocConfig
41
+ Inherits Izenda.AdHoc.DatabaseAdHocConfig
42
+
43
+ Shared Sub InitializeReporting()
44
+ 'Check to see if we've already initialized
45
+ If HttpContext.Current.Session Is Nothing OrElse HttpContext.Current.Session("ReportingInitialized") IsNot Nothing Then
46
+ Return
47
+ 'Initialize System
48
+ AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE"
49
+ AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE"
50
+ Izenda.AdHoc.AdHocSettings.AdHocConfig = New CustomAdHocConfig()
51
+ Izenda.AdHoc.AdHocSettings.FieldsRegex = "pass|pw|admin"
52
+ HttpContext.Current.Session("ReportingInitialized") = True
53
+ End Sub
54
+End Class
55
+```
56
+
57
+##Screenshots
58
+
59
+![](http://www.izenda.com/Site/Images/Screenshots/FieldsRegexDS.png)
... ...
\ No newline at end of file