heys
never tried this but it has to work. or it may give you some ideas.
create a routine in your report class that will add sub bands with your indent argument.
suppose u have
class MasterReport(Report)
---define a function in it like this
def add_band_detail(self,YOUR_INDENT)
subz = []
sub_treeband = SubReport(
#qset if needed_
queryset_def = your_model.objects.filter(),
band_detail = ReportBand(
auto_expand_height = True,
elements=[
ObjectValue(attribute_name='description', top=0, left=YOUR_INDENT_ARG+0.2*cm,width=BAND_WIDTH,get_value=lambda instance: '• ' + u"%s" % instance.description,style={'fontSize': 9,'alignment': TA_LEFT}),
],
),
)
subz.append(sub_treeband)
return subz
then in views.py
report = MasterReport(queryset=model_)
--> put here ur recursive code that will query your nested data and call
report.subreports=report.add_band_detail(YOUR_INDENT_ARG)
well this obviously will not work on first try but i'd try some way like this and i hope u understand the idea. i dont have django installed on this pc at the moment. so i cant check if my objects statements are correct.
musa.