Results 1 to 2 of 2

Thread: [RESOLVED] Bind Programmatically Created DataTable to RDLC Tablix/SubReport

  1. #1
    Addicted Member
    Join Date
    Aug 11
    Posts
    253

    Resolved [RESOLVED] Bind Programmatically Created DataTable to RDLC Tablix/SubReport

    I have a datatable that is created at run time (not populated from a database.) I'm trying to figure out how to bind this datable to either a tablix or to a subreport.

    My current code is as such:

    vb Code:
    1. Dim rds = New ReportDataSource()
    2. rds.Name = "CutList"
    3. rds.Value = dtCL
    4. ReportViewer.LocalReport.DataSources.Add(rds)

    This code runs when the applicable report is selected from a combobox on the ReportViewer. I have verified that the datatable contains the proper data when the code fires but I'm not sure if I'm heading in the right direction or where I should go from here. Any suggestions are appreciated.

  2. #2
    Addicted Member
    Join Date
    Aug 11
    Posts
    253

    Re: Bind Programmatically Created DataTable to RDLC Tablix/SubReport

    I managed to figure it out. I created a dummy dataset with a datatable identical in design to the one I was generating programmatically, set that as the datasource of the tablix and then filled the dummy with the programmatically created datatable. It seems to be working fine, now.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •