dabo Commit
Revision 1399
Date: 2005-10-03 16:18:08 -0700 (Mon, 03 Oct 2005)
Author: paul

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

Log:
Report groups can now be defined to reprint the group headers on each new
page, default False.



Diff:
Modified: trunk/dabo/lib/reportWriter.py
===================================================================
--- trunk/dabo/lib/reportWriter.py      2005-10-03 18:21:30 UTC (rev 1398)
+++ trunk/dabo/lib/reportWriter.py      2005-10-03 23:18:08 UTC (rev 1399)
@@ -667,17 +667,22 @@
                                        # printed as well. Actually, this 
should be reworked so that any subsequent
                                        # group header records get accounted 
for as well...
                                        b = _form["detail"]
-                                       extraHeight = eval(b.get("height"))
+                                       extraHeight = b.get("height")
                                        if extraHeight is None:
                                                extraHeight = 
self.default_bandHeight
                                        else:
-                                               extraHeight = 
self.getPt(extraHeight)
+                                               extraHeight = eval(extraHeight)
                                        if extraHeight is None:
                                                extraHeight = 
self.calculateBandHeight(b)
+                                       else:
+                                               extraHeight = 
self.getPt(extraHeight)
                                if y < pageFooterOrigin[1] + pfHeight + 
extraHeight:
                                        endPage()
                                        beginPage()
-                                       y = pageHeaderOrigin[1] - height
+                                       y = pageHeaderOrigin[1]
+                                       if band == "detail":
+                                               y = reprintGroupHeaders(y)
+                                       y = y - height
                                
                                
                        self.Bands[band]["x"] = x
@@ -723,7 +728,16 @@
                        printBand("pageForeground")
                        self.Canvas.showPage()
                
+               def reprintGroupHeaders(y):
+                       for group in groups:
+                               reprint = group.get("reprintHeaderOnNewPage")
+                               if reprint is not None:
+                                       reprint = eval(reprint)
+                                       if reprint is not None:
+                                               y = printBand("groupHeader", y, 
group)
                
+                       return y
+
                beginPage()
 
                # Print the dynamic bands (Detail, GroupHeader, GroupFooter):




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

Reply via email to