dabo Commit
Revision 5472
Date: 2009-10-16 16:08:03 -0700 (Fri, 16 Oct 2009)
Author: Paul
Trac: http://trac.dabodev.com/changeset/5472
Changed:
U trunk/dabo/lib/reportWriter.py
Log:
I expanded the code that Larry and I are stuggling with, so the intended logic
is more explicit.
Diff:
Modified: trunk/dabo/lib/reportWriter.py
===================================================================
--- trunk/dabo/lib/reportWriter.py 2009-10-16 19:07:02 UTC (rev 5471)
+++ trunk/dabo/lib/reportWriter.py 2009-10-16 23:08:03 UTC (rev 5472)
@@ -1852,24 +1852,43 @@
check = pageFooterOrigin[1] + pfHeight +
extraHeight
- isNewPageOrColumn = False
if y < check or maxBandHeight is None:
- isNewPageOrColumn = True
+ # Move to the next page or column
+ headers_reprinted = False
if self._currentColumn >= columnCount-1:
+ # Move to next page
self.being_deferred = True
endPage()
self.being_deferred = False
beginPage()
y = pageHeaderOrigin[1]
y = reprintGroupHeaders(y)
+ headers_reprinted = True
else:
+ # Move to next column
self._currentColumn += 1
y = pageHeaderOrigin[1]
+
+ # We must call again, because it
recomputes available height:
maxBandHeight = getTotalBandHeight()
- if not isNewPageOrColumn:
- return y
-
+ if band == "groupHeader":
+ if headers_reprinted and
bandDict["ReprintHeaderOnNewPage"]:
+ # This header was
reprinted above; return now to avoid dupe.
+ return y
+ else:
+ # Keep going, as this
header hasn't been printed yet
+ pass
+ elif band == "groupFooter":
+ # Keep going, because we want
to continue printing the groupFooter band,
+ # only it will print on the new
page or column instead of the old.
+ pass
+ elif band in ("detail", "ReportBegin",
"ReportEnd"):
+ # These still need to be
printed, so let it continue
+ pass
+ else:
+ raise ValueError, "Unexpected
band value '%s'" % band
+
if not deferred:
y -= bandHeight
_______________________________________________
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]