A GN4 report returns an xml generated to be displayed into a table structure (with rows and columns).
The report XML contains a <r> tag for each row; inside the row tag there is one tag for each report column, containing the value of the table cell.
This way, the GN4 report XML can be displayed in the GN4 clients or browser. You can also save the XML report into a file (text file, Excel file, etc…). Moreover, you can store the report data also into a database table.
To configure the ReportOptions to store data in the reporting database
To save the statistics data into the reporting database, the first thing to do is specifying the name of the database table in the TableName property of the ReportOptions. For example:
<ropt:ReportOptions
wfres:activityName="reportFolderTable"
xmlns:ropt="http://www.teradp.com/schemas/GN4/1/ReportOptions.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
NavOptions="CreationAndModified"
TableName="ReportFolderTable">
</ropt:ReportOptions>
Every ReportOptions saves data into only one table.
The second thing to do is passing to the Report command the data needed to connect to the database, as ODBC connection string.
Here is an example of the ODBC connection string to save the report data into a SQLServer database called ReportDB:
“Driver={SQL Server};Server=mySQLServer;Database=ReportDB;uid=myDbUser;pwd=myPassword;”
Note that the ODBC connection strings can also point to a file, such as an Excel stylesheet or a simple plain/text file, and in these cases the table name parameter is the name of the destination Excel sheet or the text file.
Driver={SQL Server};Server=myServer;Database=myDatabase;uid=myUser;pwd=myPassword;
Driver={Microsoft ODBC for Oracle};Server=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myServer)(PORT=1521))(CONNECT_DATA=(SID=orcl)));Uid=myDatabase;Pwd=myPassword
Driver={Microsoft Access Driver (*.mdb)};DBQ=c:\bin\myDatabase.mdb
Driver={Microsoft Excel Driver (*.xls)};DSN='';firstRowHasNames=1;readonly=false;DBQ=c:\temp\result.xls
Driver={Microsoft Text Driver (*.txt; *.csv)};DBQ=c:\temp\report