Jump to content
Changes to the Jaspersoft community edition download ×

Grouping problem with DB2 database


Fek

Recommended Posts

Hi,

 

I have a big problem.

Let us consider I have a table "Bubu" in my DB2-Database and also teh same table with the same content for a Oracle database.

Into the table there exists an column "name" with the values: "Name01", "Name02"

 

To demonstrate the problem I create a stupid query:

select name as "Name", 1 as "Fake", 0 as "Fake2" from bubu

union

select name as "Name", 0 as "Fake", 1 as "Fake2" from bubu

 

On both databases teh result would be the same:

Name01, 1, 0

Name02, 1, 0

Name01, 0, 1

Name02, 0, 1

 

Now I want to create an report which schow me only one name of the same type, so I want to se the follwing:

Name01

Name02

 

I know i can use distinct in the query but I want to show you the problem with iReport or perhaps jasperReports ????

 

So, I create a new report with iReport, use the query and go to the "Report Groups"-editor. There I create a new group with the expresion "$F{Name}".

In the nameGroupFooter I set the TextField with the expresion $F{Name}.

 

What do you mean its the difference between the reports executed on a Oralce database and a DB2 database?

 

The DB2 result:

Name01

Name02

Name01

Name02

 

 

The Oracle result:

Name01

Name02

 

 

 

Why this difference? I need the oracle result for the DB2 database, but how????

 

Greetings

 

 

Fek

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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...