Page 1 of 1

Formula fields

Posted: Sun Jun 11, 2006 4:32 am
by Wr00
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

Posted: Mon Jun 12, 2006 4:03 am
by Edward
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.

Formula fields

Posted: Mon Jun 12, 2006 11:55 am
by Edward
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”}

Formula fields

Posted: Mon Jun 12, 2006 1:35 pm
by Wr00

How i can do it in VB.Net?


Formula fields

Posted: Tue Jun 13, 2006 9:39 am
by Mark Smith
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.