Add values of evaluating fields
Hedley
Peru
sorry by my english... and i am new in this...
i need to count values of multiples fields
and i do that
[IIF(<alum1m."AS1"> = 'NS',1,0)] + [IIF(<alum1m."AS2"> = 'NS',1,0)]
but i obtained 0 + 1 insted 1 as number... what i do wrong...
thanks
Hedley
i need to count values of multiples fields
and i do that
[IIF(<alum1m."AS1"> = 'NS',1,0)] + [IIF(<alum1m."AS2"> = 'NS',1,0)]
but i obtained 0 + 1 insted 1 as number... what i do wrong...
thanks
Hedley
Comments
when you work in a memoview [] tells the engine to calc the value contained inside the braces
and display that value. Since a memoview allows both text and data/variable values it is displaying what you told it to display.
if you want to have sums of values use an intermediate variable for display and write code in either the band's or the memoview's obp event to gather the sum in that variable.
or use () braces ie (<dataset."field1"> + <dataset."field2">)
i suggest you read the user manual for working inside the report and the programmers manual as working from delphi.
dear gordk :
thanks for your guide
i try with (<alum1m."AS1">+<alum1m."AS2"> ) and don't work... why ? i dont know.. i will check another time, but now dont have time to check
i use a variable with IIF(<alum1m."AS1"> = 'NS',1,0)+IIF(<alum1m."AS2"> = 'NS',1,0) and it works....
thanks
Hedley
[(<dataset."field1"> + <dataset."field2">)]
i try [IIF(<alum1m."AS1"> = 'NS',1,0)+IIF(<alum1m."AS2"> = 'NS',1,0)] but in that moment dont work....
i do again and it work... perhaps i do something wrong in that moment...
sorry.. and thanks...
Hedley
previous was [iif(blabla)] + [iif(blabla)]
you now have [iif(blabla) + iif(blabla)] which is correct
Dear gordk :
you are rigth... i missed the extra ] [ in the last expression...
thanks
Hedley