From: Werner F. Bruhin <werner.bruhin@fr...> - 2012-12-10 14:42:59
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?
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 % _expr)
elif _pre_data and _pre_data != "":
elif self.get_value("data", self.EXISTANCE_PROPERTY) and _data != "":
From: alexander smishlajev <alex@go...> - 2012-12-11 10:55:10
On 10.12.2012 16:44, Werner F. Bruhin wrote:
> 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?
Needs computation of the part that can be shown. I am not sure if the
goal is worth the effort.
> 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.
Tried it with the sakila template. That looks worse than a constant marker.