[Jasper Studio] Group Value in Table Report

Hi All,
 
i'm a new in the community,
I use Jasper Studio 6.0.3 Community Edition and have a problem with a Table Report.
in details, my dataset extracts the value  and i' trying to build a Table Report  with Fields and Vairiable !!
 
the Result is this : 
 
$F{Field1}    -  $F{Field2}    -  $V{Variable1}    -   $V{Variable2} 
     A                          20                          10                             4              
     A                          10                           5                              2              
     B                          30                          10                             1              
     B                          40                          20                             1              
     C                          20                          10                             3              
 
 
now i would like to GROUP the result on the $F{Field1} ....
 
 
$F{Field1}    -  $F{Field2}    -  $V{Variable1}    -   $V{Variable2} 
     A                          30                          15                             6               
     B                          70                          30                             2              
     C                          20                          10                             3
 
 
how is it possible with Jasper studio 6.0.3...??
 
Thanks to all
 
Max
mm972's picture
161
Joined: Jan 21 2015 - 2:58am
Last seen: 3 years 3 months ago

3 Answers:

Do you use a SQL-query dataset? In that case you could use GROUP BY in your expression:

SELECT *
FROM Table
GROUP BY Field1

 

gert_1's picture
796
Joined: Aug 7 2014 - 12:25am
Last seen: 7 years 6 months ago

Thanks very much Gert !

I know is possible to use a group by expression in Sql statement
but i want to know if is possible group the result directly in the table 
in the statement I extract other data and if I use Group by expression i lose other data

do you know if is possible group only the Table Data..??

thank Max 

 

 

mm972's picture
161
Joined: Jan 21 2015 - 2:58am
Last seen: 3 years 3 months ago

This is possible with Jasper as well I think (as I learned a week ago), but I think it isn't possible with tables: you should use Crosstables.

They are a little harder to understand and are a little buggy sometimes, but they work really good. You can:

  • Sort rows on one specific column
  • Fetch the result if it's integer (/number) as 'Sum' 'Count' 'Avarage' etc.

And you can use 'Totals' as well (so total value of A + B + C on 1 row a.e.).

 

I think/hope this is an answer to your question. Let me know!

gert_1's picture
796
Joined: Aug 7 2014 - 12:25am
Last seen: 7 years 6 months ago

thank you gert for your suggestion, now i try to use a crosstab instead of Table...

mm972 - 8 years 3 months ago
Feedback
randomness