views:

336

answers:

3

I created my report but I cant seem to bind the report viewer with the report source? I think they changed the way things are done?

+2  A: 

From SAP support site http://forums.sdn.sap.com/message.jspa?messageID=8995372

//Using the ReportDocument SDK
this._report = new ReportDocument();
this._report.Load(@"C:\Documents and Settings\Administrator\My Documents\Visual Studio 2010\Projects\CrystalReportWpfApplication1\CrystalReportWpfApplication1\CrystalReport1.rpt");
this.reportViewer.ViewerCore.ReportSource = this._report;
Hapkido
A: 

Thanks Hapkindo, have been searching for this on internet. sry if i bumb old thread :D

Irwan
A: 

This might be a very late answer, but might help others who are looking for a similar issue. If you want to Bind the ReportSource, You need to enclose the the CrystalReportViewer control within a WindowsFormsHost in a UserControl and declare a dependency property of type string. You need to set the ReportSource from here. You cannot directly bind it from XAML with the native control.

Bhuvan