[reportlab-users] Status of ticket 783
Yoann Roman
yroman-reportlab at altalang.com
Tue Apr 13 13:39:38 EDT 2010
>> Taking a look at the issue tracker here:
>> https://admin.reportlab.com/mantis/project/core/tracker/
>>
>> I see that the patch submitted back in October '08 hasn't been accepted:
>> http://two.pairlist.net/pipermail/reportlab-users/2008-October/007553.html
>>
>> Is there any testing I can do to get this incorporated? I
>> successfully ran the full test suite several times with this patch
>> incorporated, and we've been running ReportLab (~100 to ~200 PDFs a
>> day) for about 1.5 years with it as well. Not sure if that helps...
>>
> Well perhaps you can put forward a use case for having action
> flowables inside containers. I think the original intention for
> avoiding them in flowable groups was to avoid the situations where
> the actions voided the intentions of the group. That may have been
> true at the point when that coding was done, but perhaps new classes
> have been created which do have valid usages.
Sure. Here's the basic gist of what we're doing:
We use variable-height headers and footers on our reports. To handle
these, I created a PageContainer class (a twist on RL's PTOContainer)
that inherits from _Container.
All of our footers also have "Page x of y". Instead of setting up fixed-
width form elements for the page numbers, I use IndexingFlowables and
multiBuild to create these footers. To pass notifications down inside
a container's flowables, I use a custom IndexingContainer, and
PageContainer subclasses that.
A single report can also be subgrouped. For example, with a report of
car models, you could subgroup it by make. In that case, we want our
footer page numbers to reflect the group (i.e., the first model for
each make would be page 1). To notify the footers of the start of a
group, I use an ActionFlowable in front of a group's flowables that
sends out a "Group" notification.
Without ActionFlowable support in _Container, however, these get
skipped over.
Does this make sense?
> I think the original intent was to prevent naive users from doing
> strange things and shooting themselves in the foot.
>
> Perhaps we should actually adopt more of "we're all adults" policy
> and let the foot shooting go through.
I'd say there are plenty of other ways to shoot yourself in the foot,
such as adding *way* too many non-splitable flowables to a frame :-).
--
Yoann Roman
More information about the reportlab-users
mailing list