Set of Summations group by key column.

Stimulsoft Reports.JS discussion
Post Reply
jimyWeb
Posts: 42
Joined: Wed Feb 03, 2016 8:08 am

Set of Summations group by key column.

Post by jimyWeb »

Hello!
I have a datasource and I want to make several summations grouping the data by a column. I do not want to show all rows, I want to show the summations like this:

ValueColumn A Subtotal 1 (Sum of all rows whose key column has value A)
ValueColumn B: subtotal 2 (Sum ... value B)
ValueColumn C: subtotal 3 (Sum... value C)
..................
value N: N subtotal


Therefore I can not use DataBand or groupfooterband.
How I can do this set of summations?

Thank you very much.
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Set of Summations group by key column.

Post by HighAley »

Hello.

You could add Summary on the Group Header or Group Footer and set the Height of the Data Band to zero.

Thank you.
jimyWeb
Posts: 42
Joined: Wed Feb 03, 2016 8:08 am

Re: Set of Summations group by key column.

Post by jimyWeb »

Thank you HighAley it works perfectly :)
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Set of Summations group by key column.

Post by HighAley »

Hello.

We are always glad to help you.
Let us know if you need our help.

Thank you.
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

Re: Set of Summations group by key column.

Post by Fabio Pagano »

Hi,
I need help about similar problem.

I'd like to view total of all rows whose column has the same value

I attached a picture of my DATASET, report structure (cattura2) and the result I expect (Opzione_totale).

I used the followind code into field I'd like conditional subtotal:

{SumIf(DataBand2,
DescrizioneLavoroSintetica.Lavoro__Prezzo,
DescrizioneLavoroDettagliata.Lavoro__Note_pubbliche_immagine=="OPZIONE1")}

but not work

any idea about?
thanks in advance.
Attachments
Cattura2.PNG
Cattura2.PNG (23.85 KiB) Viewed 2645 times
Opzione_SubTotale
Opzione_SubTotale
opzione_totale.PNG (7.69 KiB) Viewed 2645 times
DATASET.PNG
DATASET.PNG (11.89 KiB) Viewed 2645 times
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Re: Set of Summations group by key column.

Post by Edward »

Hi Fabio,

Your report should work as you have done everything correctly. Please see the simple example of the report attached where the simple aggregate function is used. So please check the name of the Databand, was it definitely DataBand2?
AggregateByCondition.png
AggregateByCondition.png (230.75 KiB) Viewed 2639 times
AggregateByCondition.mrt
(672.22 KiB) Downloaded 162 times
Thank you,
Edward
Post Reply