rajuchacha007 Posted May 6, 2010 Share Posted May 6, 2010 Hi experts,I have generated a report using ireport and I am exporting it through java as well. I wanted to order the data according to some other field rather than id or serial number. Therefore, I have removed id/serial number from the query and I am getting desirable reults. Now I want to keep serial numbers to this set of data. How should I achieve it? Do I need to add any field? or anything else. I will elaborate what I do need exactly. Assume I have a query like this,select employeeNumber,employeeName,employeeCity from emloyee following is the resultID Name City1 ABC NEW YORK2 PQR LONDON3 XYZ PARIS............................Now to get it ordered by city I changed query toselect employeeNumber,employeeName,employeeCity from emloyee order by emplyeeCity.......and i get like thisID Name City2 PQR LONDON1 ABC NEW YORK 3 XYZ PARIS.........................................I want to get IDs in sequence so I removed ID from queryselect employeeName,employeeCity from emloyee order by emplyeeCityPQR LONDONABC NEW YORK XYZ PARISNow I want these ID in sequence. like followingID Name City1 PQR LONDON2 ABC NEW YORK 3 XYZ PARIS What can I do to achieve in the ireport? I tried by adding an extra field in fields category but this didn't work. Do I need to write any expression for this? I would welcome your help,ideas and suggestions. Thanks in advance. Link to comment Share on other sites More sharing options...
slow Posted May 6, 2010 Share Posted May 6, 2010 try to use: a textfiled (type INTEGER) with predefined variable $V{REPORT_COUNT} for counting rows in report, ora textfiled (type INTEGER) with predefined variable $V{PAGE_COUNT} for counting rows per page... ____________________________________if it works... give me KARMA points please! : ) ____________________________________ Link to comment Share on other sites More sharing options...
rajuchacha007 Posted May 6, 2010 Author Share Posted May 6, 2010 @slow Thanks a lot friend. It worked fine. I will again bother you. 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