Last post Apr 21, 2013 01:02 PM by ValBavaria
Apr 18, 2013 09:28 AM|ahmedmii|LINK
I'm passing dataset to report viewer, but there're no data in the report?
This is the code I found in your fourm.
SqlConnection con = new SqlConnection();
protected void Page_Load(object sender, EventArgs e)
con.ConnectionString = connection.x;
private DataTable getData()
DataSet1 dss = new DataSet1();
string sql = "";
sql = "SELECT product_id, product_name from product";
SqlDataAdapter da = new SqlDataAdapter(sql, con);
DataTable dt = dss.Tables;
private void runRptViewer()
this.ReportViewer1.LocalReport.ReportPath = Server.MapPath("Report1.rdlc");
ReportDataSource rds = new ReportDataSource("DataSet1", getData());
Apr 18, 2013 09:45 AM|santosh.poojari|LINK
Refer this for more help.
Apr 18, 2013 09:56 AM|ahmedmii|LINK
it's different from the code I put. I used sql query and the website you put sql paramenter?
I don't know who it's going to help.
Apr 21, 2013 01:02 PM|ValBavaria|LINK
I have make a report with one procedure, loading a dataset, the report is working fine with this code:
ReportParameter p = new ReportParameter; p = new ReportParameter("cnpj",cnpj); this.reportViewer1.LocalReport.SetParameters(p); this.cargaPJTableAdapter.Fill(this.ifdcontroladoria3DataSet1.cargaPJ,cnpj); this.reportViewer1.RefreshReport();
my question is, I have add a second dataset based on another procedure named
cargaEND. How do I call the second dataset and pass the parameter to the second procedure? I have tried this with no sucess: