dabo Commit
Revision 5284
Date: 2009-07-01 09:28:31 -0700 (Wed, 01 Jul 2009)
Author: Paul
Trac: http://trac.dabodev.com/changeset/5284
Changed:
U trunk/dabo/lib/reportWriter.py
Log:
Fixed reportWriter to force a new page if the items to print won't fit on
the current page. This fixes my invoice report to print how I expect, however
it is possible it screws up very long paragraph objects. John/Larry please
test and let me know ASAP if this causes trouble.
Diff:
Modified: trunk/dabo/lib/reportWriter.py
===================================================================
--- trunk/dabo/lib/reportWriter.py 2009-06-30 20:18:26 UTC (rev 5283)
+++ trunk/dabo/lib/reportWriter.py 2009-07-01 16:28:31 UTC (rev 5284)
@@ -1642,11 +1642,12 @@
story =
self.getStory(obj)
storyheight = story[1]
needed = storyheight +
bandHeight - self.getPt(obj.getProp("y")) ## y could be dep. on band height.
-
maxBandHeight =
max(maxBandHeight, needed)
availableHeight = y - (pageFooterOrigin[1] +
pfHeight)
if maxBandHeight > availableHeight:
- maxBandHeight = availableHeight
+ # Signal that we need a page change as
there isn't room:
+ #maxBandHeight = availableHeight
+ return None
return maxBandHeight
maxBandHeight = getTotalBandHeight()
@@ -1663,7 +1664,7 @@
check = pageFooterOrigin[1] + pfHeight +
extraHeight
- if y < check:
+ if y < check or maxBandHeight is None:
if self._currentColumn >= columnCount-1:
endPage()
beginPage()
_______________________________________________
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]