Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Multiple tables display problem Post Reply Post New Topic
Author Message
Amit
Newbie
Newbie


Joined: 08 Mar 2007
Location: United States
Online Status: Offline
Posts: 4
Quote Amit Replybullet Topic: Multiple tables display problem
    Posted: 08 Mar 2007 at 4:24pm

Here's my scenario:  I'm trying to design a report that uses two tables: Payments and Discounts.  They are linked on a field, "ResID", and it's a left join from Payments to Discounts(so that every Payment shows, even if it there aren't Discounts for a ResID).  I'm grouping on Payments.ResID.  I want to design it so that for every group, it shows all the Payment records first, then every Discount record.  So it'll be something like:

Res1

  Res1.Payment1
  Res1.Payment2
 
  Res1.Discount1
  Res1.Discount2
 
Res2
 
  Res2.Payment1
etc.
 
 
I'm having so much trouble trying to design something like this...I've tried using multiple Details sections, but I keep getting information displayed more times than it needs to.  Does anybody have any suggestions?
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 08 Mar 2007 at 4:30pm
You need to use subreports. That is the only way to generate two separate lists coming from two different tables. Have the main report print the payments in the detail section. Then in the group footer put the subreport that prints the discount records. Join the two tables by ResID.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
Amit
Newbie
Newbie


Joined: 08 Mar 2007
Location: United States
Online Status: Offline
Posts: 4
Quote Amit Replybullet Posted: 08 Mar 2007 at 5:04pm
Thanks, that worked perfectly Clap.  And btw, I just ordered your book on Amazon...thanks for the quick and helpful reply!
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 08 Mar 2007 at 5:27pm
Glad it worked.   But my current book on Amazon is only for Visual Studio .NET 2003. The "Encyclopedia Series" won't be out for another couple of months. If you are using Crystal Reports XI, you might want to cancel your order and wait for the new book in May.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.032 seconds.