Hi Chris
First and foremost, output is determined by the report that is being run on the warehouse. This determines the columns being retrieved from the database and the parameters it supports. You can see this at https://code.google.com/p/indicia/sourc … e_list.xml
To show the last 'n' records you need to introduce a 'limit' clause in to the query. As far as I can see, this is not possible in this case as it is overriden by the pager code. I don't seem to be able to turn the pagers off. There might be a lingering bug if this is a use-case that has not been tested till now.
To show dates for the last n days needs a 'where' clause in the query. The report does not contain a date parameter but we might be able to supply one. The report_grid function can take a filters parameter which you could provide in the Form Structure.
Theoretically, I thought
@filters={"date_start":"2015-02-04"}
would select records from that one date or
@filters={"date_start":["2015-02-04","2015-02-05","2015-02-06"]}
would select from all those dates. I haven't got this to work in the course of trying to give you an answer here but this is an option I have never tried before so I might be doing it wrong. As for a date which is of the form "date > now - offset", I think that is beyond what we can do through the Form Structure. Writing a custom report would be a solution.
Regarding the species name, you can see from the report that it is returned by the query snippet
CASE WHEN o.preferred_taxon=o.default_common_name then o.preferred_taxon ELSE o.preferred_taxon || COALESCE(' | ' || o.default_common_name, '') END
I.e if the preferred name is the same as the common name then you just get that; if there is no common name you just get the preferred name; if there is a preferred name and a common name then you get both.
Since this is your starting point, there are no built in options I can think of in the client code to manipulate this. Again a custom report would get you what you want. Alternatively, there could be another report in the library which is better suited to your needs.
The warehouse just provides the data needed and it is formatted by the code in the client_helpers library on your server, notably in the functions of the report_helper file.
Sorry this does not really include any easy answers. The way forward may depend on just what you want to achieve. You could
- go back to the simpler Report Grid form, perhaps with the library/occurrences/occurrences_list.xml report which incudes a common name column and date parameters.
- try to use a new filtering feature which is mentioned in passing at http://indicia-docs.readthedocs.org/en/ … orts.html.
- create a custom report.
I'm going to have to leave it at that as I had so much else planned to do today.
Jim Bacon.