Project and Portfolio Management Practitioners Forum
cancel

Any way to get totals of an amount filed in a portlet ?

SOLVED
Go to solution
Highlighted
Sandeep K
Trusted Contributor.

Any way to get totals of an amount filed in a portlet ?

Is there any way to get the totals of an amount field in an out-of-the-box Request List portlet or in a custom list portlet ?
One of the columns in this portlet would be a currency or a number field, and we need the total to be displayed at the bottom.

Thanks.
Sandeep.
4 REPLIES
Sascha Mohr
Acclaimed Contributor.
Solution

Re: Any way to get totals of an amount filed in a portlet ?

Hi.
not with the ootb request list portlet. If you have a custom portlet you create one sql query for the data and a second for the totals line and then union them. The second one would need to have the same number of columns of course, sth like
select '','','',...,'TOTAL', (select sum() from somewhere) from dual
You could use formatitting for the totals too.
Daniel Gülzow
Frequent Contributor.

Re: Any way to get totals of an amount filed in a portlet ?

Hi Sandeep,

what do you think about SQLs using CUBE or GROUPING expression. Here you can define totals of one or more columns at once.

Regards
Daniel
Sandeep K
Trusted Contributor.

Re: Any way to get totals of an amount filed in a portlet ?

Sascha,
I implemented you solution using UNION, but the problem is that the TOTAL field moves along whenever we sort on the column.
Wonder if there's anyway to prevent that ?
Sascha Mohr
Acclaimed Contributor.

Re: Any way to get totals of an amount filed in a portlet ?

That would be the limitation of the solution. I did not think of that. You could try to put some chars (like 'zzzzzzz' into each column that would sort last in any case and have that maybe in white font color.