Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Isabel
Starting Member
6 Posts |
Posted - 2006-02-24 : 18:45:42
|
I have a question about formatting a query output to be displayed properlyHere is some backgroud info:Tools:SQL reporting DesignerTables:1.Activity2.Attendees (activityid is foreign key in this table)I have the query in place , but having problems diplaying it neatly:query:select activityname,attendees from activity,attendeeswhere attendes.activityid = activity.activityidI am trying to diplay attendees for all the actiivties example:Appointment1: John,Smith,SteveAppointment2: Ray,Boband so on....How do generate this report so that all the attendees for a given activity are in one row (not a row for each attendee)any help will be appericated.Thanks. |
|
jhermiz
3564 Posts |
Posted - 2006-02-28 : 23:11:39
|
quote: Originally posted by Isabel I have a question about formatting a query output to be displayed properlyHere is some backgroud info:Tools:SQL reporting DesignerTables:1.Activity2.Attendees (activityid is foreign key in this table)I have the query in place , but having problems diplaying it neatly:query:select activityname,attendees from activity,attendeeswhere attendes.activityid = activity.activityidI am trying to diplay attendees for all the actiivties example:Appointment1: John,Smith,SteveAppointment2: Ray,Boband so on....How do generate this report so that all the attendees for a given activity are in one row (not a row for each attendee)any help will be appericated.Thanks.
you should make use of inner joins rather than simply comma seperating the tables. Your report is known as a cross tab or a matrix type report. You will simply need to group by the appointment or activity and place that in a single row first column of a MATRIX type report not your standard table report. On your X axis (right most column you will need to place your User Name or Employee Name field. Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]RS Blog -- [url]http://weblogs.sqlteam.com/jhermiz[/url] |
 |
|
|
|
|
|
|