private void get_all_metafiles() { if (this.metafiles.Count < this.total_pages) { //MessageBox.Show("Getting all metafiles"); var printersettings = this.GetCurentPrinterSettings(); var upp = new SSRSCommon.EMFRenderPrefs(); upp.PageOrientation = SSRSCommon.PageOrientation.Landscape; upp.PaperHeight = printersettings.DefaultPageSettings.PaperSize.Height / 100.0f; upp.PaperWidth = printersettings.DefaultPageSettings.PaperSize.Width / 100.0f; this.metafiles = SSRSCommon.RSUtil.RenderMetafilesForReport( this.rep_svc, this.rep_exec_svc, this.ReportPath, upp, -1 ); } }
private void preparemetafiles() { var printersettings = this.GetCurentPrinterSettings(); var upp = new SSRSCommon.EMFRenderPrefs(); upp.PageOrientation = SSRSCommon.PageOrientation.Landscape; upp.PaperHeight = printersettings.DefaultPageSettings.PaperSize.Height / 100.0f; upp.PaperWidth = printersettings.DefaultPageSettings.PaperSize.Width / 100.0f; int pages_to_get = 1; this.total_pages = this.rep_viewer_ctrl.GetTotalPages(); this.metafiles = SSRSCommon.RSUtil.RenderMetafilesForReport( this.rep_svc, this.rep_exec_svc, this.ReportPath, upp, pages_to_get ); }