dabo Commit
Revision 6081
Date: 2010-10-06 12:40:45 -0700 (Wed, 06 Oct 2010)
Author: Paul
Trac: http://trac.dabodev.com/changeset/6081

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

Log:
Fixed a long-standing problem where the group header would sometimes get
printed twice on a new page.


Diff:
Modified: trunk/dabo/lib/reportWriter.py
===================================================================
--- trunk/dabo/lib/reportWriter.py      2010-10-06 18:30:01 UTC (rev 6080)
+++ trunk/dabo/lib/reportWriter.py      2010-10-06 19:40:45 UTC (rev 6081)
@@ -1948,7 +1948,7 @@
                                                self.being_deferred = False
                                                beginPage()
                                                y = pageHeaderOrigin[1]
-                                               y = 
reprintGroupHeaders(bandDict, y)
+                                               y = reprintGroupHeaders(group, 
bandDict, y)
                                                headers_reprinted = True
                                        else:
                                                # Move to next column
@@ -2112,14 +2112,15 @@
                        self.Canvas.showPage()
 
 
-               def reprintGroupHeaders(bandDict, y):
+               def reprintGroupHeaders(currentGroup, bandDict, y):
                        self = bandDict  ## to allow "self" references from 
groupHeader object
                        for group in groups:
                                reprint = group.get("ReprintHeaderOnNewPage")
                                if reprint is not None:
                                        reprint = eval(reprint)
                                if reprint:
-                                       y = printBand("groupHeader", y, group)
+                                       if currentGroup != group:  ## avoid 
printing twice
+                                               y = printBand("groupHeader", y, 
group)
                                else:
                                        # Even though we aren't reprinting this 
header, we still need to restart
                                        # any spanning objects which would have 
been closed at the end of the



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to