Beispiel #1
0
        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 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);
     }
 }
Beispiel #3
0
 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);
     }
 }
Beispiel #4
0
 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 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);
     }
 }
Beispiel #6
0
        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
            {
            }
        }