Hi,
When an expression is used on a field it shows as "%EX", maybe instead
it could show the actual expression or at least part of it?
Werner
Following one possible way of doing this, works in my simple test cases
but might need to be expanded to cover all different usages of expression.
=== modified file PythonReports/editor/elements/design.py
--- PythonReports/editor/elements/design.py 2012-12-09 09:33:39 +0000
+++ PythonReports/editor/elements/design.py 2012-12-10 13:53:45 +0000
@@ -463,7 +463,7 @@
DEFAULT_FONT_SIZE = 8
DEFAULT_TEXT = "[Empty Field]"
NOT_FOUND_TEXT = "[Data not found]"
-EXPRESSION_TEXT = "%EX"
+EXPRESSION_TEXT = "Ex: %s"
class Field(ShapeBase, wxogl.TextShape):
"""Visual field element"""
@@ -537,7 +537,7 @@
_data = self.get_value("data", self.BODY_PROPERTY)
if _expr and _expr != "":
- self.set_text(EXPRESSION_TEXT)
+ self.set_text(EXPRESSION_TEXT % _expr)
elif _pre_data and _pre_data != "":
self.set_text(_pre_data)
elif self.get_value("data", self.EXISTANCE_PROPERTY) and _data != "":
|