Total.sum for negative and positive value

lpurbalpurba Junior Member
edited December 31, 1969 in Designing Analytics Reports
Hi all,

I am having an issue with Total.sum() function. I created a report similar to http://www.eclipse.org/birt/phoenix/examples/solution/crosstab.html.



The different is, my data has positive and negative values. So, I have this:



BQ

Total.sum(dataSetRow["account_balance"])

integer

Quarter





But the result for this expression is not adding up all the positive and negative values.



Did anyone have experience this before?



Any help is appreciated.



Thanks!

-Laurent

Comments

  • lpurbalpurba Junior Member
    edited December 31, 1969
    Following my previous thread, I found something interesting.

    I have 1040 records as the result of the query, and I assigned it to data set, let say payment_amount. So, when I displayed that payment_amount, and I clicked "Preview" tab, it does not show 1040 records, and the SUM of that I get by using Total.sum(dataSetRow["payment_amount"]) is not the same with the SUM from SQL command (I am using PostgreSQL).

    Is the preview tab displaying all the records from the query or data set?

    Thanks!
    -Laurent
  • lpurbalpurba Junior Member
    edited December 31, 1969
    One more thing, the SUM works if I preview it birt viewer, but not in eclipse.

    Thanks!
    -Laurent
  • edited December 31, 1969
    Laurent,

    The default setting for the the number of records to use in the preview window is 500. This setting can be changed in Windows -> Preferences... select Report Design -> Preview. Maximum number of rows to display is set by default to 500. This allows you to make incremental design changes without having to completely build the report. If you want to view the report with all the data, use the options under View Report.



    By the way, Total.sum() is deprecated. You should look at the Aggregation builder. You can read more about Total.sum() deprecation here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=196738
  • lpurbalpurba Junior Member
    edited December 31, 1969
    Thanks for your help, Rob.
    -Laurent
Sign In or Register to comment.