Kari,

I've been working with ReportLab for several years now and I agree
that the learning curve is somewhat daunting, but when you get to
the top you will find that you can produce gorgeous output and the
applications run very quickly.  Nothing is going to be easier for
users to work with than .PDF reports.  The OOP design of ReportLab
is a double-edged sword.  It is sometimes hard to follow at first,
but later you find the design to be quite elegant and easy to
build upon.  By using ReportLab/ReportLab Graphics and pageCatcher
you can produce any report you can imagine.  It is MUCH more
portable that COM (which depends on Windows webserver) and I believe
would also be much faster.  We are just completing a project that
produces all the output in .PDF format including background forms
merging of SQL data, inclusion of fax/scanned attachment pages,
etc.  I can't imagine solving the problem any other way.

Hope the information helps some.

Regards,
Larry Bates
Syscon, Inc.


Message: 2
From: =?iso-8859-1?Q?K=E1ri_Har=F0arson?= <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Formatting reports with Python
Date: Fri, 18 Oct 2002 10:53:37 -0000

Hello all,

I would like to get some opinionated opinions from you
on a design decision I have to make.

The system we write and sell is written in Python, and now we
need reports on paper.  Until now, all reports have been made
available from a website, but users complain that they don't look
good enough and have unnecessary page feeds.

We have been mulling over the methods available from Python:

1)  Produce HTML but try to format it for a printer, not screen.
Pagination will always be a problem, but this is the quickest way
to do it.

2)  Use the PDF format and learn how to use ReportLab.  I must confess
that the online tutorial seems daunting.  In any case, the reader will
have to install Adobe Acrobat Reader to have a look at the document, and
not all employees at our clients have one installed.  I do like this
method the best right now.

3)  Learn how to use the RTF format.  At least every user can open and
print such a document from Wordpad if nothing else.  Downside is, noone
has an RTF based report generator for Python unless I'm mistaken ?  Writing
in raw RTF doesn't sound fun.

4)  Generate a Word Document by running Word via COM on the webserver
where our system is running.  This might crash the webserver and is probably
slow ?

If someone has experience with one of the above methods or knows about
yet another way to do this, I'd love to hear about it !

Best regards,

        Kari Hardarson, Iceland

--__--__--

Message: 3
Date: Fri, 18 Oct 2002 03:58:28 -0700 (PDT)
From: Jeremy Dillworth <[EMAIL PROTECTED]>
Subject: Re: Formatting reports with Python
To: [EMAIL PROTECTED]

I have some experience with option 1.  I definitely cannot recommend
it.

Number 2 sounds best.  You may want to have a look at Zope... don't
know what they are using to do it (maybe ReportLab), but I remember
seeing among its list of features that it could dynamically-generate
PDF's.

hope this helps...

Barring all-else, maybe you could use the python perl module... I'm
sure Perl has a number of PDF libraries.

>
> 1)  Produce HTML but try to format it for a printer, not screen.
> Pagination will always be a problem, but this is the quickest way
> to do it.
>
> 2)  Use the PDF format and learn how to use ReportLab.  I must
> confess
> that the online tutorial seems daunting.  In any case, the reader
> will
> have to install Adobe Acrobat Reader to have a look at the document,
> and
> not all employees at our clients have one installed.  I do like this
> method the best right now.
>
> 3)  Learn how to use the RTF format.  At least every user can open
> and
> print such a document from Wordpad if nothing else.  Downside is,
> noone
> has an RTF based report generator for Python unless I'm mistaken ?
> Writing
> in raw RTF doesn't sound fun.
>
> 4)  Generate a Word Document by running Word via COM on the webserver
> where our system is running.  This might crash the webserver and is
> probably
> slow ?
>
> If someone has experience with one of the above methods or knows
> about
> yet another way to do this, I'd love to hear about it !
>
> Best regards,
>
>       Kari Hardarson, Iceland
> _______________________________________________
> ActivePython mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> Other options:
> http://listserv.ActiveState.com/mailman/listinfo/ActivePython
>


=====


__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

--__--__--

Message: 4
Date: Fri, 18 Oct 2002 07:34:11 -0400 (EDT)
From: Bob Kline <[EMAIL PROTECTED]>
To: =?iso-8859-1?Q?K=E1ri_Har=F0arson?= <[EMAIL PROTECTED]>
cc: <[EMAIL PROTECTED]>
Subject: Re: Formatting reports with Python

On Fri, 18 Oct 2002, Kįri Haršarson wrote:

> Hello all,
>
> I would like to get some opinionated opinions from you
> on a design decision I have to make.
>
> The system we write and sell is written in Python, and now we need
> reports on paper.  Until now, all reports have been made available
> from a website, but users complain that they don't look good enough
> and have unnecessary page feeds.

We had a similar requirement for a system I'm working on.  We settled on
generating LaTeX from our Python reporting scripts.  That gives us
PostScript or PDF, from which we get beautifully printed reports.
Easier than generating RTF (one of the options we also considered) and
more portable.  We can send the output directly to a PostScript aware
printer (as opposed to relying on having to drive a proprietary engine
to print the RTF).

--
Bob Kline
mailto:bkline@;rksystems.com
http://www.rksystems.com


--__--__--

Message: 5
From: Henning von Bargen <[EMAIL PROTECTED]>
To: "'[EMAIL PROTECTED]'"
<[EMAIL PROTECTED]>
Subject: RE: Formatting reports with Python
Date: Fri, 18 Oct 2002 13:27:40 +0200

A very interesting topic. I am in the same position.

> -----Urspr=FCngliche Nachricht-----
> Von:  K=E1ri Har=F0arson [SMTP:[EMAIL PROTECTED]]
> Gesendet am:  Freitag, 18. Oktober 2002 12:54
> An:   [EMAIL PROTECTED]
> Betreff:      Formatting reports with Python
>=20
> Hello all,
>=20
> I would like to get some opinionated opinions from you
> on a design decision I have to make.
>=20
> The system we write and sell is written in Python, and now we
> need reports on paper.  Until now, all reports have been made
> available from a website, but users complain that they don't look
> good enough and have unnecessary page feeds.
>=20
> We have been mulling over the methods available from Python:
>=20
> 1)  Produce HTML but try to format it for a printer, not screen.
> Pagination will always be a problem, but this is the quickest way
> to do it.

HTML 4 supports all that, but MSIE and Netscape don't support HTML 4...
What you could also try is to generate RML (see ReportLab.com),
it is similarly to XHTML and a commercial tool from ReportLab can
generate PDF from it using the reportlab library.

>=20
> 2)  Use the PDF format and learn how to use ReportLab.  I must =
confess
> that the online tutorial seems daunting.  In any case, the reader =
will
> have to install Adobe Acrobat Reader to have a look at the document, =
and
> not all employees at our clients have one installed.  I do like this
> method the best right now.

Depending on what you need, it is quite straight-forward with ReportLab
and the platypus package.
However, if you produce reports from database data, then you probably
need table layouts a lot, and this is a bit tricky for long tables.

>=20
> 3)  Learn how to use the RTF format.  At least every user can open =
and
> print such a document from Wordpad if nothing else.  Downside is, =
noone
> has an RTF based report generator for Python unless I'm mistaken ?
Writing
> in raw RTF doesn't sound fun.

I have used this method (generating raw RTF) for a demo (not in =
Python). It
works fine.
Formatting using format templates ("Formatvorlagen" in German) is a bit
tricky with RTF.
You'll need a to write a library which does most of the routine tasks.
Once you have such a library, it will be quite easy, but AFAIK there =
isn't
yet such a library.

>=20
> 4)  Generate a Word Document by running Word via COM on the webserver
> where our system is running.  This might crash the webserver and is
probably
> slow ?

I have tried generating Word documents with Python. It works basically,
but it is quite slow and I don't trust enough in =
Word-via-COM-stability.

>=20
> If someone has experience with one of the above methods or knows =
about
> yet another way to do this, I'd love to hear about it !
>=20
> Best regards,
>=20
>       Kari Hardarson, Iceland
> _______________________________________________
> ActivePython mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> Other options:
http://listserv.ActiveState.com/mailman/listinfo/ActivePython

--__--__--

Message: 6
From: Henning von Bargen <[EMAIL PROTECTED]>
To: "'[EMAIL PROTECTED]'"
<[EMAIL PROTECTED]>
Subject: RE: Formatting reports with Python
Date: Fri, 18 Oct 2002 13:41:32 +0200

One question you have to consider is:

Do you need a "document" which your user can edit
or do you need a "page-layout" which can be viewed and printed, but not
edited.

If you generate a MSWord document, HMTL, or RTF,
then your user can for example insert or delete paragraphs, table-rows =
etc.
The user himself and his Word processort are responsible=20
for having a nice page-layout (page-breaks etc) then.
If he doesn't like the page breaks, he could insert a manual page-break
where he likes.

On the other hand, if you generate PDF or PostScript,
the user can not modify the document as described above.
He can only view or print it, but this is very easy.

LaTeX is somewhere in the middle.
A scientist or power-user may have LaTeX installed and could modify the
generated LaTeX source
if he needs, then generate PDF or PostScript from the modified source.

A normal user probably has not installed LaTeX, he can only view and =
print
the generated PDF vith Acrobat Reader.

So it could be a good choice if you offer all three versions for =
download
(LaTex source, PDF, PostScript)
(your application still only needs to generate the LaTeX source).

Henning

> -----Urspr=FCngliche Nachricht-----
> Von:  Bob Kline [SMTP:[EMAIL PROTECTED]]
> Gesendet am:  Freitag, 18. Oktober 2002 13:34
> An:   K=E1ri Har=F0arson
> Cc:   [EMAIL PROTECTED]
> Betreff:      Re: Formatting reports with Python
>=20
> On Fri, 18 Oct 2002, K=E1ri Har=F0arson wrote:
>=20
> > Hello all,
> >
> > I would like to get some opinionated opinions from you
> > on a design decision I have to make.
> >
> > The system we write and sell is written in Python, and now we need
> > reports on paper.  Until now, all reports have been made available
> > from a website, but users complain that they don't look good enough
> > and have unnecessary page feeds.
>=20
> We had a similar requirement for a system I'm working on.  We settled =
on
> generating LaTeX from our Python reporting scripts.  That gives us
> PostScript or PDF, from which we get beautifully printed reports.
> Easier than generating RTF (one of the options we also considered) =
and
> more portable.  We can send the output directly to a PostScript aware
> printer (as opposed to relying on having to drive a proprietary =
engine
> to print the RTF).
>=20
> --=20
> Bob Kline
> mailto:bkline@;rksystems.com
> http://www.rksystems.com
>=20
> _______________________________________________
> ActivePython mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> Other options:
http://listserv.ActiveState.com/mailman/listinfo/ActivePython

--__--__--

Message: 7
From: "Gareth Evans" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: Authorization header in a http request
Date: Fri, 18 Oct 2002 13:19:21 +0100

bit of a no brainer.
I'm trying to write a script to bulk put and get files from a Zope server
using webdav protocol via davlib.py
I'm trying to get a file and I need to add the authority header

def test():
    a=davlib.DAV(HOST,PORT)
    a.setauth(USERNAME,PASSWORD)

responce=a.get(BASE+"/voyager/add_alerts_to_alert_db",{"Authorization":(USER
NAME,PASSWORD)})
    lines= responce.read()
    results=open("results.html","w")
    results.writelines(lines)
    results.close()

when I check my results I get

Error Type: Unauthorized
Error Value: You are not authorized to access this resource.
Username and password are not correct.
so obviously the syntax of the Authorization value in the dictionary is
wrong although I believe the key is correct.
can anyone tell me the correct syntax or what I'm doing wrong.
Cheers Gareth


--__--__--

Message: 8
From: "Gareth Evans" <[EMAIL PROTECTED]>
To: "Activepython \(E-mail\)" <[EMAIL PROTECTED]>
Subject: RE: Authorization header in a http request
Date: Fri, 18 Oct 2002 14:34:52 +0100

have sorted it out. works fine.


def test():
    a=davlib.DAV(HOST,PORT)
    a.setauth(USERNAME,PASSWORD)
    encodedUSERPASS=base64.encodestring(USERNAME+":"+PASSWORD)

responce=a.get(BASE+"/voyager/add_alerts_to_alert_db",{"Authorization":"Basi
c %s"%encodedUSERPASS})
    lines= responce.read()
    results=open("results.html","w")
    results.writelines(lines)
    results.close()

test()

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:activepython-admin@;listserv.ActiveState.com]On Behalf Of Gareth
Evans
Sent: 18 October 2002 13:19
To: [EMAIL PROTECTED]
Subject: Authorization header in a http request


bit of a no brainer.
I'm trying to write a script to bulk put and get files from a Zope server
using webdav protocol via davlib.py
I'm trying to get a file and I need to add the authority header

def test():
    a=davlib.DAV(HOST,PORT)
    a.setauth(USERNAME,PASSWORD)

responce=a.get(BASE+"/voyager/add_alerts_to_alert_db",{"Authorization":(USER
NAME,PASSWORD)})
    lines= responce.read()
    results=open("results.html","w")
    results.writelines(lines)
    results.close()

when I check my results I get

Error Type: Unauthorized
Error Value: You are not authorized to access this resource.
Username and password are not correct.
so obviously the syntax of the Authorization value in the dictionary is
wrong although I believe the key is correct.
can anyone tell me the correct syntax or what I'm doing wrong.
Cheers Gareth

_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/ActivePython



--__--__--

Message: 9
From: Stefan Kuzminski <[EMAIL PROTECTED]>
To: "'Paul Casteels'" <[EMAIL PROTECTED]>,
  [EMAIL PROTECTED]
Cc: Masaru Shimasaki <[EMAIL PROTECTED]>
Subject: RE: Excel ranges
Date: Fri, 18 Oct 2002 09:14:13 -0700

I have been trying to get around the same problem.  Horizontal ranges work

sheet.Range( "A1:J10" ).Value = [1,2,3,4,5,6,7,8,9,10]

but tring the range "A1:A10" sets all the values to 1 and the per cell
method Cells().Value is too slow.


S

-----Original Message-----
From: Paul Casteels [mailto:Paul.Casteels@;ua.ac.be]
Sent: Thursday, October 17, 2002 11:49 PM
To: [EMAIL PROTECTED]
Subject: Excel ranges



I want to copy an array (size 2*8192) to an Excel range.
This works fine :

  xlApp = Dispatch("Excel.Application")
  xlApp.Workbooks.Add()
  xSheet = xlApp.ActiveWorkbook.ActiveSheet
  xSheet.Range(xSheet.Cells(row,col), \
    xSheet.Cells(row+aLen-1,col+1)).Value = array

but is extremely slow. Is there any way to speed it up ?

Paul Casteels
U.I.A. / Physics

_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/ActivePython

--__--__--

Message: 10
From: Stefan Kuzminski <[EMAIL PROTECTED]>
To: =?iso-8859-1?Q?=27K=E1ri_Har=F0arson=27?= <[EMAIL PROTECTED]>,
  [EMAIL PROTECTED]
Subject: RE: Formatting reports with Python
Date: Fri, 18 Oct 2002 09:40:12 -0700

We just completed a multi month effort which is just this project.  It
generats HTML tables and graphs and Excel spreadsheets ( through COM ).
Reportlab and LaTex could have worked technically but didn't quite fit =
the
client's existing culture.

The graphs are done with http://biggles.sourceforge.net which I have =
found
very simple and solid.  Html is generated ( as tables or with image =
files
created by biggles ), there is a CSS tag which causes a page break when
printed.  That is enough to get decent output ( turn off the extra =
printing
junk in IE or Netscape to get less cluttered printouts ). =20

An advantage of HTML is that tables with many rows of data can be put =
into
separate frames from the column headers so the headers can be viewed =
while
the data is scrolled, try that in a PDF.

We created a templating scheme ( there are many complex reports ) which =
is
really just Python code and a web ui for editing and composing views of =
the
data.  The data is created and calculated in Numeric Python arrays, the =
web
ui runs as PSP pages through WebKit.  The reports can also be created =
and
the systemm unit tested from the command line.

Creating Excel ( or Word ) documents through COM is *very* slow, but it
gives one full control over the results ( rather than importing a html =
or
csv file ). =20

have fun.

S


 =20

-----Original Message-----
From: K=E1ri Har=F0arson [mailto:kari@;grunnur.is]
Sent: Friday, October 18, 2002 3:54 AM
To: [EMAIL PROTECTED]
Subject: Formatting reports with Python


Hello all,

I would like to get some opinionated opinions from you
on a design decision I have to make.

The system we write and sell is written in Python, and now we
need reports on paper.  Until now, all reports have been made
available from a website, but users complain that they don't look
good enough and have unnecessary page feeds.

We have been mulling over the methods available from Python:

1)  Produce HTML but try to format it for a printer, not screen.
Pagination will always be a problem, but this is the quickest way
to do it.

2)  Use the PDF format and learn how to use ReportLab.  I must confess
that the online tutorial seems daunting.  In any case, the reader will
have to install Adobe Acrobat Reader to have a look at the document, =
and
not all employees at our clients have one installed.  I do like this
method the best right now.

3)  Learn how to use the RTF format.  At least every user can open and
print such a document from Wordpad if nothing else.  Downside is, noone
has an RTF based report generator for Python unless I'm mistaken ?  =
Writing
in raw RTF doesn't sound fun.

4)  Generate a Word Document by running Word via COM on the webserver
where our system is running.  This might crash the webserver and is =
probably
slow ?

If someone has experience with one of the above methods or knows about
yet another way to do this, I'd love to hear about it !

Best regards,

        Kari Hardarson, Iceland
_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: =
http://listserv.ActiveState.com/mailman/listinfo/ActivePython


--__--__--

_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


End of ActivePython Digest


_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/ActivePython

Reply via email to