Meet Parekh

Meet Parekh

  • NA
  • 39
  • 949

wpf reportviewer for multiple reports

Apr 25 2018 5:19 AM
i have 5 reports and i want to open them all in same reportviewer in wpf.so how can i fetch dataset of any report when user click on any of these report from list and put that report in reportviewer? i dont want to if...else condition i want to create a general application for any report..
thanks in advance. 
 
 
private void View_click(object sender, RoutedEventArgs e)
{
rpv.RefreshReport();
rpv.ProcessingMode = ProcessingMode.Local;
rpv.LocalReport.ReportPath = s3;
ReportDataSource rps = new ReportDataSource("DataSet1",s3);
rpv.LocalReport.DataSources.Clear();
rpv.LocalReport.DataSources.Add(rps);
rpv.LocalReport.Refresh();
}
 
DataSet1 is name of my dataset but i want to fetch it from report xml version and want to store it into string.
 
 
 

Answers (4)