Hi: I've been using DTML successfully to generate around 20+ reports outside of zope itself. The result come back from the DB as a pdf document. The solution has worked well. It looks like there might possibly be a bug in the dtml totalling process, however, when dealing with larger numbers. The results on one report are accurate for a 20 row table with smaller totals (say, e.g., 51518), but the larger totals are incorrect (e.g., it reports a number say in the 300,000 range rather than 1,378,835). The DTML for that column (the TOTAL column) is: <!--#var total-TOTAL fmt="%15d"--> Has anyone else seen this? The version of DTML I'm using is from the last quarter or so of last year. Any ideas?
Hi, I am new to Zope and am trying to migrate an app that currently generates FDF/PDF report files. I am interested to hear how you are integrating Zope and PDF. If you have a minute or two, would you mind passing on a few words of wisdom? Many thanks Eric. // -----Original Message----- // From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Clint // Shelby McCulloch // Sent: Wednesday, March 01, 2000 8:44 AM // To: zope@zope.org // Subject: [Zope] DTML Mistotals // // // // Hi: // // I've been using DTML successfully to generate around 20+ reports outside // of zope itself. The result come back from the DB as a pdf document. The // solution has worked well. // // It looks like there might possibly be a bug in the dtml // totalling process, // however, when dealing with larger numbers. The results on one report are // accurate for a 20 row table with smaller totals (say, e.g., 51518), but // the larger totals are incorrect (e.g., it reports a number say in the // 300,000 range rather than 1,378,835). The DTML for that column // (the TOTAL // column) is: // // <!--#var total-TOTAL fmt="%15d"--> // // Has anyone else seen this? The version of DTML I'm using is from the last // quarter or so of last year. Any ideas? // // // // _______________________________________________ // Zope maillist - Zope@zope.org // http://lists.zope.org/mailman/listinfo/zope // ** No cross posts or HTML encoding! ** // (Related lists - // http://lists.zope.org/mailman/listinfo/zope-announce // http://lists.zope.org/mailman/listinfo/zope-dev ) //
I think I found the problem, at least for my purposes. :) I'm not sure if this has already been corrected in the latest versions of DTML or not but it might be worth a check. DT_InSV.py line 239 was: s=item*item Instead, I'm now using: if type(item)==type(1): s=item*long(item) else: s=item*item Looks like this information is needed to calculate some of the other statistics and when the item is a large integer it will cause an exception. The exception is then caught and results in that item be omitted from some calculations, such as the total. Hi Eric: I'm not sure how much of what I've done would apply to your situation. Basically, the powers that be wanted some complex reports for an Access application hooked up to SQL Server. Access reports were not anywhere near flexible enough to produce the output they wanted. Consequently, I ended up building a reporting interface onto the rather low-level python pdf module and then hooked it up to the DB. That way I was able to do most of the complex stuff in python, use DTML templates whenever possible, and output the results in pdf. When the user clicks on a report in access, the application shells out without them knowing it and the next thing they know a pdf pops out in Acrobat. I gave some thought making it available to whoever might find it useful but haven't had much time to make it more friendly. In particular, I might take the pdf wrapper, which allows for high level pdf formatting (for switching font sizes, styles, page numbering, headings, etc), and somehow hook it up to zope. Sometime after I started, someone did come up with a pdf document hook for zope, but it didn't offer the formatting options I needed and my reports weren't going through zope. It might be worth a look, however, for your purposes. If you can get away with it, avoid PDF documents altogether and just use DTML to web enable your reports through zope. I ended up using pdf because the users didn't want to web enable this stuff, wanted more precision then browser formatting allowed, and I thought it would be kind of neat to try....
Thanks for the info on your PDF implementation. Here's my situation: I currently have a Java applet that collects data from my users. The applet runs some calculations and sends the results to me via email. I copy & paste the data into a Win32 VC++ app I wrote that converts the data into "Forms Data Format" (FDF) using Adobe's SDK for generating FDF files. I am using Adobe's fdf DLL right now, but I'm excited about the idea of moving this to Zope - No more Applet for my clients to download!!! I have ZERO Python experience. I use PDF / FDF because I am filling PDF files that are created by a governmental agency; these are 'State Standard' forms, so I want to stick with them instead of generating dynamic forms using Zope. Question: Are you using a Python code supplied by adobe for generating your FDF file? If so, I would be VERY interested in any Python code you'd be willing to share that ties Zope to the Adobe code. Thanks for your response. PS, I'm replying to you and CC'ing zope@zope.org. Is this an acceptable way to keep the mailing list folks in the loop? PSS, what's your name? Eric. // -----Original Message----- // From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Clint // Shelby McCulloch // Sent: Wednesday, March 01, 2000 1:08 PM // To: Eric L. Walstad // Cc: Zope Mailing List // Subject: RE: [Zope] DTML Mistotals // // // // // I think I found the problem, at least for my purposes. :) I'm not sure // if this has already been corrected in the latest versions of DTML or not // but it might be worth a check. // // DT_InSV.py line 239 was: // s=item*item // // Instead, I'm now using: // if type(item)==type(1): s=item*long(item) // else: s=item*item // // Looks like this information is needed to calculate some of the other // statistics and when the item is a large integer it will cause an // exception. The exception is then caught and results in that item // be omitted from some calculations, such as the total. // // Hi Eric: // // I'm not sure how much of what I've done would apply to your situation. // Basically, the powers that be wanted some complex reports for an Access // application hooked up to SQL Server. Access reports were not anywhere // near flexible enough to produce the output they wanted. Consequently, // I ended up building a reporting interface onto the rather // low-level python // pdf module and then hooked it up to the DB. That way I was able to // do most of the complex stuff in python, use DTML templates whenever // possible, and output the results in pdf. When the user clicks // on a report // in access, the application shells out without them knowing it and the // next thing they know a pdf pops out in Acrobat. // // I gave some thought making it available to whoever might find it useful // but haven't had much time to make it more friendly. In particular, I // might take the pdf wrapper, which allows for high level pdf // formatting (for switching font sizes, styles, page numbering, headings, // etc), and somehow hook it up to zope. Sometime after I started, someone // did come up with a pdf document hook for zope, but it didn't offer the // formatting options I needed and my reports weren't going through // zope. It // might be worth a look, however, for your purposes. // // If you can get away with it, avoid PDF documents altogether and just use // DTML to web enable your reports through zope. I ended up using pdf // because the users didn't want to web enable this stuff, wanted more // precision then browser formatting allowed, and I thought it would be kind // of neat to try.... // // // _______________________________________________ // Zope maillist - Zope@zope.org // http://lists.zope.org/mailman/listinfo/zope // ** No cross posts or HTML encoding! ** // (Related lists - // http://lists.zope.org/mailman/listinfo/zope-announce // http://lists.zope.org/mailman/listinfo/zope-dev ) //
participants (2)
-
Clint Shelby McCulloch -
Eric L. Walstad