ReportViewer without DataSet (.xsd), just SqlDataSource

dpp picture dpp · Apr 14, 2011 · Viewed 9.7k times · Source

Is there any way I can create a report without using (.xsd) DataSet? I don't want to go through that way, I want to use SqlDataSource.

Okay, so this is what I did so far.

  1. I created a Report (.rdlc)
  2. A page (.aspx)
  3. On the page that I've created, I put a ReportViewer and SqlDataSource.

That's all, I don't know how to put them together.

Please help... I'm a newby...

Answer

Cᴏʀʏ picture Cᴏʀʏ · Apr 14, 2011

MSDN has several pages with ReportViewer samples and walkthroughs:

You don't have to use a DataSet; the ReportViewer data sources collection will take anything that is a collection, such as a list of objects. Here's just a couple more pages with examples:

Whenever I use the ReportViewer in local processing mode I use it in conjunction with a data mapper tool like iBatis and simply feed an IList<Something> of objects into it (wrapped in an ObjectDataSource).