views:

110

answers:

1

Hie Everyone

I have 1st time developed SSRS in my WPF application..

but there is problem in report viewing.. it gives error

DataSource Instace has not been supplied for dataset 'dataset1'

I have done following steps
1. develope ssrs
2. create windowsFormHostControl in XAML
3. get new reportviewer in code
4. reportviewer.processingmode=local
5. reportviewer.localreport.reportpath="path"
6. set reportdatasource
7. add datasource to reportviewer
8. refresh report
9. set windowsFormHost.child=reportviewer

What's wrong in it???
please help me...

+3  A: 

This error means you didn't provide a datasource with the same name the report is expecting. if you look at the RDL (or RDLC) in a text editor, there is a DataSources section, and in there each datasource has a name. In this case it is named "dataset1".

How did you add the ReportDataSource? If you do this at runtime, you need to provide it with the same name that the report is expecting

reportViewer.LocalReport.DataSources.Add(new ReportDataSource("dataset1", myDataSource));

Note the "dataset1", which is how the report associates this incoming data with its internal dataset definitions.

Matt Greer
thanx man.. you save my day... ur help is clear and touch...
DATT OZA