Newbie - How to create subtotals

-1

Hi,

I'm new to Jaspersoft studio and working on a basic report that looks like this. I've tried using both Table element & Crosstab element to derive subtotals but wasn't successful. Could someone provide details of how to achieve this? Thanks.

 

STATE CITY POPULATION AREA
AZ Phoenix 500000 100000
  SubTotal 500000 100000
CA Los Angeles 550000 4550000
  San  350000 7550000
  San Jose 400000 1850000
  Santa Clara 500000 1500000
  SubTotal 1800000 15450000
NY Bronx 500000 3000000
  Buffalo 500000 200000
  Manhantta 500000 3500000
  NYC 500000 2500000
  SubTotal 2000000 9200000
TX Austin 800000 250000
  Dallas 1500000 4500000
  Houston 1000000 2550000
  San Antonio 800000 500000
  SubTotal 4100000 7800000
Total   8400000 32550000

 

gordonknot.tight's picture
Joined: Apr 4 2013 - 2:41pm
Last seen: 6 years 6 months ago

3 Answers:

1

Hi ,

 

The above thing can be easily achieved with the help of making groups , for this case you can make a group based on the state and in the group footer you could put the subtotal and in the report total (summary section) you could put the field total. This would serve your purpose.

Hope that it helps

 

Regards,

Ankur

 

Ankur Gupta's picture
Joined: Jan 21 2013 - 10:36pm
Last seen: 1 month 1 week ago
0

Hi

What Ankur.gupta.aug said is correct, you need to have groups and

Look at this video http://www.youtube.com/watch?feature=player_detailpage&v=1ikJC2c_GVY&list=PL6370A684081DAE8F

This has the step by step approach to create subtotal

I tested the appraoch mentioned in the video and it work like a charm..

Good luck

k_tripura's picture
Joined: Apr 5 2013 - 11:16am
Last seen: 5 years 3 months ago
0

I have additional question: How to output subtotals in the summary section like this: 

 

STATE POPULATION AREA
AZ 500000 100000
CA 1800000 15450000
NY 2000000 9200000
TX 4100000 7800000
Total 8400000 32550000

 

gocko's picture
3
Joined: Jul 1 2009 - 6:42am
Last seen: 5 years 6 months ago
Feedback
randomness