I'm developing an application in WPF and I need to insert some graphics into a report. I created two .RDLC files one called InfoGraphic and another of SubInfoGraphic. In my subreport I would like to add a graph containing some bank information that is obtained through a DataSet.
private void ImpRelatorio(object sender, RoutedEventArgs e)
{
RVInfoGrafico.Reset();
RVInfoGrafico.LocalReport.DataSources.Clear();
RVInfoGrafico.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(MSubreportProcessingEventHandler);
DataTable dt = GetData2();
ReportDataSource rds = new ReportDataSource("DataSet1", dt);
RVInfoGrafico.LocalReport.DataSources.Add(rds);
RVInfoGrafico.LocalReport.ReportEmbeddedResource = "Projeto.InfoGrafico.rdlc";
RVInfoGrafico.ProcessingMode = ProcessingMode.Local;
RVInfoGrafico.RefreshReport();
}
void MSubreportProcessingEventHandler(object sender, SubreportProcessingEventArgs e)
{
DataTable dt9 = GetData4();
e.DataSources.Add(new ReportDataSource("DataSet1",dt9));
}
When I insert a table or any other tool it works perfectly with the datasets and such ... I'm just having problems with Graph.