How do I set the ReportDataSource.Value to a table in my DataSet.xsd ?
At "rds.Value = ClaimsDataSet.tblHeaderDataTable" I get error message " is a type which is not valid in the given context."
public void ConvertReportToPDF(string strReportPath)
{
LocalReport report = new LocalReport();
report.ReportPath = strReportPath;
ReportDataSource rds = new ReportDataSource();
rds.Name = "DataSet1"; // This refers to the dataset name in the RDLC file
rds.Value = ClaimsDataSet.tblHeaderDataTable // data from ClaimsDataSet.xsd
report.DataSources.Add(rds);
Byte[] mybytes = report.Render("PDF");
using (FileStream fs = File.Create(@"\\eris\Databases\claims\Claims2\test.pdf"))
{
fs.Write(mybytes, 0, mybytes.Length);
}
}