using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; using System.IO; using OakLeaf.MM.Main.WPF; namespace SamaanSystems.IBC.WPF { /// <summary> /// Interaction logic for ReportViewer.xaml /// </summary> public partial class InvoiceWithDetailReportViewer : ABusinessWindow { private string manifestNumbers; public InvoiceWithDetailReportViewer(string ManifestNumbers) { this.manifestNumbers = ManifestNumbers; InitializeComponent(); _reportViewer.Load += ReportViewer_Load; } private bool _isReportViewerLoaded; private void ReportViewer_Load(object sender, EventArgs e) { if (!_isReportViewerLoaded) { if (File.Exists("./Reports/InvoiceReport.rdlc")) { Microsoft.Reporting.WinForms.ReportDataSource reportDataSource1 = new Microsoft.Reporting.WinForms.ReportDataSource(); InvoiceReportDataSet dataset = new InvoiceReportDataSet(); dataset.BeginInit(); reportDataSource1.Name = "DataSet1"; reportDataSource1.Value = dataset.InvoicesSelectByManifestNumber; this._reportViewer.LocalReport.DataSources.Add(reportDataSource1); this._reportViewer.LocalReport.ReportPath = "./Reports/InvoiceReport.rdlc"; dataset.EndInit(); InvoiceReportDataSetTableAdapters.InvoicesSelectByManifestNumberTableAdapter invoiceTableAdapter = new InvoiceReportDataSetTableAdapters.InvoicesSelectByManifestNumberTableAdapter(); invoiceTableAdapter.ClearBeforeFill = true; invoiceTableAdapter.Fill(dataset.InvoicesSelectByManifestNumber, this.manifestNumbers); _reportViewer.RefreshReport(); _isReportViewerLoaded = true; } } } } }I have a feeling it has got something to do with the rdlc file not being found, but that's just a hunch, no scientific basis.