chomikcampeon Posted June 24, 2010 Share Posted June 24, 2010 Good Morning People,Another Issue, I put into different threads because It is different but I have the problem on the same report. I am a dummy with JReports, with ireports, I have a SQL which returns a title for Crosstab column equals, that is : COLUMN2 COLUMN3 COLUMN1A B C And I see on PDF report this result: COLUMN1 COLUMN2 COLUMN3 C A B Technical Enviroment:OO. SSS : Windows XPDDBB : Oracle 9.iJR : 3.7.1Could be this an issue of 7.1 ????Thanks in advanceRuben Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted June 25, 2010 Share Posted June 25, 2010 JasperReports prints the records in the same order they are returned by the data source. So check the order by clause of your sql query.Giulio Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted June 25, 2010 Share Posted June 25, 2010 ops. I got it not that you are talking about a crosstab, do you?I think JasperReports orders the columns when printing a crosstab. In 99% of the cases this is a good thing, especially when you have a lot of data inside the crosstab. Why should it set the order of the columns based on the values in the first row of data?Am I missing something?Giulio Link to comment Share on other sites More sharing options...
chomikcampeon Posted June 25, 2010 Author Share Posted June 25, 2010 Good Morning Guilio ,First , thanks for your answer and your time.Well, this is the Workflow :- First we show every result in html and then we have to show into the same results on PDF. What is the problem? , the columns are order by a query, so, as far as I understand you we should change the query and if it is possible order alphabetically , shouldn´t you? Yours Faithfully, Ruben Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted June 25, 2010 Share Posted June 25, 2010 No, sorry, what I mean is that I don't think there is a way to control the columns order. Whatever is the data order, JasperReports will sort the data. The sorting is based on the column value (which may be a string link in your case, but even a date, an year or a number).The only possible solution I see is to alias your column, i.e.:001_COLUMN_2, 002_COLUMN_3, 003_COLUMN_1If you are then saying that columns are ordered differently when the report is exported in different formats... well I would be surprised. Giulio Link to comment Share on other sites More sharing options...
chomikcampeon Posted June 28, 2010 Author Share Posted June 28, 2010 Good Morning Guilio,Sorry I did not explain it correctly: I have a Web Page with some results form Database which are presented in HTML , nothing with JReports and its tool for report in HTML.Then I use JReports for writting the report in PDF. My problem is I want to present the results on the same way as they are presented in HTML , the problem is JR change the order of columns.As far as I understand I could change the name of the alias of the columns for mainteing the same order. Thank you very much for your time and pacienceBest Regards Ruben 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