The tag hierarchy is summarised in the following sample XML, where values that would be entered by the report developer are shown in italics.  Each tag is shown on a separate line and indented from its parent tag for clarity – such formatting can be used but is not essential in the custom report XML file.



 <CSVTable name="#CSV1">

 <CSVFile description="Counties" />

 <CSVColumn name="CSV1" datatype="Char" size="20" />

 <CSVColumn name="CSV2" datatype="DateTime" />


 <CSVTable name="#SecondCSVTable" filename="C:\Temp\ChampData.csv">

 <CSVColumn name="CSV3" datatype="Integer"/>

 <CSVColumn name="CSV4" datatype="Char" size="50" />




      <externalfilterfile          inputfile=”my last import.ref”

           tablename=”#lastimport” />



 SELECT Field1, Field2, CONVERT(CHAR(20), NULL) AS CSV1, CONVERT(DATETIME, NULL) AS CSV2, CONVERT(INT, NULL) AS CSV3, CONVERT(CHAR(50), NULL) AS CSV4, CONVERT(CHAR(20), NULL) AS Update1 FROM Table1 T1 JOIN Table2 T2 ON T1.PrimaryKey = T2.ForeignKey JOIN #CSV1 ON T2.PrimaryKey = #CSV1.CSV1 JOIN #SecondCSVTable C2 ON C2.CSV3 = T1.Field4

 <Where keytype="Default">

 WHERE CSV1 = 'Dorset' AND

 <Condition field="CSV2" operator="equal" type="Date" name="Survey Date" />


 <Condition field="CSV3" type="CSVFile" name="Event Status File" datatype="text" />


 <Condition field="Field1" type="CurrentUserID" name="Current User ID"          operator="equal" />


 <Condition field="CSV4" operator="greater than equal" type="OptionSet" name="Location">

 <Option name="Poole" value="P32545" />

 <Option name="Bournemouth" value="B9876" />

 <Option name="Christchurch" value="C1234" />

 <Option name="Wimborne" value="W13244" />

 <Option name="Wareham" value="W234544" />



 <Condition field="" operator="not equal" type="VagueDate" name="Sample Date" />




<Where keytype="Location">WHERE Location_Key = '%s'</Where>

' This older method of sort order should no longer be used. Instead use OutputTableOrderby  

<Orderby name=”by Field1 then Field2” sql=”Order by Field1, Field2”/>


<Orderby name=”by Field2 then Field1” sql=”Order by Field2, Field1”/>

' Use this Instead, but note that all the field selected must be in the report. Use the column attribute to stop any not required in display from showing '  

<OutputTableOrderby name="by Taxonomic Sort Order" SQL="Order By sort_order"/>
<OutputTableOrderby name="by Scientific Name" SQL="Order By latin"/>



 <Column name="CSV2" position="1" caption="Location" keycolumn="Field1" />

 <Column name="Field1" tablename="Location" visible="False" />



Created by Atop CHM to web converter,© 2009 all right reserved.