private void GenerateReport(string strRptName, string spname) { try { FormHelpers.CursorWait(true); if (strRptName == "") { MessageBox.Show("No Report Available!"); } else { frm_ReportViewer frv = new frm_ReportViewer(); frv.report = new ReportTable(); frv.report.ReportName = strRptName; frv.report.ReportPath = ObjectFinder.ReportPath; frv.report.SourceTable = rptdetails.SP_dtComponent(spname, UserSettings.LogInYear); if (frv.report.SourceTable == null || frv.report.SourceTable.Rows.Count == 0) { throw new Exception("Report no Data!"); } frv.Text = "Components Report"; frv.StartPosition = FormStartPosition.CenterScreen; frv.Show(); } } catch (Exception ex) { MessageHelpers.ShowError(ex.Message); } finally { FormHelpers.CursorWait(false); } }
private void PreviewReportSummaryWDetails(string spname, string strRptName) { try { FormHelpers.CursorWait(true); frm_ReportViewer frv = new frm_ReportViewer(); frv.report = new ReportTable(); frv.report.ReportName = strRptName; frv.report.ReportPath = ObjectFinder.ReportPath; frv.report.SourceTable = rptdetails.SP_GeneratePriceListWDetails(spname, UserSettings.LogInYear); if (frv.report.SourceTable == null || frv.report.SourceTable.Rows.Count == 0) { throw new Exception("Report no Data"); } frv.Text = "Price List Report with Details"; frv.StartPosition = FormStartPosition.CenterScreen; frv.Show(); } catch (Exception ex) { MessageHelpers.ShowError(ex.Message); } finally { FormHelpers.CursorWait(false); } }
private void PreviewComparison(string strRptName) { try { FormHelpers.CursorWait(true); frm_ReportViewer frv = new frm_ReportViewer(); frv.report = new ReportTable(); frv.report.ReportName = strRptName; frv.report.ReportPath = ObjectFinder.ReportPath; frv.report.SourceTable = rptdetails.SP_GeneratePriceListComparison(Convert.ToInt32(mcbofrstYear.SelectedValue), Convert.ToInt32(mcboscndYear.SelectedValue), BPSUtilitiesV1.NZ(mcboCategory.SelectedValue, "").ToString()); if (frv.report.SourceTable == null || frv.report.SourceTable.Rows.Count == 0) { throw new Exception("Report no Data"); } frv.Text = "Price List Comparison Report"; frv.StartPosition = FormStartPosition.CenterScreen; frv.Show(); } catch (Exception ex) { MessageHelpers.ShowError(ex.Message); } finally { FormHelpers.CursorWait(false); } }
private void PreviewReportSummary(string strRptName) { try { FormHelpers.CursorWait(true); frm_ReportViewer frv = new frm_ReportViewer(); frv.report = new ReportTable(); frv.report.ReportName = strRptName; frv.report.ReportPath = ObjectFinder.ReportPath; frv.report.SourceTable = rptdetails.SP_GeneratePriceList(UserSettings.LogInYear, BPSolutionsTools.BPSUtilitiesV1.NZ(mcboCategory.SelectedValue, "").ToString()); if (frv.report.SourceTable == null || frv.report.SourceTable.Rows.Count == 0) { throw new Exception("Report no Data!"); } frv.Text = "Price List Report"; frv.StartPosition = FormStartPosition.CenterScreen; frv.Show(); } catch (Exception ex) { MessageHelpers.ShowError(ex.Message); } finally { FormHelpers.CursorWait(false); } }
private void Preview(string strRptName) { try { FormHelpers.CursorWait(true); frm_ReportViewer frv1 = new frm_ReportViewer(); frv1.report = new ReportTable(); frv1.report.ReportName = strRptName; frv1.report.ReportPath = ObjectFinder.ReportPath; frv1.report.SourceTable = rptdetails.SP_GenerateVariance(mcboMonth.SelectedIndex + 1, Convert.ToInt16(mtxtYear.Text)); if (frv1.report.SourceTable == null || frv1.report.SourceTable.Rows.Count == 0) { throw new Exception("Report no Data!"); } frv1.Text = "Variance Costing Report"; frv1.StartPosition = FormStartPosition.CenterScreen; frv1.Show(); } catch (Exception ex) { MessageHelpers.ShowError(ex.Message); } finally { FormHelpers.CursorWait(false); } }
private void button1_Click(object sender, EventArgs e) { DataTable dt = _common.DataGridView2DataTable(dgv_Job, "JobSheet", 0); string From = dtp_from.Value.ToString("dd/MM/yyyy"); string To = dtp_to.Value.ToString("dd/MM/yyyy"); frm_ReportViewer _objfrm_ReportViewer = new frm_ReportViewer(); SendData _obj = new SendData(_objfrm_ReportViewer.JobCardList); _obj(dt, From, To); }
private void PreviewFSMT(string strRptName, string spname) { frm_ReportViewer frv2 = new frm_ReportViewer(); frv2.report = new ReportTable(); frv2.report.ReportName = strRptName; frv2.report.ReportPath = ObjectFinder.ReportPath; frv2.report.SourceTable = rptdetails.SP_SMTRaw2017(spname, mtxtItemNo.Text, UserSettings.LogInYear); if (frv2.report.SourceTable == null || frv2.report.SourceTable.Rows.Count == 0) { throw new Exception("Report no Data!"); } frv2.Text = "Standard Costing Report"; frv2.StartPosition = FormStartPosition.CenterScreen; FormHelpers.ShowForm(frv2); }
private void PreviewF2017(string strRptName) { frm_ReportViewer frv1 = new frm_ReportViewer(); frv1.report = new ReportTable(); frv1.report.ReportName = strRptName; frv1.report.ReportPath = ObjectFinder.ReportPath; frv1.report.SourceTable = dtgnrtd; frv1.report.SubDataSources = rptdetails.SP_Signatory("Standard Costing Report"); if (frv1.report.SourceTable == null || frv1.report.SourceTable.Rows.Count == 0) { throw new Exception("Report no Data!"); } frv1.Text = "Standard Costing Report"; frv1.StartPosition = FormStartPosition.CenterScreen; FormHelpers.ShowForm(frv1); }
private void bttn_monthwiseReport_Click(object sender, EventArgs e) { if (oPrintersetting.ShowDialog() == DialogResult.OK) { foreach (DataRow dtr in _objCommon.DataGridView2DataTableSelected(dgv_SixMonthReport, "table").Rows) { try { frm_ReportViewer _objfrm_ReportViewer = new frm_ReportViewer(); SendDataNotice _obj = new SendDataNotice(_objfrm_ReportViewer.ReceiveDataNotice); _obj(dtr["GirviRecordNo"].ToString(), dtr["KhatawaniNo"].ToString().Trim(), "Other", oPrintersetting.PrinterName); _objfrm_ReportViewer.Show(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } if (rbt_threemonths.Checked == true) { ThreeMonths(); } else if (rbt_sixmonth.Checked == true) { fillgrid(); } else if (rbt_ninemonths.Checked == true) { NineMonths(); } else { twelthMonths(); } } else { } }
private void PreviewFPR(string itemno, string strRptName, string spname) { if (strRptName == "") { throw new Exception("No Report Available!"); } frm_ReportViewer frv3 = new frm_ReportViewer(); frv3.report = new ReportTable(); frv3.report.ReportName = strRptName; frv3.report.ReportPath = ObjectFinder.ReportPath; frv3.report.SourceTable = rptdetails.SP_PreviewItemDetails(spname, itemno, UserSettings.LogInYear); frv3.report.SubDataSources = rptdetails.SP_PreviewItemDetails("sp_ItemDetailsPI", itemno, UserSettings.LogInYear); frv3.report.SubDataSources1 = rptdetails.SP_PreviewItemDetails("sp_ItemDetailsVP", itemno, UserSettings.LogInYear); frv3.report.SubDataSources2 = rptdetails.SP_PreviewItemDetails("sp_ItemDetailsAssy", itemno, UserSettings.LogInYear); if (frv3.report.SourceTable == null || frv3.report.SourceTable.Rows.Count == 0) { throw new Exception("Report no Data!"); } frv3.Text = "Item Details Report"; frv3.StartPosition = FormStartPosition.CenterScreen; FormHelpers.ShowForm(frv3); }