Always evaluate expression when variable gets used
Posted: Mon Nov 02, 2015 10:31 am
We've added some helper methods to our report viewing & editing application to use runtime data within the report fields and the query without having to add code to the report's C# code.
If the helper code is used from within the query, we're adding it to an expression-typed variable within the report's dictionary.
When viewing / previewing the report, everything works as expected, but when simply executing the command (query) from within the dictionary, the user gets queried for the variables, pre-filled with the expression set in the variable.
Example:
* variable named "SiteNr" within the dictionary, having "WinTool.LocalSiteNr" as expression content (w/o quotes)
* used as {SiteNr} within the query
* when viewing the report, the variable gets replaced with e.g. "1"
When using "View Data" on the query within the dictionary, a popup is shown, that asks the user for the value of "{SiteNr}" and pre-fills the textbox with "WinTool.LocalSiteNr"
Is there a way to always evaluate variables - no matter if the report gets actually rendered, or only the query gets executed?
Note: we're currently stuck at STI 2013.2, but intend to upgrade to a newer STI probably with the next major release of our software.
If the helper code is used from within the query, we're adding it to an expression-typed variable within the report's dictionary.
When viewing / previewing the report, everything works as expected, but when simply executing the command (query) from within the dictionary, the user gets queried for the variables, pre-filled with the expression set in the variable.
Example:
* variable named "SiteNr" within the dictionary, having "WinTool.LocalSiteNr" as expression content (w/o quotes)
* used as {SiteNr} within the query
* when viewing the report, the variable gets replaced with e.g. "1"
When using "View Data" on the query within the dictionary, a popup is shown, that asks the user for the value of "{SiteNr}" and pre-fills the textbox with "WinTool.LocalSiteNr"
Is there a way to always evaluate variables - no matter if the report gets actually rendered, or only the query gets executed?
Note: we're currently stuck at STI 2013.2, but intend to upgrade to a newer STI probably with the next major release of our software.