Guided reports RFC
From Koha Wiki
Home > Koha Versions > 3.2
Koha > Technical > Development > RFCs > Koha components for RFCs > Library System Modules RFCs > System Administration RFCs > Reports RFCs
Koha > Technical > Development > RFCs > Koha version targeted RFCs > Koha 3.2 RFCs
Guided reports runtime parameters
Guided reports are great. However, they are fully hardcoded SQL atm. There's no possibilities to have parameters that are fixed at run time. That would be usefull, for example, when you want to build a report that runs between a date range, or on a given branch or itemtype.
for example, a tool to let a given branch see what they added in the catalogue could be : SELECT biblio,author FROM biblio LEFT JOIN items USING(biblionumber) WHERE items.homebranch=XXX
This RFC suggest to add some improvements to be able to specify XXX at runtime.
- A simple solution could be to have a specific syntax to say "enter value here". For example : ???
- A better sotution could be to have the syntax + a label to display to the patron. For example : ???Enter branch code??? that would display "Enter branch code : _______" in the <form>
- The best solution would be to have a list where applicable (branch, itemtype...).
The 2 first are easy to code, the 3rd could be tricky.
But undoubtedly useful!
- cases where the clause is undesired, i.e. where the user wants something like branchcode "*".
- cases where desired match IS NULL.
- cases where desired match IS empty string.
- translation of prompt text.
- truncation of match string, i.e. where the user wants 'branchcode LIKE "WEST%"'.
- cases where report author wants to restrict values entered to a given type (say, integer), range (say 0-25) or bound (0-infinity).
- negation of any of the above cases, i.e. "branchcode IS NOT NULL" or "branchcode != 'MAIN'".
- date validation.
Obviously this feature could get very complex, so it will be best to spell out exactly what aspects are being implemented in the first run.