Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help With SQL Server - Report Builder 3.0. - 1 to Many

9 views
Skip to first unread message

Andy

unread,
Apr 8, 2014, 2:20:49 PM4/8/14
to
Hi Everyone

Perhaps I'm doing this all wrong but I want to know how to show in a single report data from 2 tables that are joined in a 1 to many relationship.

My SELECT is below. Basically for every 1 record I have in the calllog table, I may have many joined records from the asgnmnt table. How do I get the report to show the one record in calllog and the records in asgnmnt on each report line. Report builder will only show the first joined record from the asgnmnt table only.

Please help.
Andy



SELECT priority, calllog.custid, category, calltype, callstatus, assignee,
asgncmnt, groupname
FROM calllog
JOIN asgnmnt on calllog.callid = asgnmnt.callid
WHERE callstatus <> 'Closed' AND resolution = ''
ORDER BY priority

Erland Sommarskog

unread,
Apr 8, 2014, 5:11:29 PM4/8/14
to
Andy (andy.m...@siemens.com) writes:
> Perhaps I'm doing this all wrong but I want to know how to show in a
> single report data from 2 tables that are joined in a 1 to many
> relationship.
>
> My SELECT is below. Basically for every 1 record I have in the calllog
> table, I may have many joined records from the asgnmnt table. How do I
> get the report to show the one record in calllog and the records in
> asgnmnt on each report line. Report builder will only show the first
> joined record from the asgnmnt table only.

These newsgroups are not really dead, but they sure feel funny, since
Microsoft abandoned their support for them. I try to answer the questions
I know, but Report Viewer is out of my league. I suggest that you try
the MSDN forum at
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?forum=sqlreportingservices


--
Erland Sommarskog, Stockholm, esq...@sommarskog.se
0 new messages