My thoughts on:

A. I think we can inherit web2py HELPERS to do specialized PDF
reporting HELPERS.
Thus, it would be an increase and not a modification and would be more
clear what to use
for reporting.

B. Totally agree! I think due to PyFPDF limitations a genric view can
´t be sucessfull yeat.
C. Totally agree! I´ve put this on models for easy of use only!

Let´s improve!



On Sep 27, 11:43 pm, Mariano Reingart <[email protected]> wrote:
> Great!
>
> I agree with your thoughts:
>
> A. Setting width attributes in SQLTABLE is not a nice hack, having a
> easier way would enable one-liners reports!
> Anyway, html renderer (using python HTMLParser) is complex and
> limited, maybe using web2py HTML helpers directly(not serialized)
> would be a better, simpler and more robust approach (leaving width
> unnecesary), but this is a major redesign.
>
> B. PDF views would be great to separe presentation logic, but seems
> views cannot be binary (and detecting the request extension in not so
> clean either). There is a generic.pdf view that can be tested, but is
> seems not working because some extra prints added by web2py templating
> engine and/or some IO alteration/escaping.
>
> C. I think report classes (defining header and footer) should be in
> modules to gain some performance. Also, there should be a simple
> layout report class (header=report title, footer=report page), so we
> can encapsulate common code, and later add that on pyfpdf packages or
> maybe in web2py tools.
>
> If there is some concensus, we can make some patchs and try this alternatives.
>
> Best regards,
>
> Mariano Reingarthttp://www.sistemasagiles.com.arhttp://reingart.blogspot.com
>
> On Mon, Sep 27, 2010 at 10:44 PM, yamandu <[email protected]> wrote:
> > Hi, I wrote a simple report the generates a PDF version using PyFPDF
> > that comes now with web2py.
>
> > I´ts here:http://web2pyslices.com/main/slices/take_slice/99
>
> > My goal is share and start a discussion to get this type of code
> > better.
> > So, please, test it and comment!
>
>

Reply via email to