FAQ/databaseadhocconfig-table-structure.md
... ...
@@ -1,17 +1,51 @@
1
-#DatabaseAdHocConfig Table Structure
1
+#IzendaAdHocReports table
2 2
3
-When using _DatabaseAdHocConfig_ Izenda reports saves report definitions to the database.
3
+[[_TOC_]]
4 4
5
-Reports are saved in a special table created for this purpose:
5
+##About
6
+
7
+When using _DatabaseAdHocConfig_, Izenda reports saves report definitions to the database. By default, this is the table name that Izenda uses. You can use [[SavedReportsTable|/API/CodeSamples/SavedReportsTable]] to specify a different table name. Izenda will create the table for you, but in the event that something fails, here is the SQL script that will generate the table.
8
+
9
+##SQL 2012 Table Script
10
+
11
+```sql
12
+CREATE TABLE [dbo].[IzendaAdHocReports] (
13
+ [Name] NVARCHAR (255) NULL,
14
+ [Xml] NTEXT NULL,
15
+ [CreatedDate] DATETIME NULL,
16
+ [ModifiedDate] DATETIME NULL,
17
+ [TenantID] NVARCHAR (255) NULL,
18
+ [IzendaAdHocReportsID] INT NULL,
19
+ [ReportSourceID] INT NULL,
20
+ [Thumbnail] VARBINARY (MAX) NULL
21
+);
22
+```
23
+
24
+##Izenda FORMS plugin
25
+
26
+The Izenda [[FORMS|/Guides/ReportDesign/14.0-Izenda-FORMS]] plugin uses a unique process to generate the pixel-perfect forms that the report viewers see. To do this, it needs a special column in the database. Here is the table script with the new column added.
27
+
28
+###SQL 2012 table script
29
+
30
+```sql
31
+CREATE TABLE [dbo].[IzendaAdHocReports] (
32
+ [Name] NVARCHAR (255) NULL,
33
+ [Xml] NTEXT NULL,
34
+ [CreatedDate] DATETIME NULL,
35
+ [ModifiedDate] DATETIME NULL,
36
+ [TenantID] NVARCHAR (255) NULL,
37
+ [IzendaAdHocReportsID] INT NULL,
38
+ [Form] NVARCHAR (MAX) NULL,
39
+ [ReportSourceID] INT NULL,
40
+ [Thumbnail] VARBINARY (MAX) NULL
41
+);
42
+```
43
+
44
+###Alter table script
45
+
46
+And here is an SQL statement to add the field to an existing table.
6 47
7 48
```sql
8
-[Name](nvarchar(255), null)
9
-[Xml] (ntext, null)
10
-[CreatedDate](datetime, null)
11
-[ModifiedDate](datetime, null)
12
-[TenantID](nvarchar(255), null)
13
-[Form](nvarchar(max), null)
14
-[ReportSourceID](int, null)
15
-[IzendaAdHocReportsID](int, null)
16
-[Thumbnail] [varbinary](max) NULL
49
+ALTER TABLE [dbo].[IzendaAdHocReports]
50
+ADD [Form] NVARCHAR (MAX) NULL
17 51
```
... ...
\ No newline at end of file