title: Crystal Reports grouping two tables based on the primary key of one table
body: <p>I have 2 tables:</p>
  
  <ol>
  <li>Product
  fields are:    prod_no (primary key), prod_name</li>
  <li>Sales
  fields are:    sal_no, sal_date, cust, prod1 (foreign key i.e. prod_no), prod2 (foreign key i.e. prod_no), fst_qty, snd_qty</li>
  </ol>
  
  <p>I want to sort my report based on prod_no.</p>
  
  <p>Example:
  Product</p>
  
  <h2>prod_no  prod_name</h2>
  
  <pre><code> 1.      printer
  
   2.      paper
  
   3.      cartridge
  </code></pre>
  
  <p>Sales</p>
  
  <h2>sal_no sal_date customer prod1 prod2 fst_qty snd_qty</h2>
  
  <pre><code>  1    5-sep-09   aaa        1      3      2        3
  
    2    5-sep-09   bbb        2      3      1        1
  
    3    5-sep-09   ccc        1      2      3        4
  </code></pre>
  
  <p>I want a report like this:</p>
  
  <p>prod_no</p>
  
  <p>1</p>
  
  <h2>         sal_no   sal_date   customer   qty</h2>
  
  <pre><code> 1     5-sep-09    aaa        2
   3     5-sep-09    ccc        3
  </code></pre>
  
  <p>2</p>
  
  <pre><code> 2     5-sep-09    bbb        1
   3     5-sep-09    ccc        4
  </code></pre>
  
  <p>3</p>
  
  <pre><code> 1     5-sep-09    aaa        3
   2     5-sep-09    bbb        1
  </code></pre>