November 8, 2005 at 4:04 pm
I've got a requirement to show a single page report with 5 records (always 5, last five Interest Rate entries) in columns like:
12/15/2005 12/07/2005 11/23/2005 11/17/2005 11/10/2005
1.23 3.45 2.14 1.34 1.76
etc on down the page.
Each column is a seperate row in the data source. Is there a way to reference the actual rows in the table, or a way to get a table instead of displaying the data vertically, horizontally???
November 10, 2005 at 10:45 am
select top 5 date, interest_rate from table
order by date desc
November 10, 2005 at 10:59 am
Right, that gets me the Top 5 records. Simple. Now, how does one go about displaying the records across the page in columns?
My solution is 5 data sets, With a SQL stmt something like this
Select top 1 from (Select Top 5 from database order by date desc) order by date
This picks the top 5 by date, then when re-sorting in descending date order, the top one is the 5th record.
With this I am able to list each record seperately, with proper placement on the page.
November 10, 2005 at 1:00 pm
If you wanting something like the following then do use the table or list control?
Date Interest Rate
12/15/2005 1.23
12/07/2005 3.45
11/23/2005 2.14
11/17/2005 1.34
11/10/2005 1.76
Or do you want the date to be the column heading and the interest rate the row data? If so, then use the matrix control.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply