Changes

Exporting Reports

1,504 bytes added, 11:14, 8 June 2012
Added Exporting to XML section
* '''iif''' – QuickBooks.
* '''csv''' - Comma Separated Values
* '''xml''' - Extensible Markup Language
1. Set the '''Extension''' to '''txt'''.
'''Note:''' If the report has sub reports attached then you must set up the Advanced export settings for each of the sub report attached.
 
==Export to XML==
If you change the extension to '''xml''', then the report will construct an XML document from the report results.
 
1. In the '''Header''' section enter the XML declaration and open the root element, ''details'':
<pre>
<?xml version="1.0" encoding="ISO-8859-1"?>{BREAK}
<details>{BREAK}
</pre>
 
2. In the '''Detail''' section add the child elements, in the sample below the child is ''employee'' with subchildren ''firstname'', ''lastname'', ''salary'' and ''startdate''.
 
The {TAB}'s and {BREAK}'s will give the XML file proper indentation.
<pre>
{TAB}<employee>{BREAK}
{TAB}{TAB}<firstname>@Users - First name@</firstname>{BREAK}
{TAB}{TAB}<lastname>@Users - Last name@</lastname>{BREAK}
{TAB}{TAB}<salary>@Users - Salary@</salary>{BREAK}
{TAB}{TAB}<startdate>@Users - Start Date@</startdate>{BREAK}
{TAB}</employee>{BREAK}
</pre>
 
3. In the '''Footer''' section, close the root element
<pre>
</details>
</pre>
 
4. The Export file opened in Notepad:
<pre>
<?xml version="1.0"?>
 
<details>
<employee>
<firstname>Peter</firstname>
<lastname>Jahl</lastname>
<salary>25000</salary>
<startdate>11/05/2003</startdate>
</employee>
<employee>
<firstname>Herry</firstname>
<lastname>Lee</lastname>
<salary>55000</salary>
<startdate>27/02/2005</startdate>
</employee>
<employee>
<firstname>Peter</firstname>
<lastname>Manlee</lastname>
<salary>75000</salary>
<startdate>12/05/2001</startdate>
</employee>
</details>
</pre>
==Exporting with Subreports==
0
edits