TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
vijay rd
1.6k
115
2.4k
Wpf reportviwer using xml as a l Datasource
Aug 12 2018 1:51 PM
I would like to know in this code what is missing. i can see the datable in the(ds. table) but i cannot see in the reportviwer in wpf . In windows application the bindingsource automatically sets when select report rdlc in reportviwer. But in wpf how.
_reportViewer.Load += ReportViewer_Load;
}
private void window_Loaded(object sender, RoutedEventArgs e)
{
}
private bool _isReportViewerLoaded;
private void ReportViewer_Load(object sender, EventArgs e)
{
DataSet ds = new DataSet();
ds.ReadXml("Data.xml");
ds.WriteXmlSchema("Data.xsd");
if (!_isReportViewerLoaded)
{
Microsoft.Reporting.WinForms.ReportDataSource reportDataSource1 = new
Microsoft.Reporting.WinForms.ReportDataSource();
reportDataSource1.Name = "DataSet1";
//Name of the report dataset in our .RDLC file
reportDataSource1.Value = ds.Tables;
ReportDataSource rds = new ReportDataSource("Name", ds.Tables[1]);
this._reportViewer.LocalReport.DataSources.Add(reportDataSource1);
this._reportViewer.LocalReport.ReportPath = "../../Report1.rdlc";
}
}
private void WindowsFormsHost_ChildChanged(object sender, System.Windows.Forms.Integration.ChildChangedEventArgs e)
{
}
}
}
Reply
Answers (
0
)
How to gain access to a Registry Key and delete all subkeys
DATEDIFF combined with UPDATE STATEMENT