Sub-SubReports?

36 views
Skip to first unread message

Aaron C. de Bruyn

unread,
Oct 29, 2011, 2:12:36 PM10/29/11
to geraldo-users
Geraldo rocks! Thank you devs.

I'm using it in a Django app and I'm wondering how to access related
data that's a few levels down.

The report I am generating gets a list of 'families'. Each family
object has multiple people in it.
I am able to access the data on each person using a sub report like
so:

subreports = [
SubReport(
queryset_string = '%(object)s.person_set.all()',
band_detail = ReportBand(
height=0.5*cm,
elements=[
ObjectValue(attribute_name='first_name', top=0,
left=1*cm),
ObjectValue(attribute_name='gender', top=0,
left=5*cm),
ObjectValue(attribute_name='birth_date', top=0,
left=10*cm),
ObjectValue(attribute_name='age', top=0,
left=15*cm),
]
),
),
]

But each person object has related metadata objects. A metadata
object stores a name and a value--so it's possible to create 'shoe
size' and '12' for a person.

Is it possible to attach a SubReport to another SubReport so I can
drill down? I've tried adding one to the elements parameter but
nothing happens.

Thank you for your time,

-A
Reply all
Reply to author
Forward
0 new messages