title: How to make comparison report in crystal report
body: <p>I am having  a problem in making a report to show the comparison between  present transaction result  and its future impact result  </p>
  
  <p>i am using vb.net and i am displaying  the report using the values in the data table  and so far  my data table shows record like this.
  In this record  f_id  = 1 in both  purchase  and sale transaction and it will increment  on both  if there are more transaction.
  I have to display the purchase transaction  which has f_id = 1 on the left and other  on the right side.Image 3 will tells you what am trying to say 
  <a href="https://i.stack.imgur.com/1ymwZ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1ymwZ.jpg" alt="data table result "></a>  </p>
  
  <p>currently my reports are displaying like this 
  <a href="https://i.stack.imgur.com/khfig.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/khfig.jpg" alt="old report style"></a></p>
  
  <p>but i want to display the report in this style  so that its much more easier to compare between the two. 
  <a href="https://i.stack.imgur.com/wCMvf.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wCMvf.jpg" alt="New report style"></a>
      here is my code that prints the data on the  report</p>
  
  <pre><code>Private Sub FutureTransaction()
  
      Dim sql = "SELECT client.cl_cname, company.co_sname, invmast.im_qty, invmast.im_rate, invmast.im_tdate,invmast.im_crate,invmast.im_tax,invmast.f_type,invmast.f_id"
      Sql += " FROM invmast "
      sql += "INNER JOIN company ON invmast.co_scode = company.co_scode "
      sql += "INNER JOIN  client ON invmast.cl_ccode = client.cl_ccode  and"
      sql += " invmast.fn_code = client.fn_code"
      sql += " where invmast.im_tdate&gt;='" &amp; dtpFromDate.Value.ToString("dd-MMM-yyyy") &amp; "' and invmast.im_tdate &lt;= '" &amp; dtpToDate.Value.ToString("dd-MMM-yyyy") &amp; "'"
      sql += " and invmast.f_type = 1 and im_qty &gt; 0"
      sql += "ORDER BY invmast.f_id"
  
      Dim dt As New DataTable
      Dim da = New SqlDataAdapter(sql, cnMain)
      da.Fill(dt)
      Dim rpt As New FutureTransaction
  
      'Dim rptt As New FutureTransaction()
      rpt.DataDefinition.FormulaFields("FundName").Text = "'" &amp; FundName &amp; "'"
      rpt.DataDefinition.FormulaFields("FromDate").Text = "'" &amp; dtpFromDate.Value.ToString("dd-MMM-yyyy") &amp; "'"
      rpt.DataDefinition.FormulaFields("ToDate").Text = "'" &amp; dtpToDate.Value.ToString("dd-MMM-yyyy") &amp; "'"
      rpt.Refresh()
      frmReportViewer.crvMain.ReportSource = rpt
      frmReportViewer.crvMain.Refresh()
      frmReportViewer.Show()
  
  End Sub
  </code></pre>
  
  <p>So hope you guys will help me out.</p>