dabo Commit
Revision 2328
Date: 2006-10-10 17:54:45 -0700 (Tue, 10 Oct 2006)
Author: paul

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

Log:
My prior commit essentially processes the variables twice for the first 
record. Added code to keep variables that accumulate from accumulating 
twice.


Diff:
Modified: trunk/dabo/lib/reportWriter.py
===================================================================
--- trunk/dabo/lib/reportWriter.py      2006-10-11 00:45:39 UTC (rev 2327)
+++ trunk/dabo/lib/reportWriter.py      2006-10-11 00:54:45 UTC (rev 2328)
@@ -1152,7 +1152,7 @@
                if len(self.Cursor) > 0:
                        self.Record = self.Cursor[0]
 
-               def processVariables():
+               def processVariables(forceReset=False):
                        """Apply the user's expressions to the current value of 
all the report vars.
 
                        This is called once per record iteration, before the 
detail for the current
@@ -1169,7 +1169,8 @@
                                if resetAt != curReset:
                                        # resetAt tripped: value to initial 
value
                                        self.Variables[varName] = 
variable.getProp("InitialValue")
-                               vv["curReset"] = resetAt
+                               if not forceReset:
+                                       vv["curReset"] = resetAt
 
                                # run the variable expression to get the 
current value:
                                #vv["value"] = eval(variable["expr"])
@@ -1325,7 +1326,7 @@
 
                # Need to process the variables before the first beginPage() in 
case
                # any of the static bands reference the variables.
-               processVariables()
+               processVariables(forceReset=True)
                beginPage()
 
                # Print the dynamic bands (Detail, GroupHeader, GroupFooter):




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to