Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Description of "Total" functionality - or workaround
GoranG
Hello.<br />
<br />
Another thing I'm looking for is some help on "Total.sum" functionality. <br />
<br />
Let me explain what I'm trying to do. There is a value I need to reuse on several places in my report. The thing I thought may be a good idea was to create a report variable and assign a value to it. <br />
I achieved this by entering a "dynamic text" field, binded it to my result set, and the content is:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>vars["reserveSum"] = Total.sum(row["reserve"])</pre>.<br />
<br />
I'm google-ing around and cannot find any nice description of available methods and how they work, when using the "Total" object (this specific works though). But I did find a comment saying that this functionality is obsolete. <br />
What do you propose to do instead? And, what is your source of information for "Total" functionality?<br />
<br />
thanks,<br />
G
Find more posts tagged with
Comments
fwhorton
Can you also create an sum aggregation?
GoranG
fwhorton,
I do not understand.
I could, but I don't know if I can assign this value to the variable. And this is actually part of my question, too.
cheers,
G
JRS
HI,<br />
<br />
my source for the Total function is:<br />
<a class='bbc_url' href='
http://publib.boulder.ibm.com/infocenter/radhelp/v7r0m0/index.jsp?topic=/org.eclipse.birt.doc/birt/birt-24-4.html'>This</a><br
/>
<br />
I'm also missing the Total functionality a bit, but as it works till now and you can use it, everything is ok
<br />
<br />
Regards,<br />
JRS
johnw
The Total.* aggregations were deprecated in version 2.3 of BIRT. They were replaced with the Aggregation report item type, which is much more flexible. The Aggregation report item type creates a table binding with the result of the aggregation calculation.<br />
<br />
So, in your example, if you created a Sum aggregation on row["reserve"], and called it reserveSum, you would replace your expression below that assigns your global variable with:<br />
<br />
vars["reserveSum"] = row["reserveSum"];<br />
<br />
John<br />
<br />
<blockquote class='ipsBlockquote' data-author="'GoranG'" data-cid="68518" data-time="1284726797" data-date="17 September 2010 - 05:33 AM"><p>
Hello.<br />
<br />
Another thing I'm looking for is some help on "Total.sum" functionality. <br />
<br />
Let me explain what I'm trying to do. There is a value I need to reuse on several places in my report. The thing I thought may be a good idea was to create a report variable and assign a value to it. <br />
I achieved this by entering a "dynamic text" field, binded it to my result set, and the content is:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>vars["reserveSum"] = Total.sum(row["reserve"])</pre>.<br />
<br />
I'm google-ing around and cannot find any nice description of available methods and how they work, when using the "Total" object (this specific works though). But I did find a comment saying that this functionality is obsolete. <br />
What do you propose to do instead? And, what is your source of information for "Total" functionality?<br />
<br />
thanks,<br />
G<br /></p></blockquote>