1

Re: Quick species report with hierarchy

Hi

The xml report which provides a quick species list for a site (with subsites) is one which I would hope to use a lot, however it has one very obvious omission. I have looked at the coding but am too much the XML novice to be able to fathom a solution as yet.

Simply put, the report would be much more useful if, in addition to scientific and common names and taxon group name, it also included at least the preferred name of the location (and perhaps the file code). This would then enable a report to be produced which included the name in the title.

I cannot work out how to reference the original location key in order to acheive this result. Any assistance would be gratefully received.

Rob Large
Wildlife Sites Officer
Wiltshire & Swindon Biological Records Centre

2

Re: Quick species report with hierarchy

Hi Rob

I've done a quick hack of the report for you and uploaded the file to http://forums.nbn.org.uk/uploads.php?fi … cation.xml. This version only works from the locations hierarchy but it should show you what needs to be done. I hope it is of some use!

Kind Regards

John van Breda
Biodiverse IT

3

Re: Quick species report with hierarchy

Thanks John

Actually by the time you replied I had found my own workaround, using your xml help file, so that's thanks again. wasn't quite the same as yours, but it seems to work (and I got it to work from the Run... menu item as well)

Seems rather bizarre to me that you can only refer to the %s variable once (in the first select) and also that it is not possible to simply assign its value to a more stable variable, but now I know how to do it I should have no problem in the future.

Rob Large
Wildlife Sites Officer
Wiltshire & Swindon Biological Records Centre

4 (edited by johnvanbreda 28-05-2009 07:38:41)

Re: Quick species report with hierarchy

Hi Rob,
You can assign the %s variable - insert something like the following at the top of the <where> element, before the INSERT:

DECLARE @location_key CHAR(16)
SET @location_key='%s'

Now you should be able to refer to @location_key as much as you need.

Best Wishes

John van Breda
Biodiverse IT

5

Re: Quick species report with hierarchy

Thanks again John,

I thought I had tried that particular combination and it had failed. Maybe there was another flaw in my code somewhere.

Rob Large
Wildlife Sites Officer
Wiltshire & Swindon Biological Records Centre