FAQ/ListReports.md
... ...
@@ -42,6 +42,14 @@ public override Izenda.AdHoc.ReportInfo[] ListReports() {
42 42
43 43
```
44 44
45
+##Controlling report access
46
+
47
+In [[Database Mode|http://wiki.izenda.us/FAQ/Storing-Reports#Database-Mode]], you can override the [[SaveReportSet|/FAQ/SaveReportSet]] method to include [[AdHocSettings.CurrentUserName|/API/CodeSamples/CurrentUserName]] in the data saved to the [[SavedReportsTable|/API/CodeSample/SavedReportsTable]] and then structure a query like the following:
48
+
49
+```csharp
50
+ String.Format("SELECT Name, CreatedDate, ModifiedDate FROM {0} ORDER BY Name WHERE UserID='{1}'", AdHocSettings.SavedReportsTable, AdHocSettings.CurrentUserName)
51
+```
52
+
45 53
### [[FileSystemAdHocConfig|http://wiki.izenda.us/FAQ/Storing-Reports#File-System-Mode]]
46 54
47 55
```csharp
... ...
@@ -86,9 +94,6 @@ public override ReportInfo[] ListReports() {
86 94
}//end method
87 95
```
88 96
89
-##Controlling report access
90
-
91
-This is an example of how to override this method using some basic security checks ensuring a user can only get reports available to him/her. We will provide a C♯ sample using [[DatabaseAdHocConfig|http://wiki.izenda.us/FAQ/Storing-Reports#Database-Mode]]. You can transform this code sample as needed to suit your own company's needs.
92 97
93 98
```
94 99
public class CustomAdHocConfig : Izenda.AdHoc.DatabaseAdHocConfig