fbfa52a19826682d3b8d2b0634c2ca15c4b983e5
FAQ/Storing-Reports.md
| ... | ... | @@ -46,7 +46,7 @@ Each of these methods may be over-ridden in order to implement custom behavior. |
| 46 | 46 | |
| 47 | 47 | ```csharp |
| 48 | 48 | //C# |
| 49 | -public override void ConfigureSettings() |
|
| 49 | +public static void InitializeReporting() |
|
| 50 | 50 | { |
| 51 | 51 | Izenda.AdHoc.AdHocSettings.ReportsPath = "\SomePath"; |
| 52 | 52 | } |
| ... | ... | @@ -54,7 +54,7 @@ public override void ConfigureSettings() |
| 54 | 54 | |
| 55 | 55 | ```visualbasic |
| 56 | 56 | 'VB.NET |
| 57 | -Public Override Sub ConfigureSettings() |
|
| 57 | +Public Shared Sub InitializeReporting() |
|
| 58 | 58 | Izenda.AdHoc.AdHocSettings.ReportsPath = "\SomePath" |
| 59 | 59 | End Sub |
| 60 | 60 | ``` |
| ... | ... | @@ -62,11 +62,27 @@ End Sub |
| 62 | 62 | ##Database Mode |
| 63 | 63 | |
| 64 | 64 | This is the alternative saving mode for Izenda Reports. Izenda Reports creates a default table in the database, IzendaAdHocReports, to save the report data. In this mode, no data is stored in the Reports folder in the Izenda Reports directory. To set the default table which Izenda Reports should use, you must first create a table in the database and then ensure that the NETWORK SERVICE machine account has owner access if using ASP.NET 2.0 or that the ASP.NET machine account has owner access if using ASP.NET 1.1. Now tell Izenda Reports which table to use by setting the "SavedReportsTable" property as shown in the example. |
| 65 | + |
|
| 66 | +###Setting Database Mode |
|
| 67 | + |
|
| 68 | +To set Database Mode in our global.asax, we simply need to have the global.asax inherit the appropriate base class. We will then have a few configuration settings that become available. |
|
| 69 | + |
|
| 70 | +```csharp |
|
| 71 | +//C# |
|
| 72 | +public class CustomAdHocConfig : Izenda.AdHoc.DatabaseAdHocConfig |
|
| 73 | +``` |
|
| 74 | + |
|
| 75 | +```visualbasic |
|
| 76 | +'VB.NET |
|
| 77 | +Public Class CustomAdHocConfig Inherits Izenda.AdHoc.DatabaseAdHocConfig |
|
| 78 | +``` |
|
| 79 | + |
|
| 65 | 80 | ###Setting the Saved Reports Table |
| 66 | 81 | |
| 82 | +This is the most essential setting to specify when using Database Mode. However, it is not required. If it is not specified, Izenda will create and use a table called "[[IzendaAdHocReports|/FAQ/databaseadhocconfig-table-structure]]". |
|
| 67 | 83 | ```csharp |
| 68 | 84 | //C# |
| 69 | -public override void ConfigureSettings() |
|
| 85 | +public static void InitializeReporting() |
|
| 70 | 86 | { |
| 71 | 87 | Izenda.AdHoc.AdHocSettings.SavedReportsTable = "SomeTableName"; |
| 72 | 88 | } |
| ... | ... | @@ -74,7 +90,7 @@ public override void ConfigureSettings() |
| 74 | 90 | |
| 75 | 91 | ```visualbasic |
| 76 | 92 | 'VB.NET |
| 77 | -Public Override Sub ConfigureSettings() |
|
| 93 | +Public Shared Sub InitializeReporting() |
|
| 78 | 94 | Izenda.AdHoc.AdHocSettings.SavedReportsTable = "SomeTableName" |
| 79 | 95 | End Sub |
| 80 | 96 | ``` |