public void ShowReportRequestPerson(QueryString.Search.RequestPersonFilter reportType) { ParamSearchPerson param = new ParamSearchPerson(); param.yearin = dcore.GetMaxYearin(); ShowReportRequestPerson(param, reportType); }
public void ShowReportRequestPerson(ParamSearchPerson param, QueryString.Search.RequestPersonFilter reportType) { try { var dataSource = dcore.GetSearchRequest(param, reportType); Reports.ReportDisplay f = new Reports.ReportDisplay(); if (!Constants.fullMode) { //f.ReportViewer.ShowExportButton = false; } string headerText = ""; if (reportType == QueryString.Search.RequestPersonFilter.RTC) { headerText = "รายชื่อเสนอความต้องการทหารกองประจำการลงสังกัด ศฝท."; } else { headerText = "รายชื่อเสนอความต้องการทหารกองประจำการไปสังกัดหน่วยต่างๆ"; } List <ReportParameter> reportParam = new List <ReportParameter>(); reportParam.Add(new ReportParameter("reportHeaderText", headerText)); reportParam.Add(new ReportParameter("yearin", param.yearin)); f.ReportViewer.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout); f.DisplayReport(dataSource, "Navy.Reports.ReportRequestPerson.rdlc", reportParam); f.Show(); } catch { throw; } }
private void ShowReportRequestPerson(QueryString.Search.RequestPersonFilter reportType) { try { rcore.ShowReportRequestPerson(reportType); } catch (Exception ex) { MessageBox.Show("พบข้อผิดพลาดในการเรียกดูข้อมูล .. " + ex.Message); } }