Re: Problems getting basic XML examples to work
I thought I'd investigate writing XML reports today and spent a few fruitless hours trying to get Example 1 in the help system to work, i.e. this one:
<?xml version="1.0" ?>
<CustomReport menupath="Site Reports" title="Alphabetic List of Locations" description="Lists all location names in alphabetic order with their central spatial reference. Preferred is 'Yes' for preferred names and 'No' for alternative names.">
<SQL>
Select
Location.Location_Key,
Location_Name.Item_Name,
Location_Name.Preferred,
Location.Spatial_Ref
From Location Inner Join Location_Name On Location.Location_Key = Location_Name.Location_Key
<Where Keytype="Default">
Order By Location_Name.Item_Name
</Where>
</SQL>
</CustomReport>
I eventually found the problem that is worth passing on to any other newbie (and need to be fixed in a future version of the help and/or Recorder)...
Keytype in the above example begins with an upper-case K when it appears to need to be lower-case.
I also thought there was a problem with keytype="Default" as the query never showed under Quick Reports. (I had inadvertantly presumed that that this meant it would always show, but actually relates to what it does under Reports->Run (I think).
(Mike Weideli's basic example in (http://www.jncc.gov.uk/files/R6XMlHelpMike2.zip) is therefore okay, when I first reported it as not working, as it didn't show under Quick Reports).
Note that I got no error messages during the debug. I don't know if error reports are going somewhere that I haven't found yet...? Mike's help says "Any errors in the structure will give rise to an error message when Recorder 6 is opened" so I'd expected to be told something about "Keytype" being spelled with upper-case?
Newbies also note that it appears necessary to exit and re-enter Recorder with each change you make to the XML, a subtlety I missed at first which compounded the frustration.
Regards, Keith