dabo Commit
Revision 1397
Date: 2005-10-03 07:48:59 -0700 (Mon, 03 Oct 2005)
Author: paul

Changed:
U   trunk/dabo/lib/datanav/Form.py
U   trunk/dabo/lib/reportWriter.py

Log:
Another tiny bugfix in reporting.

Also, centered the report title for the quick reports in datanav.


Diff:
Modified: trunk/dabo/lib/datanav/Form.py
===================================================================
--- trunk/dabo/lib/datanav/Form.py      2005-10-03 05:52:26 UTC (rev 1396)
+++ trunk/dabo/lib/datanav/Form.py      2005-10-03 14:48:59 UTC (rev 1397)
@@ -511,21 +511,9 @@
        <pageHeader>
                <height>"0.75 in"</height>
                <objects>
-                       <string>
-                               <align>"center"</align>
-                               <valign>"top"</valign>
-                               <borderWidth>"0 pt"</borderWidth>
-                               <expr>self.ReportForm["title"]</expr>
-                               <fontName>"Helvetica"</fontName>
-                               <fontSize>14</fontSize>
-                               <hAnchor>"center"</hAnchor>
-                               <height>15.96</height>
-                               <name>title</name>
-                               <width>384.0</width>
-                               <x>self.Bands["pageHeader"]["width"]/2</x>
-                               <y>"0.6 in"</y>
-                       </string>"""
+"""
                x = 0
+               reportWidth = 0
                horBuffer = 3
                vertBuffer = 5
                for col in grid.Columns:
@@ -557,6 +545,8 @@
                                # We'll run off the edge of the page, ignore 
the rest:
                                break
 
+                       reportWidth = x
+
                        rfxml += """
                        <rect>
                                <width>%(rectWidth)s</width>
@@ -575,8 +565,24 @@
                                <x>%(x)s</x>
                                <y>%(textY)s</y>
                        </string>""" % coldict
-               
+
                rfxml += """
+                       <string>
+                               <align>"center"</align>
+                               <valign>"top"</valign>
+                               <borderWidth>"0 pt"</borderWidth>
+                               <expr>self.ReportForm["title"]</expr>
+                               <fontName>"Helvetica"</fontName>
+                               <fontSize>14</fontSize>
+                               <hAnchor>"center"</hAnchor>
+                               <height>15.96</height>
+                               <name>title</name>
+                               <width>%s</width>
+                               <x>%s</x>
+                               <y>"0.6 in"</y>
+                       </string>""" % (reportWidth, reportWidth/2)
+                               
+               rfxml += """
                </objects>
        </pageHeader>
 

Modified: trunk/dabo/lib/reportWriter.py
===================================================================
--- trunk/dabo/lib/reportWriter.py      2005-10-03 05:52:26 UTC (rev 1396)
+++ trunk/dabo/lib/reportWriter.py      2005-10-03 14:48:59 UTC (rev 1397)
@@ -632,7 +632,7 @@
                                        if extraHeight is None:
                                                extraHeight = 
self.default_bandHeight
                                        else:
-                                               extraHeight = 
self.getPt(eval(extraHeight))
+                                               extraHeight = 
self.getPt(extraHeight)
                                        if extraHeight is None:
                                                extraHeight = 
self.calculateBandHeight(b)
                                if y < pageFooterOrigin[1] + pfHeight + 
extraHeight:




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to