title: how to create RDLC report using multiple sql columns with same values to count in vb.net
body: <p>basically i m creating <strong><em>vb.net window application</em></strong> which can show the result in <strong><em>rdlc report...</em></strong></p>
  
  <p>at the back end it is <strong><em>SQL server 2008.</em></strong></p>
  
  <p>Is there any easy way to fill RDLC tablix based on row and column grouping.</p>
  
  <p>The situation is as follows.</p>
  
  <p>I have a table in SQL server like this</p>
  
  <pre><code>**Course       Adcat      sub1          sub2          sub3         sub4        sub5**
  
  Ba1           Reg        HL           Hlit          His          PS          Env
  
  Ba1           Reg        EL           Hlit          HS          Socio        Env
  
  Ba1           Pri        HL           His           Hlit         HS          Env
  
  Ba1           Reg        SL           Socio         Slit         PS          Env
  </code></pre>
  
  <p>This is just like a different course student registered in different categories and opted different subjects and it is stored in five columns as shown above.</p>
  
  <p>I just want to see the report in RDLC like this</p>
  
  <pre><code>    **Course        subject        Reg                          Pri**          
  
        BA1            HL           1                              1
  
                       EL           1                              0
  
                       SL           1                              0
  
                       Hlit         2                              1
  
                       His          1                              2
  
                       PS           1                              1
  
                       HS           1                              0
  
                       Socio        2                              0
  </code></pre>
  
  <p>AND SO NO.</p>
  
  <p>I just want to count the number of subjects from above mention five columns.</p>
  
  <p>Please help me for this</p>
  
  <p>i am using VB.NET window application and Sql server 2008.
  Thanx in advance.</p>
  
  <p>thank for response..
  i have created a sql query and saved it as subsummary in view.
  now how to call this from my vb.net application using button click.
  a code i was used are:</p>
  
  <pre><code>Public Sub Show_SubjectSummary()
          sqlQRY = "SELECT * FROM tblstudetail where" _
               &amp; "[session] = '2015' AND" _
               &amp; "[course] = 'B.A. I' AND" _
              &amp; "[ADstatus] LIKE 'OK'"
          ds = New DataSet
          da = New SqlDataAdapter(sqlQRY, Conn)
          da.Fill(ds, "tblstudetail")
          RDLCreportview.ReportViewer1.LocalReport.ReportEmbeddedResource = Application.StartupPath &amp; "\Report\SubjectSummary.rdlc"
          sReportDataSource.Name = "DataSet1"
          sReportDataSource.Value = ds.Tables(0)
          RDLCreportview.ReportViewer1.LocalReport.ReportPath = Application.StartupPath &amp; "\Report\SubjectSummary.rdlc"
          RDLCreportview.ReportViewer1.SetDisplayMode(DisplayMode.PrintLayout)
          RDLCreportview.ReportViewer1.RefreshReport()
          ds.Dispose()
          ds = Nothing
          RDLCreportview.ShowDialog()
          RDLCreportview.Dispose()
          Conn.Close()
      End Sub
  </code></pre>