Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic columns in Report Writer

Status
Not open for further replies.

AndyH1

Programmer
Jan 11, 2004
350
GB
Ive been asked to create a report in Report writer (SQL 2008) in which we have the following

Category | Day 1 | Day 2 | Day 3 ....etc
________| Hours | Hours | Hours

For example
Date 17/1/14 | 18/1/14 | 19/1/14 ...
Hired Volvos 3 | 15 | 12
Hired fords 2 | 22 | 14

The problem is the customer wants to enter a period of days from startdate to an enddate (via the report) and this can vary, therefore the number of columns will vary and the column names (the dates) will also be different each time

Ive written a stored procedure that returns the data as above but am unclear how to get a dynamic property in Report writer to show different amount of columns for the days depended on the difference between the start and end dates input (as report parameters) by the user, or even if this is possible, or whether I'm just not thinking right in doing this. I've not had much experience with report writer and mainly its been fixed columns giving sums of figures, this one is showing the number of hours each day

Can anyone advise or point me to an article that might be relevant?
Thanks
Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top