aspose file tools*
The moose likes JSP and the fly likes How to set the number of values per column Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "How to set the number of values per column" Watch "How to set the number of values per column" New topic
Author

How to set the number of values per column

Mahesh Lohi
Ranch Hand

Joined: Jun 22, 2009
Posts: 150
Hi all,

I wish to display 5 records per row. the 6th record must start from the 2nd row. Please help.
ex:
3 4 5 6 7
3 4 2 3 5
.
.
so on

Each record is retrived from DB.

Thank you in advance


Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

Did you forget to post your code?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
Bear Bibeault wrote:Did you forget to post your code?


Is that a serious question or are you nicely asking to come up with an approach first? ;)


JDBCSupport - An easy to use, light-weight JDBC framework -
Mahesh Lohi
Ranch Hand

Joined: Jun 22, 2009
Posts: 150
Sebastian Janisch wrote:
Bear Bibeault wrote:Did you forget to post your code?


Is that a serious question or are you nicely asking to come up with an approach first? ;)


Thank you for the quick reply

I have few records int the DB I would like only 5 reconds in each row. Onces executeQuery statement is executed the result will be in rs. Now the problem is how can I limit the recordes in each row to 5 in jsps

Thank you in advance
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
Think about it. What you need is a loop. Starting a new line means that whenever the run variable divided by 5 has no rest, there needs to be a new row.

Try yo come up with some code of your own. The hint above should help you...
Mahesh Lohi
Ranch Hand

Joined: Jun 22, 2009
Posts: 150
Sebastian Janisch wrote:Think about it. What you need is a loop. Starting a new line means that whenever the run variable divided by 5 has no rest, there needs to be a new row.

Try yo come up with some code of your own. The hint above should help you...


Thank you for your post

Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
Mahi Lohi wrote:

Thank you for your post



Could you post your code so others can profit from it ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to set the number of values per column