I am trying to use an if in my report using a variable as the condition this is what I tried IIF(<Client> = true, "Solde: " + [Solde], "Rendu: " + [Rendu]) but I get the error "undeclared identifier 'Client'"
frxReport1.Variables['Rendu'] := Versement - TotalAmount - Remise;
frxReport1.Variables['Solde'] := SoldClient;
frxReport1.Variables['Client'] := ClientTrue; //ClientTrue is a boolean
I see these problems:
[]all around the expression'instead of double quotes"for strings<>only, for using variables in the expressionsFurthermore, you can avoid comparing your variable (
<Client> = true), just use the variable since it's a boolean variable.The following expression will work: