Tuesday, 29 October 2013

Print Page margin Setup in RDLC Reports...

 PageSettings ps = new PageSettings(); //Declare a new PageSettings for printing
                    ps.Landscape = false; //Set True for landscape, False for Portrait
                    ps.Margins = new Margins(47, 43, 149, 1); //Set margins
                    //Choose paper size from the paper sizes defined in ur printer.
                    //Here we use Linq to quickly choose by name

                    ps.PaperSize =
                        (from PaperSize p
                        in ps.PrinterSettings.PaperSizes
                         where p.PaperName == "Legal"
                         select p).First();
                    //Alternatively you can set the paper size as custom
                    //ps.PaperSize = new PaperSize("MyPaperSize", 100, 100);

                    reportViewer1.SetPageSettings(ps);




Report Dynamic File name while saving into PDF/word/excel



this.reportViewer1.LocalReport.DisplayName = "Report Name";

No comments:

Post a Comment

SQL SERVER – Disk Space Monitoring – Detecting Low Disk Space on Server

CREATE PROCEDURE [CSMSDVLP].[DiskSpaceMonitor] @mailProfile nvarchar(500), @mailto nvarchar(4000), @threshold INT, @logfile nvarchar(40...