Fek Posted June 13, 2007 Share Posted June 13, 2007 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 unionselect name as "Name", 0 as "Fake", 1 as "Fake2" from bubu On both databases teh result would be the same:Name01, 1, 0Name02, 1, 0Name01, 0, 1Name02, 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:Name01Name02 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:Name01Name02Name01Name02 The Oracle result:Name01Name02 Why this difference? I need the oracle result for the DB2 database, but how???? Greetings Fek Link to comment Share on other sites More sharing options...
zoranl Posted June 14, 2007 Share Posted June 14, 2007 Try to add "order by 1" to your select statement. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now