Conditional Content

0
aaronrobinson posted this 07 November 2013

Hi,

The conditional example which has an If condition "IsFromBoston" shows values dependant on whether this value is true or false. What I need is conditions based on values only. It is not possible to creat code behind for every report due to deployment issues. It would seam that this condition can only be met based on code behind calulation of IsFromBoston.

If I have an XML file (Please note that I cant display XML formatting in this)

Customer= Aaron Robinson

Job Title = Doctor

Address City = New York

IsFromBoston = False

Can it get the value of IsFromBoston from the XML itself?

Aaron

4 Posts
6 Points
2 Comments
Order By: Standard | Newest | Votes
0
jles posted this 08 November 2013

Hi Aaron,

Just to be sure if I understand you correctly. You are using XML as your data source and would like to data-bind an IF tagging element to an expression returning True/False based on some XML elements/attributes like 'AdderssCity' (your XML does not have XML element 'IsFromBoston' and you have to calculate this information from other values in your XML document).

When using 'XML' data sources this is certainly possible because the Binding Path expressions are in just ordinary XPath expressions. And XPath is quite powerful in terms of date, string functions arithmetic ... You can use it to construct very complex expression if needed. Take a look at the attached example project to get the idea. The project features FIELD, LIST and IF element bound to more complex XPath expressions (including XPath functions). Take a look at the template and you will notice an IF element inside the 3rd table column (with header text "Is written by Som F"). The values in the third table col will only display the text wrapped by the IF element if the book's author is "Som F".

Last edited 08 November 2013

155 Posts
295 Points
0
aaronrobinson posted this 11 November 2013

This answered my question perfectly. Thank you very much the examnple is exactly what I needed.

Aaron

4 Posts
6 Points

Our 228915 members have posted 344 times in 102 discussions