dabo Commit
Revision 6388
Date: 2011-02-03 15:54:01 -0800 (Thu, 03 Feb 2011)
Author: Paul
Trac: http://trac.dabodev.com/changeset/6388
Changed:
U trunk/dabo/lib/reportWriter.py
Log:
Added CurrentBandName and CurrentBandObj reportWriter properties, inspired by
Nate's ticket #1380.
Diff:
Modified: trunk/dabo/lib/reportWriter.py
===================================================================
--- trunk/dabo/lib/reportWriter.py 2011-02-03 23:40:02 UTC (rev 6387)
+++ trunk/dabo/lib/reportWriter.py 2011-02-03 23:54:01 UTC (rev 6388)
@@ -1877,6 +1877,9 @@
# Band name doesn't exist.
return y
+ self._currentBandName = band
+ self._currentBandObj = bandDict
+
if band.lower() == "pagefooter" and
bandDict.getProp("Height") == None:
raise ValueError, "PageFooter height must be
fixed (not None)."
@@ -2527,6 +2530,22 @@
return v
+ def _getCurrentBandName(self):
+ try:
+ v = self._currentBandName
+ except AttributeError:
+ v = self._currentBandName = None
+ return v
+
+
+ def _getCurrentBandObj(self):
+ try:
+ v = self._currentBandObj
+ except AttributeError:
+ v = self._currentBandObj = None
+ return v
+
+
def _getCursor(self):
if self.UseTestCursor:
try:
@@ -2748,6 +2767,12 @@
Cursor = property(_getCursor, _setCursor, None,
_("Specifies the data cursor that the report runs against."))
+ CurrentBandName = property(_getCurrentBandName, None, None,
+ _("During a report run, returns the name of the currently
printing band."))
+
+ CurrentBandObj = property(_getCurrentBandObj, None, None,
+ _("During a report run, returns a reference to the current band
object."))
+
Encoding = property(_getEncoding, _setEncoding, None,
_("Specifies the encoding for unicode strings. (str)"))
_______________________________________________
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]