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.

 All Forums
 Development Tools
 Reporting Services Development
 sql reporting formatting question

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 properly

Here is some backgroud info:
Tools:
SQL reporting Designer

Tables:
1.Activity
2.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,attendees
where attendes.activityid = activity.activityid

I am trying to diplay attendees for all the actiivties example:
Appointment1: John,Smith,Steve
Appointment2: Ray,Bob
and 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 properly

Here is some backgroud info:
Tools:
SQL reporting Designer

Tables:
1.Activity
2.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,attendees
where attendes.activityid = activity.activityid

I am trying to diplay attendees for all the actiivties example:
Appointment1: John,Smith,Steve
Appointment2: Ray,Bob
and 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]
Go to Top of Page
   

- Advertisement -