Quantcast
Channel: SQL Server Reporting Services
Viewing all articles
Browse latest Browse all 1418

ReportDataSource.Value to a table in my DataSet.xsd

$
0
0

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);
}
}


Viewing all articles
Browse latest Browse all 1418

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>