Report Design
 Crystal Reports Forum : Crystal Reports .NET 2003 : Report Design
Message Icon Topic: Multiple tables Post Reply Post New Topic
Author Message
johnl
Newbie
Newbie


Joined: 11 Jun 2009
Location: Great Britain
Online Status: Offline
Posts: 2
Quote johnl Replybullet Topic: Multiple tables
    Posted: 11 Jun 2009 at 2:12am

Hi all

 

I’m losing my mind trying to solve this crystal reports.net with vb2008 problem, and wondered if you can help – your book doesn’t seem to cover this.

 

I have 4 tables

 

Lots, materials, pack rules, and QC history. The lot has 1 material code and many lot details. The lot also has 0 or multiple pack rules, and 0 or multiple QC history entries.

 

I am trying to lay out the form so that each lot only appears once and shows the pack rules(all for the lot) and QC history(all for the lot), as below:

 

 

Lot Code              Material Code      Status                Initial Quantity                 Quantity Remaining         

Lot001                   MatCode001         Passed               1500.00                                 1300.00                               
 

 

Pack Rule ID       Pack Size

1                        15

2                        25

3                        20

 

QC Amendment Date                    Amended By

20/10/2009                                         John L                  

21/10/2009                                         John L

25/10/2009                                         John L

 

 

I can’t use an SQL command because I need to loop through all the header fields and sub report header fields and change them to the required language (French, Spanish, Italian, German)

 

I can produce the required result only if I display the lot details with either the pack rules or QC history, and then add a sub report for the missing data, but I want all the details together on the report.

 

Please help me!!



Edited by johnl - 11 Jun 2009 at 2:12am
johnl
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 22 Jun 2009 at 2:16pm
do an outer join between the tables, so that only the records that match are displayed and not excluded.
 
In database expert, get to the links, and when you right click on them, you have the ability to select a right, left, or full outer join.  You will have to play around with them as 1) I don't use them 2) I don't which table is the 'right' table from the left.
 
In SQL it would be select * from lot left join pack on .... left join qc on ....
 
HTH
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.031 seconds.