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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Want to display data from a dataset horizontally

Status
Not open for further replies.

askingQuestions1978

Programmer
Aug 8, 2012
1
IE
I'm using MS VS 2005 Business Intelligence studio to create a report.

I've got a dataset which returns a person's ID, the month number and the total number of lessons they gave that month.

I need to display this in a table with the IDs going down the left hand side (only one row per distinct ID), and the month names across the top, with the total number of lessons for that ID for each month.

The user can choose any period they want, ie. January - March, May - December, the whole year - whatever!

I can show/hide the columns based on this choice, and I can also pass these months into the SPROC, and am getting the correct data returned (ie. just for the months chosen, inclusive). However, when I'm showing/hiding the colums, I'm doing this as the parameters are being chosen, so when I get the data back, I don't know how to put the correct number of lessons in the correct column. Normally, I'd just choose the relevant field from the dataset, ie. for each month column, I'd add a placeholder, then I'd choose 'numLessons' from the dataset as it's value, but my dataset has, say, 3 rows per ID, each with the ID, a month number, and the total lessons for that month. How do I display the total number of lessons horizontally for each ID? If I've shown/hidden the correct columns at the beginning, before the SQL query is even executed, I should have the correct columns ready to be filled by the dataset. I just need the numLessons to populate the table horizontally, instead of vertically.

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top