RFC 3.2 : guided reports improved
(http://wiki.koha.org/doku.php?id=en:development:rfcs3.2:rfc32_guided_reports) 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 undoubtfully usefull ! -- Paul POULAIN http://www.biblibre.com Expert en Logiciels Libres pour l'info-doc NOUVEAU TELEPHONE : 04 91 81 35 08
I love this idea! I've also wondered about the possibility of the system admin creating some "canned" type reports that everyone would see and could "modify with location etc..." then "save them" in their saved reports to run again in the future. For some people even the guided reports they are lost on. I was looking for a way to "push" some templated type reports out to people. Paul POULAIN-2 wrote:
(http://wiki.koha.org/doku.php?id=en:development:rfcs3.2:rfc32_guided_reports)
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 undoubtfully usefull !
-- Paul POULAIN http://www.biblibre.com Expert en Logiciels Libres pour l'info-doc NOUVEAU TELEPHONE : 04 91 81 35 08 _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha.org http://lists.koha.org/mailman/listinfo/koha-devel
-- View this message in context: http://www.nabble.com/RFC-3.2-%3A-guided-reports-improved-tp18832709p1887242... Sent from the Koha - Dev mailing list archive at Nabble.com.
On Thu, Aug 7, 2008 at 10:58 AM, David Schuster <dschust1@tx.rr.com> wrote:
I love this idea! I've also wondered about the possibility of the system admin creating some "canned" type reports that everyone would see and could "modify with location etc..." then "save them" in their saved reports to run again in the future.
For some people even the guided reports they are lost on. I was looking for a way to "push" some templated type reports out to people.
It'd be cool if we could push reports upstream to the community as part of the http://contribs.koha.org site, with a new feature to allow you to find and add reports to your Koha system that others had created and pushed up ... Josh
Paul POULAIN-2 wrote:
(http://wiki.koha.org/doku.php?id=en:development:rfcs3.2:rfc32_guided_reports)
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 undoubtfully usefull !
-- Paul POULAIN http://www.biblibre.com Expert en Logiciels Libres pour l'info-doc NOUVEAU TELEPHONE : 04 91 81 35 08 _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha.org http://lists.koha.org/mailman/listinfo/koha-devel
-- View this message in context: http://www.nabble.com/RFC-3.2-%3A-guided-reports-improved-tp18832709p1887242... Sent from the Koha - Dev mailing list archive at Nabble.com.
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha.org http://lists.koha.org/mailman/listinfo/koha-devel
-- Joshua Ferraro SUPPORT FOR OPEN-SOURCE SOFTWARE CEO migration, training, maintenance, support LibLime Featuring Koha Open-Source ILS jmf@liblime.com |Full Demos at http://liblime.com/koha |1(888)KohaILS
Joshua Ferraro a écrit :
On Thu, Aug 7, 2008 at 10:58 AM, David Schuster <dschust1@tx.rr.com> wrote:
I love this idea! I've also wondered about the possibility of the system admin creating some "canned" type reports that everyone would see and could "modify with location etc..." then "save them" in their saved reports to run again in the future.
For some people even the guided reports they are lost on. I was looking for a way to "push" some templated type reports out to people.
It'd be cool if we could push reports upstream to the community as part of the http://contribs.koha.org site, with a new feature to allow you to find and add reports to your Koha system that others had created and pushed up ...
Josh
Josh++, It also could be part of the SQL files we could propose at install time, imho, click to select a report, with a txt file to describe it, maybe with a sample. -- Henri-Damien LAURENT
Henri-Damien LAURENT a écrit :
It also could be part of the SQL files we could propose at install time, imho, click to select a report, with a txt file to describe it, maybe with a sample.
That one should be pretty easy. we have the structure for this, to populate canned reports as we populate item types, patron categories... -- Paul POULAIN http://www.biblibre.com Expert en Logiciels Libres pour l'info-doc NOUVEAU TELEPHONE : 04 91 81 35 08
I prefer an xml schema that would allow export and import of guided reports with included db revision to test against : <guided_report kohaversion="3.00.107"> <title>Patrons nearing expiry</title> <module>Members</module> <description>Patrons with expiry dates in the next n days</description> <sql>SELECT cardnumber, surname, firstname, branchcode, categories.description, dateexpiry from borrowers LEFT JOIN categories on borrowers.categorycode=categories.categorycode WHERE DATEDIFF( dateexpiry, CURDATE() ) < ???Number of Days??? AND branchcode = ???LIST:branchcode??? ORDER BY categories.description, dateexpiry </sql> </guided_report> Else, we have to figure out a way to run the installer post-installation, not for updatedatabase, but for sql import. This would allow easy ingestion, and emailing or posting of xml docs to contribs. Ryan On Fri, Aug 29, 2008 at 12:29 PM, Paul POULAIN <paul.poulain@free.fr> wrote:
Henri-Damien LAURENT a écrit :
It also could be part of the SQL files we could propose at install time, imho, click to select a report, with a txt file to describe it, maybe with a sample.
That one should be pretty easy. we have the structure for this, to populate canned reports as we populate item types, patron categories...
-- Paul POULAIN http://www.biblibre.com Expert en Logiciels Libres pour l'info-doc NOUVEAU TELEPHONE : 04 91 81 35 08 _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha.org http://lists.koha.org/mailman/listinfo/koha-devel
-- Ryan Higgins LibLime * Open-Source Solutions for Libraries Featuring KohaZOOM ILS 888-564-2457 x704
Ryan Higgins a écrit :
I prefer an xml schema that would allow export and import of guided reports with included db revision to test against :
<guided_report kohaversion="3.00.107"> <title>Patrons nearing expiry</title> <module>Members</module> <description>Patrons with expiry dates in the next n days</description> <sql>SELECT cardnumber, surname, firstname, branchcode, categories.description, dateexpiry from borrowers LEFT JOIN categories on borrowers.categorycode=categories.categorycode WHERE DATEDIFF( dateexpiry, CURDATE() ) < ???Number of Days??? AND branchcode = ???LIST:branchcode??? ORDER BY categories.description, dateexpiry </sql> </guided_report>
Else, we have to figure out a way to run the installer post-installation, not for updatedatabase, but for sql import. This would allow easy ingestion, and emailing or posting of xml docs to contribs.
Ryan
At first, installer was designed to be able to ingest SQL at post-installation. Now it does updatedatabase directly, so this feature has passed away. But anyway, it could be an improvement. XML file could be good, and your kohaversion idea is smart. (I think that you expect kohaversion to be a minimum requirement and not ==). But then it would require a good way to import them into the base. By the way, is that way to note SQL variable a standard that exists. Or is there already one that exists somewhere ? -- Henri-Damien LAURENT
Henri-Damien LAURENT wrote:
<guided_report kohaversion="3.00.107"> <title>Patrons nearing expiry</title> <module>Members</module> <description>Patrons with expiry dates in the next n days</description> <sql>SELECT cardnumber, surname, firstname, branchcode, categories.description, dateexpiry from borrowers LEFT JOIN categories on borrowers.categorycode=categories.categorycode WHERE DATEDIFF( dateexpiry, CURDATE() ) < ???Number of Days???
The above is invalid XML. If a librarian / non-programmer is exposed to this stuff, chaos will quickly ensue. Writing a correct XML application is not for kids. cheers rickw -- ________________________________________________________________ Rick Welykochy || Praxis Services || Internet Driving Instructor Beauty is only skin deep, but ugly goes clean to the bone. -- Dorothy Parker
On Fri, Aug 29, 2008 at 3:18 PM, Rick Welykochy <rick@praxis.com.au> wrote:
Henri-Damien LAURENT wrote:
<guided_report kohaversion="3.00.107"> <title>Patrons nearing expiry</title> <module>Members</module> <description>Patrons with expiry dates in the next n days</description> <sql>SELECT cardnumber, surname, firstname, branchcode, categories.description, dateexpiry from borrowers LEFT JOIN categories on borrowers.categorycode=categories.categorycode WHERE DATEDIFF( dateexpiry, CURDATE() ) < ???Number of Days???
The above is invalid XML. If a librarian / non-programmer is exposed to this stuff, chaos will quickly ensue.
Writing a correct XML application is not for kids.
cheers rickw
OK then. How about YAML? required_version: 3.00.00.107 title: Patrons nearing expiry module: Members description: Patrons with expiry dates in the next n days sql: SELECT cardnumber, surname, firstname, branchcode, categories.description, dateexpiry from borrowers LEFT JOIN categories on borrowers.categorycode=categories.categorycode WHERE DATEDIFF( dateexpiry, CURDATE() ) < ???Number of Days??? AND branchcode = ???LIST:branchcode??? ORDER BY categories.description, dateexpiry (NOTE: the indents on the last lines of the SQL statement are kept together because they are indented) This has the advantage of being easy to understand and write, and YAML is fairly standard (CPAN uses it, among others). --- Jesse Weaver Software Developer, LibLime
Jesse Weaver wrote:
OK then. How about YAML?
Who is going to write this stuff? Application programmers, DBAs, sys admins or librarians? Each different skillset has a different kind of solution. cheers rickw -- ________________________________________________________________ Rick Welykochy || Praxis Services || Internet Driving Instructor Do you realise that in forty years we'll have thousands of old ladies running around with tattoos and rap music will be the golden oldies? -- Maxine
hdl: no, the variables there were just an extension of Paul's original syntax, imagined to be easily parseable. Jesse: YAML sounds good to me, too. The only reason for suggesting xml or xml-ish format is we already use XML::Simple, so have an easy way to parse without additional modules. rickw: obviously it's not valid xml; it was intended as a snippet for the purpose of communicating an idea, not as an implementation of that idea. I did not mean to suggest that librarians would be creating these documents, just downloading them and installing them in their Koha instances. As far as I know, there's no DTD for koha-conf.xml, and it has yet to cause all manner of mayhem and chaos. ( assuming we conveniently forget about the auth_with_ldap problem, which did in fact cause a small bit of mayhem :) ). I would imagine copying-and-pasting raw sql (or sql-plus-koha-parseable-DBI-variable-substitution ) would not cause any less chaos, which is why I thought to suggest an alternative. What I am imagining is that I, as a librarian, or ILS admin, might find a guided report that looks useful when I look at contribs.koha.org, and then download the *.xml file to my desktop, upload it into my Koha instance, and run it, with options meaningful to my local installation. cheers, Ryan On Fri, Aug 29, 2008 at 5:41 PM, Rick Welykochy <rick@praxis.com.au> wrote:
Jesse Weaver wrote:
OK then. How about YAML?
Who is going to write this stuff? Application programmers, DBAs, sys admins or librarians?
Each different skillset has a different kind of solution.
cheers rickw
-- ________________________________________________________________ Rick Welykochy || Praxis Services || Internet Driving Instructor
Do you realise that in forty years we'll have thousands of old ladies running around with tattoos and rap music will be the golden oldies? -- Maxine
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha.org http://lists.koha.org/mailman/listinfo/koha-devel
-- Ryan Higgins LibLime * Open-Source Solutions for Libraries Featuring KohaZOOM ILS 888-564-2457 x704
participants (7)
-
David Schuster -
Henri-Damien LAURENT -
Jesse Weaver -
Joshua Ferraro -
Paul POULAIN -
Rick Welykochy -
Ryan Higgins