{{sidenavigation.sidenavigationExpandLabel}}
{{getMsg('Help_YouAreHere')}}: {{page.title}} {{page.title}}
{{$root.getMsg("downLoadHelpAsPdf")}} {{helpModel.downloadHelpPdfDataStatus}}

If statements

The If statement enables you to insert a branch in your control sequence. Depending on this condition one or another sequence of statements will be executed.

When the If statement is used in a property formula or the record selection formula, then an Else branch should be included always so that the formula returns the correct return value type.

Usage:

If //(condition)// Then (
		//(statement1) //
		//(statement2) //
) Else (
		//(statement3)//
		//(statement4) //
);
If //(condition)// Then //(statement) // Else //(statement)// // the line break is optional

Examples:

If {Orders.quantity}>100 Then
	{Products.price} * 0.89
Else
	{Products.price}
StringVar forecolor;
StringVar backcolor;
If PageNumber = 1 Then (
	forecolor := "red";
	backcolor := "blue";
) Else (
	forecolor := "black";
	backcolor := "white";
);
forecolor + " and " + backcolor;
i-net Clear Reports
This application uses cookies to allow login. By continuing to use this application, you agree to the use of cookies.


Help - If statement (Crystal)