dabo Commit
Revision 7215
Date: 2012-07-31 17:18:46 -0700 (Tue, 31 Jul 2012)
Author: Paul
Trac: http://trac.dabodev.com/changeset/7215

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

Log:
Fixed what looks to be a longstanding bug but I only discovered it when working
on my new report that has 6 columns: the PageNumber/PageCount properties were
getting reset unconditionally in some cases resulting in "Page 1 of 1" on all
my pages, even though I didn't have any of my group ResetPageNumber set to
True.


Diff:
Modified: trunk/dabo/lib/reportWriter.py
===================================================================
--- trunk/dabo/lib/reportWriter.py      2012-07-31 23:26:37 UTC (rev 7214)
+++ trunk/dabo/lib/reportWriter.py      2012-08-01 00:18:46 UTC (rev 7215)
@@ -2504,7 +2504,7 @@
 
                        self._onReportIteration()
 
-                       startNewPage = startNewColumn = False
+                       startNewPage = startNewColumn = resetPageNumber = False
                # print group footers for previous group if necessary:
                        if cursor_idx > 0:
                                # First pass, iterate through the groups 
outer->inner, and if any group
@@ -2515,6 +2515,8 @@
                                        if resetCurVals or vv["curVal"] != 
group.getProp("expr"):
                                                resetCurVals = True
                                                vv["curVal"] = 
UNINITIALIZED_VALUE
+                                               if 
group.getProp("ResetPageNumber"):
+                                                       resetPageNumber = True
                                                if 
group.getProp("StartOnNewColumn"):
                                                        if self._currentColumn 
< columnCount-1:
                                                                startNewColumn 
= True
@@ -2544,7 +2546,8 @@
                                endPage()
                                self.Record = record
                                processVariables()
-                               self.Canvas.showPages()
+                               if resetPageNumber:
+                                       self.Canvas.showPages()
                                beginPage()
                                y = None
                        elif startNewColumn:



_______________________________________________
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