Total.sum for negative and positive value
Hi all,<br />
I am having an issue with Total.sum() function. I created a report similar to <a class='bbc_url' href='http://www.eclipse.org/birt/phoenix/examples/solution/crosstab.html'>http://www.eclipse.org/birt/phoenix/examples/solution/crosstab.html</a>.<br />
<br />
The different is, my data has positive and negative values. So, I have this:<br />
<structure><br />
<property name="name">BQ</property><br />
<expression name="expression">Total.sum(dataSetRow["account_balance"])</expression><br />
<property name="dataType">integer</property><br />
<property name="aggregateOn">Quarter</property><br />
</structure><br />
<br />
But the result for this expression is not adding up all the positive and negative values.<br />
<br />
Did anyone have experience this before?<br />
<br />
Any help is appreciated.<br />
<br />
Thanks!<br />
-Laurent
I am having an issue with Total.sum() function. I created a report similar to <a class='bbc_url' href='http://www.eclipse.org/birt/phoenix/examples/solution/crosstab.html'>http://www.eclipse.org/birt/phoenix/examples/solution/crosstab.html</a>.<br />
<br />
The different is, my data has positive and negative values. So, I have this:<br />
<structure><br />
<property name="name">BQ</property><br />
<expression name="expression">Total.sum(dataSetRow["account_balance"])</expression><br />
<property name="dataType">integer</property><br />
<property name="aggregateOn">Quarter</property><br />
</structure><br />
<br />
But the result for this expression is not adding up all the positive and negative values.<br />
<br />
Did anyone have experience this before?<br />
<br />
Any help is appreciated.<br />
<br />
Thanks!<br />
-Laurent
0
Comments
-
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!
-Laurent0 -
Laurent,<br />
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.<br />
<br />
By the way, Total.sum() is deprecated. You should look at the Aggregation builder. You can read more about Total.sum() deprecation here: <a class='bbc_url' href='https://bugs.eclipse.org/bugs/show_bug.cgi?id=196738'>https://bugs.eclipse.org/bugs/show_bug.cgi?id=196738</a>0
Categories
- All Categories
- 108 Developer Announcements
- 53 Articles
- 106 General Questions
- 144 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 899 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 120 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management