Home.md
... ...
@@ -11,92 +11,99 @@ Please watch our ten minute integration video to see how to do a core integratio
11 11
[![Izenda Core Integration Video](/Home/izenda_intro_video.png)](https://www.youtube.com/watch?v=2FXYG6sqKF0)
12 12
13 13
###Izenda Reports Quick Setup
14
-To integrate Izenda into your own website, you will first need a development environment, such as Visual Studio. Once you have a development environment, you can get our website template from [here](http://www.izenda.com/Site/DownloadComplete.aspx?msgId=0). Once you have followed the steps there, return here and find out more about how you can get started using Izenda Reports.
14
+To integrate Izenda into your own website, you will first need a development environment, such as Visual Studio. Once you have a development environment, you can get our website template from [[here|http://www.izenda.com/Site/DownloadComplete.aspx?msgId=0]]. Once you have followed the steps there, return here and find out more about how you can get started using Izenda Reports.
15 15
16 16
###[[Configuring Settings|Integration/Tutorials/Customizing-Izenda-Settings]]
17 17
18
-The Izenda Reports API contains specific settings that alter the behavior of the tool on a per-user basis. Settings can be applied through the Settings.aspx page or via a CustomAdHocConfig class which is normally found in the Global.asax file. Examples of important settings include the license key or the user name.
18
+The Izenda Reports API contains specific settings that alter the behavior of the tool on a per-user basis. Settings can be applied through the Settings.aspx page or via a CustomAdHocConfig class. Your global.asax should contain a definition for this that inherits from either FileSystemAdHocConfig or DatabaseAdHocConfig. Examples of important settings include the [[license key|/API/CodeSamples/LicenseKey]], the [[connection string|/API/CodeSamples/SqlServerConnectionString]], and the [[user name|/API/CodeSamples/CurrentUserName]].
19 19
20 20
###[[Creating Views|Integration/Tutorials/Views]]
21 21
22
-Some databases contain complex field names that may be confusing to users. In these situations it may be necessary to create reporting views that simplify the data model for the user. Users can be limited to specific views using the "Visible DataSources" setting.
22
+Some databases contain complex field names that may be confusing to users. In these situations, it may be necessary to create Views that simplify the data model for the user. Users can be limited to specific views using the [[AdHocSettings.VisibleDataSources|/API/CodeSamples/VisibleDataSources]] setting.
23 23
24 24
###[[Applying Branding|Integration/Tutorials/Appearance]]
25 25
26
-There are a few different ways to apply your branding, logo or header controls to Izenda Reports.
26
+There are a few different ways to apply your branding, logo, or header controls to Izenda Reports.
27 27
28
-Header Image : The simplest way to apply your logo is to set the "Application Header Image Url" in the "CSS & Images" section of the configuration page or the ApplicationHeaderImageUrl setting. This can be done by navigating to Settings.aspx from a browser.
28
+**Header Image** : The simplest way to apply your logo is to set the "Application Header Image Url" in the "CSS & Images" section of the Settings.aspx page. You can also do it in your global.asax by modifying the [[AdHocSettings.ApplicationHeaderImageUrl|/API/CodeSamples/ApplicationHeaderImageUrl]] setting.
29 29
30
-Master Pages : If you already have an ASP.NET master page, you can apply it to ReportDesigner.aspx, ReportList.aspx, and ReportViewer.aspx. Be careful not to apply a master page or theme to the rs.aspx page as that may interfere with the reporting operation.
30
+**Master Pages** : If you already have an ASP.NET master page, you can apply it to ReportDesigner.aspx, ReportList.aspx, and ReportViewer.aspx. Be careful not to apply a master page or theme to the rs.aspx page as that may interfere with the reporting operation.
31 31
32
-IFRAMES or Frames : The Izenda reports pages may be placed inside an IFRAME or FRAME. This would need to be done for ReportDesigner.aspx, ReportList.aspx, and ReportViewer.aspx.
32
+**IFRAMES or Frames** : The Izenda reports pages may be placed inside an IFRAME or FRAME. This would need to be done for ReportDesigner.aspx, ReportList.aspx, and ReportViewer.aspx.
33 33
34
-###[[Building Core Reports]]
34
+###[[Building Core Reports|/FAQ/UserGuides]]
35 35
36
-The best way to deploy Izenda is to create a small set of base reports that user can then customize. Ideally initial reports should contain the most relevant data sources and fields. It may be beneficial to add summaries and charts to them as well. See the training section for details on how to create various types of reports.
36
+The best way to deploy Izenda is to create a small set of base reports that users can then customize. Ideally initial reports should contain the most relevant data sources and fields. It may be beneficial to add summaries and charts to them as well. See the training section for details on how to create various types of reports.
37 37
38 38
###[[Enforcing Security and User Limitations|Integration/Tutorials/Security]]
39 39
40
-The Izenda Reports platform includes a robust and flexible security model which inherits rich security credentials from your application. This example covers how to apply security for most common scenarios by using the ''PostLogin()'' to pass user credentials to the Izenda API. This method is normally found in the [CustomAdHocConfig](Integration/Tutorials/Adding-Code) class in the Global.asax file.
40
+The Izenda Reports platform includes a robust and flexible security model which inherits rich security credentials from your application. This example covers how to apply security for most common scenarios by using the [[PostLogin()|/FAQ/PostLogin]] method to pass user credentials to the Izenda API. This method is normally found in the [[CustomAdHocConfig|Integration/Tutorials/Adding-Code]] class in the Global.asax file.
41 41
42
-###Assumptions
42
+####Assumptions
43 43
44
-These will vary based on your application
44
+For demonstration purposes, we will be working with the following information:
45 45
46
- * The username is stored in a session variable called "UserName"
47
- * The users role is stored in a session variable called "Role"
46
+* The username is stored in a session variable called "UserName"
47
+* The tenant ID is stored in a session variable called "TenantID"
48
+* The user's role is stored in a session variable called "Role"
49
+* The user's country name is stored in a session variable called "UserCountry"
50
+* The database contains tables and views with a field named "ClientID"
51
+* Reports will be created and saved to a category called "Admin Reports"
52
+* A method named GetUserName() exists in global.asax that accesses the session variable "UserName"
53
+* A method named GetTenantID() exists in global.asax that accesses the session variable "TenantID"
54
+* A method named GetUserRole() exists in global.asax that accesses the session variable "Role"
55
+* A method named GetUserCountry() exists in global.asax that accesses the session variable "UserCountry"
48 56
49
- * The database contains tables and views with a field named "ClientID"
50
- * Reports will be created and saved to a category called "Admin Reports"
51
-
52
-###Limitations Enforced
57
+####Limitations Enforced
53 58
54 59
* The user is logged In
55 60
* The user can only see records for their ClientID
56
- * The user can only see certain data sources and will not see reports that require those data sources
61
+ * The user can only see certain data sources and will not see reports that require unauthorized data sources
57 62
* Non-admins will not be able to overwrite reports
58 63
* Non-admins will not see the "Admin Reports" and "Sensitive Reports" categories in their report list
59 64
60
-*Basic Login Security - Place in the ``PostLogin()`` or ``InitializeReporting()`` method of ``CustomAdHocConfig`` which is normally found in **Global.asax**.*
65
+###Basic Login Scenario
66
+
67
+In this example, we will initialize some of the more common settings. This is done in the [[PostLogin()|/FAQ/PostLogin]] or [[InitializeReporting()|/FAQ/InitializeReporting]] method of your ``CustomAdHocConfig`` class that we discussed earlier.
61 68
62 69
``` c#
63 70
//Pass User Credentials
64 71
AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE";
65 72
AdHocSettings.CurrentUserName = GetUserName();
66 73
AdHocSettings.CurrentUserTenantId = GetTenantID();
67
-AdHocSettings.CurrentUserIsAdmin = true;
74
+AdHocSettings.CurrentUserIsAdmin = (GetUserRole() == "Admin");
68 75
AdHocSettings.VisibleDataSources = new string[] { "Products", "Orders", "Customers" };
69 76
```
70 77
71
-*Multi-Role Scenario - Apply specific limitations to certain roles*
78
+###Multi-Role Scenario
79
+
80
+Now let's add some logic based on the user's role. In this example, we apply limitations based upon role
72 81
73 82
``` c#
74
-string role = GetUserRoleFromApp()
75
-if(role == "Admin")
83
+if(AdHocSettings.CurrentUserIsAdmin)
76 84
{
77 85
Izenda.AdHoc.AdHocSettings.VisibleDataSources = new string[] { "Purchasing.Vendor", "Products", "Orders", "Order Details", "Customers" };
78 86
}
79 87
else
80 88
{
81 89
Izenda.AdHoc.AdHocSettings.VisibleDataSources = new string[] { "Products", "Orders", "Customers" };
82
- Izenda.AdHoc.AdHocSettings.CurrentUserIsAdmin = false;
83 90
Izenda.AdHoc.AdHocSettings.ShowSettingsButton = false;
84
- Izenda.AdHoc.AdHocSettings.ShowSqlOutputIcon = false;
91
+ Izenda.AdHoc.AdHocSettings.ShowSqlOutputIcon = false;
85 92
Izenda.AdHoc.AdHocSettings.HiddenFilters["ShipCountry"] = GetUserCountry();
86 93
}
87 94
```
88 95
89
-*The PostLogin() method needs to be called at the end of your authentication process after user credentials are added to the session.*
96
+***Note:** The [[PostLogin()|/FAQ/PostLogin]] method needs to be called manually at the end of your authentication process after user credentials are added to the session.*
90 97
91 98
``` c#
92 99
// Call the Izenda PostLogin() from your login page after authentication is complete
93 100
Izenda.AdHoc.AdHocSettings.AdHocConfig.PostLogin();
94 101
```
95 102
96
-*Once security is fully configured, add the following code to [ConfigureSettings()](http://wiki.izenda.us/Adding-Code) method to prevent users from navigating to reports without logging in first.*
103
+*Once security is fully configured, add the following code to the [ConfigureSettings()](http://wiki.izenda.us/Adding-Code) method to prevent users from navigating to reports without logging in first.*
97 104
98 105
``` c#
99 106
// Require Login once security configured.
100
-AdHocSettings.RequireLogin = false;
107
+AdHocSettings.RequireLogin = true;
101 108
AdHocSettings.LoginUrl = "INSERT_YOUR_LOGIN_PAGE_HERE";
102 109
```
... ...
\ No newline at end of file