dabo Commit
Revision 7247
Date: 2012-09-12 15:29:23 -0700 (Wed, 12 Sep 2012)
Author: Paul
Trac: http://trac.dabodev.com/changeset/7247
Changed:
U trunk/dabo/lib/reportWriter.py
Log:
Disabled appending "Hack: see hackDeferredPara()" to deferred memos,
as it no longer seems necessary (because I'm seeing that string in
my reports).
One of my reports just has basically one growable memo field in the
growable detail band. A blank page starts the report if the memo
won't all fit on the first page. Added logic for cases like this to
just start printing it anyway, knowing it'll flow to the next place
appropriately.
We don't want to do this in all cases because for memo fields with
not very tall content, it would look stupid to print one line on
this page and the second line on the next.
Diff:
Modified: trunk/dabo/lib/reportWriter.py
===================================================================
--- trunk/dabo/lib/reportWriter.py 2012-09-12 13:54:18 UTC (rev 7246)
+++ trunk/dabo/lib/reportWriter.py 2012-09-12 22:29:23 UTC (rev 7247)
@@ -1988,7 +1988,9 @@
append_p = ParaClass("Hack: see
hackDeferredPara() in reportWriter.py", s)
p_height = p.wrap(99999, None)[1]
story.append((append_p, p_height))
- if obj.getProp("Height") is None and paras:
+ if False and obj.getProp("Height") is None and
paras:
+ ## pkm 2012-09-12: I'm finding I don't
need the hackDeferredPara() as I'm seeing the
+ ## append_p string at
the end of my memo.
hackDeferredPara()
neededHeight = objNeededHeight + padTop + padBottom
@@ -2248,6 +2250,10 @@
def getTotalBandHeight():
maxBandHeight = bandHeight
+ y_origin = (pageFooterOrigin[1] + pfHeight)
+ if band.lower() != "groupfooter":
+ y_origin += groupsAtBottomHeight
+ availableHeight = y - y_origin
if deferred:
for obj, obj_deferred, neededHeight in
deferred:
needed = neededHeight
@@ -2258,11 +2264,14 @@
story =
self.getStory(obj)
storyheight = story[1]
needed = storyheight +
bandHeight - self.getPt(obj.getProp("y")) ## y could be dep. on band height.
+ if needed -
availableHeight > 30:
+ # This memo
alone will make a new page get generated before printing anything
+ # and there's
significant overflow; let the memo start and then the normal
+ # mechanism to
flow just the memo can happen. Don't want to do this in all
+ # cases,
though, only when the contents would flow to a new page.
+ storyheight =
obj.getProp("Height_def")
+ needed =
storyheight + bandHeight - self.getPt(obj.getProp("y"))
maxBandHeight =
max(maxBandHeight, needed)
- y_origin = (pageFooterOrigin[1] + pfHeight)
- if band.lower() != "groupfooter":
- y_origin += groupsAtBottomHeight
- availableHeight = y - y_origin
if (maxBandHeight - bandHeight) >
availableHeight:
# Signal that we need a page change as
there isn't room:
return None
@@ -2281,7 +2290,6 @@
extraHeight = self.getBandHeight(b)
check = pageFooterOrigin[1] + pfHeight +
extraHeight
-
if y < check or maxBandHeight is None:
# Move to the next page or column
headers_reprinted = False
_______________________________________________
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]