1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| private void rapportBVD(ReportViewer rv, string rdlc, string nomFile, string guid)
{
rv.Reset();
dsGlobalTableAdapters.RPT_EditionBVDTableAdapter ta = new dsGlobalTableAdapters.RPT_EditionBVDTableAdapter();
dsGlobal.RPT_EditionBVDDataTable dt = new dsGlobal.RPT_EditionBVDDataTable();
ta.Fill(dt, guid);
ReportDataSource rds = new ReportDataSource();
rds.Name = "DataSet1";
dt.Columns.Add("MontantEnL", System.Type.GetType("System.String"));
dt.Rows[0]["MontantEnL"] = "textde test";
rds.Value = dt;
ReportParameter rp = new ReportParameter("Guid", guid);
rv.LocalReport.DataSources.Clear();
rv.LocalReport.ReportPath = "Reports\\" + rdlc;
rv.LocalReport.SetParameters(new ReportParameter[] { rp });
rv.LocalReport.DataSources.Add(rds);
rv.LocalReport.Refresh(); |
Partager