Re: Filtering reports on a calculated field
I don't know if this is even possible, but it would be really useful if it were.
I am trying to produce a report which excludes taxon occurrences where the sample spatial ref is a 10km square (i.e. Len(SAMPLE.SPATIAL_REF)=4).
Using the notes on the Wiki I have succeded in adding records to the REPORT_ATTRIBUTE and REPORT_FIELD tables, reusing an existing record in REPORT_JOIN. So I can produce a report with a field called Sample Spatial Ref Length.
However, when I tried to modify the USEABLE_FIELD table (as I have successfully with another such attribute), I can make my new attribute appear in the additional filters list and I can set the filter to only allow records where the field is >4. Unfortunately when I run the report it causes an exception.
Inspecting the error message, I find that at the end of the WHERE clause the following (SAMPLE.[Sample Spatial Ref Length] > 4). Of course the new calculated field is not within the sample table, so this is why it fails (it will be within #REPORT_OUTPUT, but I can't work out how to make the query work.
So two questions:
1. is it possible to persuade recorder to filter on a calculated attribute
2. is there any chance I could see the promised instructions on adding items to USEABLE_FIELD and USEABLE_TABLE.
Thanks in anticipation
Wildlife Sites Officer
Wiltshire & Swindon Biological Records Centre