Reputation: 31
I want to nest if-else statements in Crystal Reports, but I don't know the necessary syntax. How can I arrange something like this:
Local StringVar x;
If (IsNull({datatable.id}) or {datatable.id} ="") then
x := ""
Else
(If ToText({datatable.id}) <= {?parameter} Then
x := "new"
Else
x:= "")
Upvotes: 1
Views: 533
Reputation: 26342
Your syntax is not c sharp.
In c sharp your code would look like this:
string x;
if (datatable?.id == null || datatable.id ="") {
x = "";
}
else if (datatable.id <= Int32.Parse(parameter)) {
x = "new";
}
else {
x = "";
}
Bear in mind that I'm making heavy assumptions on what you are trying to achieve here. The purpose of the answer is to show you the c# syntax equivalent.
Upvotes: 1