I have a table in my report that shows cases, that are grouped by Court and
Case. Each case can have one or more defendants. How do I add the defendant
data to the table?
In other words, how do I add a sub-table in my current table and link by
Court and Case?HI,
The best way to me seems that you need a one-to-many relationship here. I
say one-to-many, as it seems unlikely that a defendant would me involved in
multiple cases. If so then you need to have a many-to-many n:n
Create a defendants table, with a foreign key. THe foreign key would then
contain the case key, thereby giveing one case the ability to have one or
more defendants. All thats left is to do the proper relation.
Robert
"Mike OKC" <MikeOKC@.discussions.microsoft.com> wrote in message
news:3CD766B4-487D-4DAD-8EC3-6120FBEFC8CA@.microsoft.com...
> I have a table in my report that shows cases, that are grouped by Court
and
> Case. Each case can have one or more defendants. How do I add the
defendant
> data to the table?
> In other words, how do I add a sub-table in my current table and link by
> Court and Case?
>|||I already have two tables. Case Table and Defentant Table. Its a one-many
join.
When I said table I mean the report table, the object off the toolbox. I
want the report table to show multiple defendants per case.
"Robert Bravery" wrote:
> HI,
> The best way to me seems that you need a one-to-many relationship here. I
> say one-to-many, as it seems unlikely that a defendant would me involved in
> multiple cases. If so then you need to have a many-to-many n:n
> Create a defendants table, with a foreign key. THe foreign key would then
> contain the case key, thereby giveing one case the ability to have one or
> more defendants. All thats left is to do the proper relation.
> Robert
> "Mike OKC" <MikeOKC@.discussions.microsoft.com> wrote in message
> news:3CD766B4-487D-4DAD-8EC3-6120FBEFC8CA@.microsoft.com...
> > I have a table in my report that shows cases, that are grouped by Court
> and
> > Case. Each case can have one or more defendants. How do I add the
> defendant
> > data to the table?
> >
> > In other words, how do I add a sub-table in my current table and link by
> > Court and Case?
> >
>
>|||Hello Mike,
I understand that you'd like to show cases and their defendants in one
report. If I'm off-base, please let me know.
Generally you shall use a query with inner join in dataset so that you
could list this informaiton in one report.
For example:
cases table: caseid, casename
casedefendants table: caseid, defendant
select cases.caseid, cases.name, casedefendants.defendant from cases inner
join casedefendants on cases.caseid=casedefendants.caseid
The report shall be sth like:
caseid casename defendant
1 case1 def1
1 case1 def2
2 case2 def3
2 case2 def4
If this does not meet your requirement, please feel free to let's know.
Thank you.
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Community Support
==================================================Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications
<http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx>.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
<http://msdn.microsoft.com/subscriptions/support/default.aspx>.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||I've changed my report to list boxes. This post is no longer required.
Thank you for your reply.
"Peter Yang [MSFT]" wrote:
> Hello Mike,
> I understand that you'd like to show cases and their defendants in one
> report. If I'm off-base, please let me know.
> Generally you shall use a query with inner join in dataset so that you
> could list this informaiton in one report.
> For example:
> cases table: caseid, casename
> casedefendants table: caseid, defendant
> select cases.caseid, cases.name, casedefendants.defendant from cases inner
> join casedefendants on cases.caseid=casedefendants.caseid
> The report shall be sth like:
> caseid casename defendant
> 1 case1 def1
> 1 case1 def2
> 2 case2 def3
> 2 case2 def4
> If this does not meet your requirement, please feel free to let's know.
> Thank you.
> Best Regards,
> Peter Yang
> MCSE2000/2003, MCSA, MCDBA
> Microsoft Online Community Support
> ==================================================> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications
> <http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx>.
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> <http://msdn.microsoft.com/subscriptions/support/default.aspx>.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
>
No comments:
Post a Comment