<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><br class="Apple-interchange-newline"><blockquote type="cite"><div>I found Nicole's report in the SQL library for "Patrons with fines".<br><br>I modified it to allow our libraries to choose their "branch".<br><br>But it doesn't seem to run.<br><br>Can someone show me where the problem is, please?<br><br>Kathy<br>-----------------------------------<br><br>SELECT<br> borrowers.cardnumber,<br> borrowers.surname,<br> borrowers.firstname,<br> FORMAT(SUM(accountlines.amountoutstanding),2) AS due<br>FROM<br> borrowers<br>LEFT JOIN<br> accountlines<br>ON<br> (borrowers.borrowernumber=accountlines.borrowernumber)<br>WHERE<br> accountlines.amountoutstanding > 0 AND borrowers.branchcode='__BRANCHCODE__'<br>GROUP BY borrowers.cardnumber<br>ORDER BY borrowers.surname ASC<br>Kathleen D. Rippel<br>Dept. Head/Consultant--Resource Sharing and Access ;<br>Pathfinder Central (Manager)<br>Central Kansas Library System<br>1409 Williams<br>Great Bend, KS 67530<br><br>(620-792-4865) phone<br>(800-362-2642) toll-free, KS<br>(620-792-5495) fax<br><br><a href="mailto:kdr@ckls.org">kdr@ckls.org</a><br>********************************************************************************************<br>I'm currently reading: This fatal writ, by Sara Woods.<br>I'm currently listening to: The passage, by Justin Cronin. <br><br>_______________________________________________<br>Koha mailing list <a href="http://koha-community.org">http://koha-community.org</a><br><a href="mailto:Koha@lists.katipo.co.nz">Koha@lists.katipo.co.nz</a><br>http://lists.katipo.co.nz/mailman/listinfo/koha<br></div></blockquote><br>In 3.2 the parameters are defined like this:</div><div><br></div><div><<Select your branch|branches>></div><div><br></div><div>So instead of: '__BRANCHCODE__'</div><div><br></div><div>Use the <<Select your branch|branches>> and it should work. :)</div><div><br></div><div>The complete how-to is in the manual: <a href="http://koha-community.org/documentation/3-2-manual/?ch=x15127#runtimefaq">http://koha-community.org/documentation/3-2-manual/?ch=x15127#runtimefaq</a></div><div><br></div><div>Liz Rea</div><div>NEKLS</div><div><br></div><div><br></div><div><br></div><div>SELECT<br> borrowers.cardnumber,<br> borrowers.surname,<br> borrowers.firstname,<br> FORMAT(SUM(accountlines.amountoutstanding),2) AS due<br>FROM<br> borrowers<br>LEFT JOIN<br> accountlines<br>ON<br> (borrowers.borrowernumber=accountlines.borrowernumber)<br>WHERE<br> accountlines.amountoutstanding > 0 AND borrowers.branchcode=<<Select your branch|branches>><br>GROUP BY borrowers.cardnumber<br>ORDER BY borrowers.surname ASC</div><br></body></html>