title: Join two tables and return data from both
body: <p>I have three tables as.</p>
  
  <pre><code>**Table 1**                 **Table 2**                   **Table 3**
   Lot_no(pk)                  Lot_no(pk/fk)                    Lot_no(fk)
   Name                        job type                        Material
   Phone                      Printing qty                     Trim
  </code></pre>
  
  <p>look at sample data </p>
  
  <hr>
  
  <pre><code> **Table 1**             **Table 2**                      **Table 3**
  
    1 Mian Sultan xyz        1 Reverse 50,000pcs               1 PVC 20
    2 Mian Usman xyz         2 New 10,000pcs                   1 INK 30  
                                                               2 MILKY 25 
                                                               2 INK 35
  </code></pre>
  
  <hr>
  
  <p>I just want to show data from table 2 &amp; table 3 on the basis of lot_no.
  for example user enter lot_no=1 then result should be displayed as</p>
  
  <pre><code>1    Reverse  50,000pcs  
  1    PVC  20
  1    INK  30
  </code></pre>
  
  <p>if user enter lot_no=2 then similarly </p>
  
  <pre><code>2    New      10,000pcs
  2    MILKY     25
  2    INK       35
  </code></pre>
  
  <p>my query is as follows....
  @lotnum int (Variable declaration in stored procedure)</p>
  
  <pre><code>SELECT table2.lot_no, table2.job_type, table2.printing qty,
  table3.material, table3.trim
  FROM table2
  INNER JOIN table3 ON (table2.lot_no=table3.lot_no)
  WHERE table2.lot_no=@lotnum AND table3.lot_no=@lotnum;
  </code></pre>
  
  <p>it shows me the Correct result but when i use this in Crystal Report it Shows only..... when lot_no=1 </p>
  
  <pre><code>1    Reverse  50,000pcs  
  1    PVC  20
  </code></pre>
  
  <p>it don't show </p>
  
  <pre><code>1    INK  30
  </code></pre>
  
  <p>Similar case when lot_no=2.
  Please Guide me thanks.</p>