RDLC SetPageSettings
-
Hi, Am using VS2008 Asp.net C#. I used Report.rdlc. I want to set A4size but 'SetPageSettings' function not enabled. It show error 'Does not contain a definition for SetPageSettings' Below code i used GlobalCS.sTraineeQry = sTrainQry1 + sTrainQry2 + sTrainQry3 + sTrainQry4 + sTrainQry5 + sTrainQry6 + sTrainQry7 + sTrainQry8 + sTrainQry9; //set Processing Mode of Report as Local ReportViewer1.ProcessingMode = ProcessingMode.Local; //set path of the Local report ReportViewer1.LocalReport.ReportPath = Server.MapPath("~/Session_RDLC.rdlc"); dsSession dsSes = GetData(GlobalCS.sTraineeQry);//new dsSession(); //ReportDataSource reportDataSource = new ReportDataSource(); //reportDataSource.Name = "dsSession_DataTable1"; //reportDataSource.Value = dsSes.Tables[0]; ReportDataSource reportDataSource = new ReportDataSource("dsSession_DataTable1", dsSes.Tables[0]); //ReportViewer1.LocalReport.DataSources.Clear(); System.Drawing.Printing.PageSettings ps = new System.Drawing.Printing.PageSettings(); ps.Landscape = true; ps.PaperSize = new System.Drawing.Printing.PaperSize("A4", 827, 1170); ps.PaperSize.RawKind = (int)System.Drawing.Printing.PaperKind.A4; ReportViewer1.SetPageSettings(ps);