How can I bind a field with conditionaly ?
For example:
if(Foo.InvoiceAddress == "1")
{
//I need to print on the document the field Foo.Address1
}
else
{
//I need to print on the document the field Foo.Address2
}
Thk
Conditional DataBind
-
- Posts: 12
- Joined: Fri Jun 09, 2006 11:53 am
- Location: Italy
Conditional DataBind
Please use following code in BeforePrintEvent of StiText componentguest1 wrote:How can I bind a field with conditionaly ?
For example:
if(Foo.InvoiceAddress == "1")
{
//I need to print on the document the field Foo.Address1
}
else
{
//I need to print on the document the field Foo.Address2
}
Thk
Code: Select all
if (Foo.InvoiceAddress == "1")
Text2.TextValue = Foo.Address1;
else
Text2.TextValue = Foo.Address2;