Exposing a DataTable for use in Report Wizard RRS feed

  • Question

  • I am getting started using Visual Studio 2010 to create some client-side reports. I have a programatically-generated DataTable in a class, to be used for the data of a report table, but when I try to use the Report Wizard to get that object (the DataTable) as a data source, it won't let me. Is there any way to do that, so I don't have to create the 20-odd properties for each of the DataTable columns, and make the enclosing class as my data source? Thanks for any input here.
    Friday, November 16, 2012 2:09 PM


  • Report Wizard is not capable to find out your runtime data table instance hence it will not work. Visual Studio report wizard need a schema of your data source, hence you can create schema of your datatable by writing this code


    and add the created .xsd to your project with Add-Existing Item then use this .xsd as data source for your report wizard.

    Lingaraj Mishra

    • Marked as answer by Alexander Sun Friday, December 7, 2012 2:40 AM
    Saturday, November 17, 2012 4:36 PM