We’ve been evaluating Gibbon and one point that came up was the ability to do a mail merge for sending letters home for overdue books. Thankfully there is Query Builder. I built the SQL query below to get the information we need.
select binfo.id as BookID, binfo.name as BookName, binfo.producer as BookAuthoer
, binfo.returnExpected as DueDate
, pinfo.firstname as FirstName, pinfo.surname as LastName, pinfo.email as Email
, finfo.homeAddress as HomeAddress, finfo.homeAddressDistrict as CityStateZip
, ainfo.firstname as ParentFirst, ainfo.surname as ParentLast, ainfo.email as ParentEmail
from gibbonLibraryItem as binfo
inner join gibbonPerson as pinfo on binfo.gibbonPersonIDStatusResponsible = pinfo.gibbonPersonID
inner join gibbonFamilyChild as fc on pinfo.gibbonPersonID = fc.gibbonPersonID
inner join gibbonFamilyAdult as fa on fc.gibbonFamilyID = fa.gibbonFamilyID and fa.contactPriority = 1
inner join gibbonFamily as finfo on fa.gibbonFamilyID = finfo.gibbonFamilyID
inner join gibbonPerson as ainfo on fa.gibbonPersonID = ainfo.gibbonPersonID
where binfo.status = ‘On Loan’ and binfo.returnExpected < now()`
I hope this is helpful to others and Query Builder lets you customize it quite easily.