Hi!
I need to know how to use the Formula fields(like we have in crystal). I mean how do I use the condition like if I have a field that returns True I need to display Yes instead of True. How do I do that here?
Thank you.
Formula fields
Formula fields
Please use the TextFormat property of the TextBox component:
Select the "Boolean" category in the "Formats" list
and in the Display property please type your text to output values for "False", "True", and "Null" values.
Select the "Boolean" category in the "Formats" list
and in the Display property please type your text to output values for "False", "True", and "Null" values.
Formula fields
Please use the ternary expression in the following form:
{Condition ? Value1 : Value2}
if Condition returns true, then the expression will return the Value1, if Condition returns false then the expression will return Value2.
For example:
{Store.Count > 0 ? Store.Count : “Empty”}
{Condition ? Value1 : Value2}
if Condition returns true, then the expression will return the Value1, if Condition returns false then the expression will return Value2.
For example:
{Store.Count > 0 ? Store.Count : “Empty”}
Formula fields
How i can do it in VB.Net?
-
- Posts: 37
- Joined: Tue Jun 13, 2006 8:59 am
- Location: Yorkshire, UK
Formula fields
In VB.NET the (sort of) equivalent of the ? : operator is the IIF function.
Unfortunately this function is not a part of the VB.NET language so you need to add the Microsoft.VisualBasic.dll to your list of referenced assemblies and add Microsoft.VisualBasic to your list of NameSpaces.
Unfortunately this function is not a part of the VB.NET language so you need to add the Microsoft.VisualBasic.dll to your list of referenced assemblies and add Microsoft.VisualBasic to your list of NameSpaces.