Integration/Tutorials/Customizing-Izenda-Settings.md
... ...
@@ -52,6 +52,7 @@ For more a more detailed code sample, click any of the headings.
52 52
* InitializeReporting() **The license key must be first!** Then add the connection string and initialize your custom AdHocConfig.
53 53
* [[PreExecuteReportSet()|/FAQ/PreExecuteReportSet]] Add hidden filters and other code that needs to run before the report is displayed to the user.
54 54
* [[ProcessDataSet()|/FAQ/ProcessDataSet]] You can manipulate the report how you please in this method. This is useful for substituting values in your reports.
55
+
55 56
##How do I add custom code?
56 57
57 58
To enable a custom configuration, we must put the key and connection string in the ``InitializeReporting()`` method, even if they have already been set on the **Settings.aspx** page. Otherwise, there could be complications when initializing. When adding custom code, we recommend disabling **Settings.aspx** and **Izenda.config** altogether to prevent any conflicts from occurring. Here is the process flow for enabling custom code:
... ...
@@ -69,10 +70,10 @@ You may now add custom code to Izenda Reports.
69 70
70 71
Izenda Reports is an ASP.NET application and utilizes an object model. There are two classes upon which an integrator should primarily focus. These classes contain many settings and methods that will help you integrate our application with yours.
71 72
72
- * **AdHocSettings**: the class that contains all of the settings for Izenda Reports. Using the Settings.aspx page will enable application-wide usage of these settings. However, they can be set on a per-user basis. Customization at the user level is fairly easy but does require some experience with C♯ or VB.NET. For example:
73
- * **C♯:** ``AdHocSettings.ShowAdminButton = (bool)HttpContext.Current.Session["IsAdmin"];``
74
- * **VB.NET:** ``AdHocSettings.ShowAdminButton = CBool(HttpContext.Current.Session("IsAdmin"))``
75
- * **AdHocConfig**: the class that enables you to call the methods and properties that you have altered from anywhere else in your code. Generally, your global.asax will inherit either ``DataBaseAdHocConfig`` or ``FileSystemAdHocConfig``.
73
+* **AdHocSettings**: the class that contains all of the settings for Izenda Reports. A complete list of settings can be found [[here|API/AdHocSettings]]. There are a few different ways to scope settings:
74
+ * **Global Settings:** These generally do not require specific logic and can be set to constant values. You may also use the Settings.aspx page in our downloadable demo to create a global config file.
75
+ * **Per-User Settings:** You can use specific logic in the ``InitializeReporting`` method to give users roles, hide or show buttons, and much more. However, this does require some experience with C♯ or VB.NET.
76
+* **AdHocConfig**: the class that enables you to call the methods and properties that you have altered from anywhere else in your code. Generally, your global.asax will inherit either ``DataBaseAdHocConfig`` or ``FileSystemAdHocConfig``.
76 77
77 78
Both of these classes are customized by adding your code into the global.asax file, as shown above.
78 79
... ...
@@ -86,14 +87,6 @@ In general, most custom code will be placed in the **Global.asax** file. Custom
86 87
* **Per User Basis/Per Role Basis/etc:** This type of code applies to different users in different ways. You can use your own logic to implement settings at this level. Core settings of this nature that Izenda offers include [[CurrentUserName|/API/CodeSamples/CurrentUserName]], [[CurrentUserTenantId|/API/CodeSamples/CurrentUserTenantId]], [[CurrentUserRoles|/API/CodeSamples/CurrentUserRoles]], and [[CurrentUserIsAdmin|/API/CodeSamples/CurrentUserIsAdmin]].
87 88
* **Per Report/Custom Processing of Reports:** Applied before execution of each report. Generally, this is used for applying hidden filters. This code needs to be placed in the [[PreExecuteReportSet()/FAQ/PreExecuteReportSet]] method. [[Please see this example for details|/FAQ/applying-hidden-filter-using-inner-query]].
88 89
89
-##Calling Izenda Reports from your application
90
-
91
-The ``CustomAdHocConfig`` class contains a variety of methods that can be overridden to your specifications. Initially, the two most important are global and per-user configuration settings.
92
-
93
- * Global configuration settings: use the ``ConfigureSettings()`` method in the **global.asax**. Code placed in here will override the **settings.aspx** settings.
94
- * Per-user settings: place your code in the ``PostLogin()`` method and invoke this method from your application by calling:
95
- * ``Izenda.AdHoc.AdHocSettings.AdHocConfig.PostLogin();``
96
-
97 90
##What if my global.asax is already integrated or I cannot use it?
98 91
99 92
In the case that you will not be using the **global.asax** file or that you are using a different **global.asax** than Izenda's, you can set the license key at the start of the user's session to obtain the same result. You will need to make sure that you set the license key before invoking any of the configuration methods or settings in Izenda Reports.
... ...
\ No newline at end of file