Totals and percentage of totals in headers

Stimulsoft Reports.NET discussion
Post Reply
javiervillalta
Posts: 2
Joined: Fri Apr 03, 2009 5:29 am
Location: Spain

Totals and percentage of totals in headers

Post by javiervillalta »

Hello,
I'am trying to do something like this (typical for obtain the results in a slaughterhouse) :

Big group Little part kgr neto result

Front part 1200 kgr 21% (12/57)
head 500 kgr 8.7% (5/57)
harm 600 kgr 10.5% (6/57)
neck 100 kgr 1.8% (1/57)

Middle part 2500 kgr 43.8%
breast 1500 kgr 26.3%
back 1000 kgr 17.5%

Hind part 2000 kgr 35.2%
Legs 1500 kgr 26.3%
Feet 500 kgr 8.9%

Total body = 5700 kgr 100%

I can not do it because the colunm of percentage is a division between Big group /total body, and little part / total body. The weight of each little part is the sum of many weights, so this is a report with 2 groupheaders, 1 footer, and 1 data band with many little weights from each animal (not showed here). For example the weight of heads, 500 kgrs is obtained from the sum of many figures.
My problem: I use the formula cSum(databand1, do.kgrneto) or cSum(od.kgrneto) it works if I place it in groupheaders but only in the first page. In the secon page, the report sums only the figures of the second page. But if I try to obtain the percentage of big group I can not. I've tried:
Sum(od.kgrneto)/cSum(od.kgneto) but it does not work.
Sum(databand1,od.kgrneto) / cSum(databand1,od.kgrneto)
and many other options ( built a new variable with the formula cSum(databand1,od.kgrneto) and meny others.
This report has many pages.
I can send images and mrt.
Thank you


Attachments
163.p preview.JPG
163.p preview.JPG (133.39 KiB) Viewed 945 times
162.pdf result.pdf
(16.64 KiB) Downloaded 249 times
161.escanadallo vic.mrt
(20.39 KiB) Downloaded 174 times
javiervillalta
Posts: 2
Joined: Fri Apr 03, 2009 5:29 am
Location: Spain

Totals and percentage of totals in headers

Post by javiervillalta »

I have found the solution:
{Div(Sum(od.EtqA_PesoNeto),Totals.Sum(datos1,od.EtqA_PesoNeto))}
If I use this formula it works wherever I put it. I have seen other message with a similar question.

Thank you very much!!!
Post Reply