if then else sentence
Hedley
Peru
i have this procedure
procedure Memo3OnBeforePrint(Sender: TfrxComponent);
begin
line1.frame.color := clBlue;
line5.frame.color := clBlue;
if (SUM(<data."IMPOA">) > 0) then
line1.frame.color := clRed;
line5.frame.color := clRed;
end;
but this line5.frame.color := clRed; always execute ...
i change to
if (SUM(<data."IMPOA">) > 0) then
line1.frame.color := clRed;
line5.frame.color := clRed;
else
line1.frame.color := clBlue;
line5.frame.color := clBlue;
but i receive an error... i read the users manual and programmers manual, but the examples only have one line
please how to write many sentences for "then" and "else"
thanks
Hedley
procedure Memo3OnBeforePrint(Sender: TfrxComponent);
begin
line1.frame.color := clBlue;
line5.frame.color := clBlue;
if (SUM(<data."IMPOA">) > 0) then
line1.frame.color := clRed;
line5.frame.color := clRed;
end;
but this line5.frame.color := clRed; always execute ...
i change to
if (SUM(<data."IMPOA">) > 0) then
line1.frame.color := clRed;
line5.frame.color := clRed;
else
line1.frame.color := clBlue;
line5.frame.color := clBlue;
but i receive an error... i read the users manual and programmers manual, but the examples only have one line
please how to write many sentences for "then" and "else"
thanks
Hedley
Comments
begin
if (SUM(<data."IMPOA">) > 0) then
begin
line1.frame.color := clRed;
line5.frame.color := clRed;
end
else
begin
line1.frame.color := clBlue;
line5.frame.color := clBlue;
end;
end;
but you must remember that items that have been processed already by the engine cannot be modified from the event of an object that is processed later.
ie bands are processed top down in order of type, objects within the band are processed in order of creation.
thanks a lot
Hedley