jackdawson Posted March 3, 2008 Share Posted March 3, 2008 Hi, Can anyone let me know if I can set the column size of a column in a report? What's happening with me is when I have 4 columns in a report, it prints the data till the end of the page and then starts printing in the second column and so on. If there is a way that I can set the column size so that once it prints 6rows in a column it should start printing in the next column, then that would be really great. Any suggestions please. Thanks. Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted March 4, 2008 Share Posted March 4, 2008 hi jackdawson, if the problem is how the space is used, you can ask JasperReports to will the report horizontally insead of vertically, you would get a record filling like: 1 | 2 | 3 | 45 | 6 | 7 | 8.... Instead of 1 | 4 | 72 | 5 | 83 | 6 | If your problem is really that you want no more than 6 records per column, inspite of how height is your report, you can create a group based of an expression like: new Integer( $V{REPORT_COUNT}.intValue()/6 ) This mean: every 6 records, create a new group.Now, if you set the group to go to a new column, you get what you need. Giulio Link to comment Share on other sites More sharing options...
jackdawson Posted July 22, 2008 Author Share Posted July 22, 2008 I tried to get the data in columns but I dont know why but this bizarre thing happens:1.) 1st column has 6 records displayed.2.) 2nd column has 6 records displayed3.) 3rd column has only 1 record displayed.4.) 4th column has 6 records displayed.5.) the rest of the printing starts in the next page and the remaining 5 records are displayed in each column.It seems very strange.Why would 1st, 2nd and 4th columns display 6 records and not the 3rd column?Thanks again for your help. Link to comment Share on other sites More sharing options...
jackdawson Posted July 22, 2008 Author Share Posted July 22, 2008 Report structure:Main report(say, report1) has a subreport(say, report2) which again has 2 subreports(say, report 3 and report 4 respectively). The reports 3 and 4 have queries that fetch the data and fill the report. I will attach a sample out. Please check that out.Thanks again for your help. Link to comment Share on other sites More sharing options...
jackdawson Posted July 22, 2008 Author Share Posted July 22, 2008 I dont see my attachment. It's gone. I attached it twice.This is strange. Anyways, this is what the attachment should have:I think my problem has something to do with the page dimensions. So here are the details about them:Reports Information:===================Report Page Height Page Width No. of Cols. Col. Width------ ----------- ---------- ------------ ------------Main(report1) 842px 595px 1 555 report2 200px 580px 1 580report 3 200px 550px 4 135report 4 200px 550px 4 135Sample output:==============Hour Count Hour Count Hour Count -------- --------- --------- -------- -------- -----------0 xx 6 xx 12 xx 13 xx1 xx 7 xx 14 xx2 xx 8 xx 15 xx3 xx 9 xx 16 xx4 xx 10 xx 17 xx 5 xx 11 xx 18 xxAnd, the rest of the data is printed on the next page one in each column. This is still more bizarre. Thanks again. Link to comment Share on other sites More sharing options...
jackdawson Posted July 24, 2008 Author Share Posted July 24, 2008 Problem resolved.I had to use COLUMN_COUNT instead of REPORT_COUNT.Thanks. Link to comment Share on other sites More sharing options...
jackdawson Posted July 24, 2008 Author Share Posted July 24, 2008 Problem resolved.I had to use $V{COLUMN_COUNT} instead of $V{REPORT_COUNT}.Thanks. 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