Display sum of boolean field with positive numbers

Is there a way to display the sum of a boolean field with positive numbers? The expression belows provides me with the correct sum totals for the "married" field except that they are always displayed with a minus sign preceding the answer.

[SUM(<frxDBDataset1."Married">,MasterData1,1)]

Thanks for any help,
Brent ;)

Comments

  • edited 5:57PM
    If you want to do the conditional summing, use the scripts and calculate the sum yourself.
  • edited 5:57PM
    So in other words, I've lost some functionality by upgrading to FR3.x.
    In version 2.5x the code I used below provided me with exacly what I needed. I cannot do that with version 3.x. In fact the code generator in 2.5x wrote most of the code.

    [SUM([AdsQuery1."Married"]=TRUE)]
    _____________________________________

    Could you post an example script? I believe that would be more helpful than just saying you need to write scripts.

    Thanks,
    Brent ;)
  • edited 5:57PM
    If you try to convert True to integer, you'll get -1. FR does the same. Just do:
    [ABS(<SUM(<frxDBDataset1."Married">,MasterData1,1)>)]
  • edited 5:57PM
    Thank you very much! That did the trick. By the way, what is "ABS"?

    Brent
  • gordkgordk St.Catherines On. Canada.
    edited 5:57PM
    same as in delphi function to return absolute value no signs.
    ;)

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.