title: RDLC Expression
body: <p>I am creating one Invoice Report .rdlc using visual basic what I am trying to do is group wise calculation like Please guide me with this</p>
  
  <p>Example:</p>
  
  <p><a href="https://i.stack.imgur.com/hQecI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hQecI.png" alt="enter image description here"></a></p>
  
  <p>Tried adding datasource for VAT calculation but for amount column I am not getting any results in rdlc as for vat I am getting values in my rdlc</p>
  
  <pre><code>Dim connstring0 As String = String.Format("Server=127.0.0.1;Port=5432;Username=postgres;Password=Maestro;Database=IMS_DB;")
                  Dim conn0 As NpgsqlConnection = New NpgsqlConnection(connstring0)
                  conn0.Open()
                  Dim Command0 As NpgsqlCommand = New NpgsqlCommand("SELECT DISTINCT total_vat_onsales,SUM(amount) From invoice_withvat_table Where invoice_number = 'I20160711165711' GROUP BY total_vat_onsales", conn0) '(Select MAX(CAST(id AS bigint)) from  invoice_withvat_table)
                  'MessageBox.Show("SELECT DISTINCT total_vat_onsales,SUM(CAST(amount As numeric(18,2))) From invoice_withvat_table Where invoice_number = '" + vb_inviceno + "' GROUP BY total_vat_onsales")
                  Dim reader0 As NpgsqlDataReader = Command0.ExecuteReader()
                  Dim data_Table10 As New DataTable
                  data_Table10.Load(reader0)
                  reader0.Close()
                  conn0.Close()
                  ReportViewer1.LocalReport.DataSources.Clear()
                  ReportViewer1.LocalReport.DisplayName = "Invoice With VAT"
                  ReportViewer1.LocalReport.ReportPath = "Invoice_WithVAT.rdlc"
                  Dim rds As ReportDataSource
                  rds = New ReportDataSource("DataSet1", data_Table1)
                  Dim rds0 As ReportDataSource
                  rds0 = New ReportDataSource("DataSet2", data_Table10)
                  ReportViewer1.LocalReport.DataSources.Add(rds)
                  ReportViewer1.LocalReport.DataSources.Add(rds0)
                  Me.ReportViewer1.RefreshReport()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/fSmsB.png" rel="nofollow noreferrer">After Modification</a></p>
  
  <p>It gets in rdlc but what to do next o achieve further</p>