[Koha] Help with report, please!
Liz Rea
lrea at nekls.org
Fri Apr 15 03:46:42 NZST 2011
> I found Nicole's report in the SQL library for "Patrons with fines".
>
> I modified it to allow our libraries to choose their "branch".
>
> But it doesn't seem to run.
>
> Can someone show me where the problem is, please?
>
> Kathy
> -----------------------------------
>
> SELECT
> borrowers.cardnumber,
> borrowers.surname,
> borrowers.firstname,
> FORMAT(SUM(accountlines.amountoutstanding),2) AS due
> FROM
> borrowers
> LEFT JOIN
> accountlines
> ON
> (borrowers.borrowernumber=accountlines.borrowernumber)
> WHERE
> accountlines.amountoutstanding > 0 AND borrowers.branchcode='__BRANCHCODE__'
> GROUP BY borrowers.cardnumber
> ORDER BY borrowers.surname ASC
> Kathleen D. Rippel
> Dept. Head/Consultant--Resource Sharing and Access ;
> Pathfinder Central (Manager)
> Central Kansas Library System
> 1409 Williams
> Great Bend, KS 67530
>
> (620-792-4865) phone
> (800-362-2642) toll-free, KS
> (620-792-5495) fax
>
> kdr at ckls.org
> ********************************************************************************************
> I'm currently reading: This fatal writ, by Sara Woods.
> I'm currently listening to: The passage, by Justin Cronin.
>
> _______________________________________________
> Koha mailing list http://koha-community.org
> Koha at lists.katipo.co.nz
> http://lists.katipo.co.nz/mailman/listinfo/koha
In 3.2 the parameters are defined like this:
<<Select your branch|branches>>
So instead of: '__BRANCHCODE__'
Use the <<Select your branch|branches>> and it should work. :)
The complete how-to is in the manual: http://koha-community.org/documentation/3-2-manual/?ch=x15127#runtimefaq
Liz Rea
NEKLS
SELECT
borrowers.cardnumber,
borrowers.surname,
borrowers.firstname,
FORMAT(SUM(accountlines.amountoutstanding),2) AS due
FROM
borrowers
LEFT JOIN
accountlines
ON
(borrowers.borrowernumber=accountlines.borrowernumber)
WHERE
accountlines.amountoutstanding > 0 AND borrowers.branchcode=<<Select your branch|branches>>
GROUP BY borrowers.cardnumber
ORDER BY borrowers.surname ASC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.katipo.co.nz/pipermail/koha/attachments/20110414/8fd6c780/attachment.htm
More information about the Koha
mailing list