[Jasper Studio] Group Value in Table Report

0
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
41
Joined: Jan 21 2015 - 2:58am
Last seen: 2 years 7 months ago

3 Answers:

0

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
200
Joined: Aug 7 2014 - 12:25am
Last seen: 3 years 12 months ago
0

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
41
Joined: Jan 21 2015 - 2:58am
Last seen: 2 years 7 months ago
0

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
200
Joined: Aug 7 2014 - 12:25am
Last seen: 3 years 12 months ago

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

mm972 - 4 years 8 months ago
Feedback
randomness