Jump to content
Changes to the Jaspersoft community edition download ×

statistic report creation


2004 IR Help

Recommended Posts

By: jasper_new - jasper_new

statistic report creation

2004-08-12 07:00

Hi everybody.

I am trying to create a statistic report that gets data from several tables.

As a result a must have a table where the columns are created according the radio button choice, the same with rows.

Ex.:

---------Type1-----Type2-----Type3-----Total

Level1--- 5 ------- 6 ------- 1---------12--

 

Level2---- 6 ------- 12 -------- 4 ---------22--

 

Leve3---- 5 ------- 0 --------- 3 -------- 8---

 

Total ----- 16 ------ 18 -------- 8-------- 42

 

Here Type1, Type2, Type3 - are the radio button choice of the field Type in DB. And Level1, Level2, Level3 are the radio button choice of the field Level as well.

Type and Level are in different DB tables and must be calculated according the identical ID.

 

Is it possible to create a report like this using JasperReport and iReport?

I cannot figure out how to make groups in columns and totals in all directions.

 

Thanks.

 

 

 

 

 

 

 

 

By: Giulio Toffoli - gt78

RE: statistic report creation

2004-08-18 04:06

 

This is a tipical crosstab report.

This is not directly supported in JasperReports but there are several ways to fix this hole preformatting your data.

 

Giulio

 

 

 

 

By: jasper_new - jasper_new

RE: statistic report creation

2004-08-18 07:44

Thanks for the answer. Could you please specify those ways of preformating data?

I am using Oracle 9i, can I use Views to do this?

 

For now I put this sql statement as a report query:

 

select table1.type, table2.level, table1.id from table1, table2 where table1.id=table2.id order by table2.level, table1.type.

 

The best result I got using iReport was:

 

Level 1

 

Type ------ Type 1

---------------3

Type ------ Type 2

---------------4

Total ----------7

 

Level 2

 

Type ------ Type 1

---------------2

Type ------ Type 2

---------------1

Total----------3

 

Level 3

 

Type ------ Type 1

---------------4

Type ------ Type 2

---------------1

Total----------5

 

But I need a result view to be as I posted.

How can I make columns?

 

Thank you,

Natasha

 

 

 

 

By: Andrew McLaughlin - pik0

RE: statistic report creation

2004-08-18 10:35

Your best bet is to probably reshape the data using a "view"...

 

Piko

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...