SUM returns negative value

edited 10:50AM in FastReport 3.0
Hi,
I need to count how many items in the report have a particular string.
I'm using:

[SUM(<frxDBdataset."Confez"> = 'Pronto')]

The result is correct (35), but is negative!

eg -35.

How can it happen?

thanx
miyomo

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 10:50AM
    the sum function is for numeric values
    use count function
    see the user manual on aggregate functions.
    ;)
  • gordkgordk St.Catherines On. Canada.
    edited 10:50AM
    sorry my mistake, you can use the sum function with a condition but you need the band name.
    of the band where the datafield originally appears.
    ie

    [SUM(<Customers."Country">= 'US',Band4)]

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.