1

Topic: Reporting questions

Hi,
I’ve been experimenting with the reporting options in Indicia. The guy I’ve developed the squirrel site for wants
•    to be able to select records by date range e.g. modern records only (we have added all our historical records from our database so have records back to 1976)
•    to be able to select a dot on the map and see the record details

so… I’m thinking the Map Explorer would be the best way to achieve all these things except I am pretty sure it can’t in its present form.

I’m using the explore_list.xml report and this doesn’t have the option to include date parameters as far as I can see but the other report I experimented with – occurrences_download_2.xml didn’t seem to work properly for the Map Explorer. In particular I can’t get the occurrences_download_2.xml report to run automatically when I set explicit dates using the default parameters and can’t figure out why. This applies when I use it in the Map Explorer and the Report Grid. The date picker also wouldn’t work.

I’d also like to include the record_comment in the report and I’d like to display the records as different coloured dots on the map depending on the species (since I only have 2 species).

I’m happy to experiment with putting together a report to suit what I need but I’d like to know I’m on the right track before doing this. I undoubtedly will have questions if I do try this.

Can you let me know if I’m on the right track – I would be looking at using the explore_list.xml report but altering it to try and incorporate some of the features from occurrence_download_2.xml. 

Fiona

Fiona McCrory
CEDaR Website Officer
www.nmni.com/cedar

2

Re: Reporting questions

Hi Fiona,

I thought I better start a reply to you although I am not really familiar with either the Map Explorer form or the explore_list and occurrence_download_2 reports. As a preamble I should point out that certain forms will require reports that return certain fields in order for them to work.

First we can look at the reports explore_list and occurrence_download_2. The report file format is explained in the documentation.

Now, if I try creating a Map Explorer form, underneath the report form selection, there are details of requirements which occurrence_download_2 report appears to meet (e.g. having a belongs_to_user and certainty column).

You can also see the lines

<param name='date_from' display='Date From' datatype='date' description="Filter by record added or updated date" />
<param name='date_to' display='Date To' datatype='date' description="Filter by record added or updated date" />

in occurrence_download_2 which allows selection of the date and

<column name='record_comment' display='Comment' sql="o.comment" datatype="text" />

which returns the comment.

Now, when I try to use the explore_list report I get no records returned because of the #agreements join# which inserts

JOIN index_websites_website_agreements iwwa ON iwwa.to_website_id=o.website_id and iwwa.receive_for_reporting=true AND iwwa.from_website_id in (5)

in to the query.

Here we reach the limit of my knowledge. If this were a left outer join it would return me my records but because it is an inner join and I have no agreements I am left with nothing. I hit exactly the same problem in a different place in a different context yesterday. Unfortunately I don't have an insight in to the design to know whether this is intended behaviour.

Looking in to the database on warehouse1 I see that you have an 'agreement with yourself' while that doesn't exist for me on the development server that I use. I suspect that is a problem on my side which needs fixing before I can go further.

So that hasn't been very helpful, has it. If you want to know what on earth a website agreement is then see this documentation.

Jim Bacon

3

Re: Reporting questions

Hi Fiona.

Back again having fixed my database. I can now run the Map Explorer form with the explore_list report and when I use the occurrence_download_2 report I can make it work provided that I supply ALL the missing parameters. I can do this in the settings for 'Default parameter values' using the following

date_from=1900-01-01
date_to=2100-01-01
quality=!R
surveys=4

You will need to substitute your own survey id.

Like you, I find the date picker is not working but I'm not going to worry about that right now because I am not sure if this is the form you want to use anyway. While it includes a geographical filter that allows you to draw a boundary and see the details of the record within the boundary, it is the Report Map form which offers the prospect of clicking a record and seeing details pop up somewhere. This might be a preferable user interface for you. See the Report Map documentation although it doesn't appear to mention the pop up options. The Report Map also provides options for obtaining the maps via GeoServer and this is probably the route you would want to go for showing different species in different colours.

Unfortunately this is all a bit difficult for you to work on as you do not have access to the warehouse to allow you to either add reports or modify GeoServer. I can help with that but it may be one small step at a time.

Jim Bacon

4

Re: Reporting questions

Many thanks Jim, I will take a look at the Report Map option and see if it fits the bill. I've just learnt (via John) how to make a sub-theme so am going to investigate that first before returning to reporting.

I'll let you know how I get on and if I need to modify a report.

Cheers,
Fiona

Fiona McCrory
CEDaR Website Officer
www.nmni.com/cedar