Izenda Logo

This setting allows the user to use a regular expression to filter certain fields from being added through the "Add All" button (the "Add All" button can be turned on in the features tab of the settings guide and is added in the fields section of 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.

Below is a sample global.asax using the AddAllFilterRegex setting. The code block will appear within <script runat="server"> </script> tags within global.asax.

Global.asax (C♯)

//main class: inherits DatabaseAdHocConfig or FileSystemAdHocConfig
public class CustomAdHocConfig : Izenda.AdHoc.DatabaseAdHocConfig
  // Configure settings
  // Add custom settings after setting the license key and connection string by overriding the ConfigureSettings() method
  public static void InitializeReporting() {
    //Check to see if we've already initialized.
    if (HttpContext.Current.Session == null || HttpContext.Current.Session["ReportingInitialized"] != null)
    AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE";
    //Creates a connection to Microsoft SQL Server
    AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE";
    Izenda.AdHoc.AdHocSettings.AdHocConfig = new CustomAdHocConfig();
    HttpContext.Current.Session["ReportingInitialized"] = true;
  public override void ConfigureSettings() {
    AdHocSettings.AddAllFilterRegex = "(id|guid)$";

Global.asax (VB.NET)

'main class: inherits DatabaseAdHocConfig or FileSystemAdHocConfig
Public Class CustomAdHocConfig
    Inherits Izenda.AdHoc.DatabaseAdHocConfig

    Shared Sub InitializeReporting()
        'Check to see if we've already initialized
        If HttpContext.Current.Session Is Nothing OrElse HttpContext.Current.Session("ReportingInitialized") IsNot Nothing Then
        'Initialize System
        AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE"
        AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE"
        Izenda.AdHoc.AdHocSettings.AdHocConfig = New CustomAdHocConfig()
        HttpContext.Current.Session("ReportingInitialized") = True
    End Sub

    Public Overrides Sub ConfigureSettings()
        AdHocSettings.AddAllFilterRegex = "(id|guid)$"
    End Sub
End Class