private void pbPrint_Click(object sender, EventArgs e)
        {
            if (dataGridView1.RowCount <= 1)
            {
                return;
            }

            string reportFileName = "SmartMES_SinMyung.Reports.P1C04_MATERIAL_USE.rdlc";

            string reportParm1 = "생산기간 : ";
            string reportParm2 = "자재창고 : ";
            string reportParm3 = "자재분류 : ";

            reportParm1 = reportParm1 + dtpFromDate.Value.ToString("yyyy-MM-dd") + " ~ " + dtpToDate.Value.ToString("yyyy-MM-dd");
            reportParm2 = reportParm2 + cbDepot.Text;
            reportParm3 = reportParm3 + cbKind.Text;

            ViewReport_V viewReport = new ViewReport_V();

            viewReport.reportViewer1.ProcessingMode = ProcessingMode.Local;
            viewReport.reportViewer1.LocalReport.ReportEmbeddedResource = reportFileName;

            ReportParameter rp1 = new ReportParameter("ReportParameter1", reportParm1);
            ReportParameter rp2 = new ReportParameter("ReportParameter2", reportParm2);
            ReportParameter rp3 = new ReportParameter("ReportParameter3", reportParm3);

            viewReport.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3 });

            ReportDataSource rds = new ReportDataSource("DataSet1", sPMaterialUseQueryBindingSource);

            viewReport.reportViewer1.LocalReport.DataSources.Add(rds);
            viewReport.reportViewer1.LocalReport.Refresh();

            viewReport.ShowDialog();
        }
        private void pbPrint_Click(object sender, EventArgs e)
        {
            string reportFileName = "SmartMES_SinMyung.Reports.P1A01_CUSTOMER.rdlc";

            string reportParm1 = "매입/매출 구분 : ";
            string reportParm2 = "거래처명/대표자/주소 : ";
            string reportParm3 = "";

            reportParm1 = reportParm1 + cbFlag.Text;
            reportParm2 = reportParm2 + tbSearch.Text.Trim();
            reportParm3 = reportParm3 + "";

            ViewReport_V viewReport = new ViewReport_V();

            viewReport.reportViewer1.ProcessingMode = ProcessingMode.Local;
            viewReport.reportViewer1.LocalReport.ReportEmbeddedResource = reportFileName;

            ReportParameter rp1 = new ReportParameter("ReportParameter1", reportParm1);
            ReportParameter rp2 = new ReportParameter("ReportParameter2", reportParm2);
            ReportParameter rp3 = new ReportParameter("ReportParameter3", reportParm3);

            viewReport.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3 });

            ReportDataSource rds = new ReportDataSource("DataSet1", sPCustomerQueryBindingSource);

            viewReport.reportViewer1.LocalReport.DataSources.Add(rds);
            viewReport.reportViewer1.LocalReport.Refresh();

            viewReport.ShowDialog();
        }
Exemplo n.º 3
0
        private void pbPrint_Click(object sender, EventArgs e)
        {
            int id = Int32.Parse(lblID.Text.Substring(6, lblID.Text.Length - 6));

            if (id < 1)
            {
                lblMsg.Text = "출력할 설비 카드를 먼저 선택해 주세요.";
                return;
            }

            sP_MachineCard_SelectTableAdapter.Fill(dataSetP1D.SP_MachineCard_Select, id);


            string reportFileName = "SmartMES_SinMyung.Reports.P1D01_MACHINECARD.rdlc";

            ViewReport_V viewReport = new ViewReport_V();

            viewReport.reportViewer1.ProcessingMode = ProcessingMode.Local;
            viewReport.reportViewer1.LocalReport.ReportEmbeddedResource = reportFileName;

            ReportDataSource rds = new ReportDataSource("DataSet1", sPMachineCardSelectBindingSource);

            viewReport.reportViewer1.LocalReport.DataSources.Add(rds);
            viewReport.reportViewer1.LocalReport.Refresh();

            viewReport.ShowDialog();
        }
        private void pbPrint_Click(object sender, EventArgs e)
        {
            lblMsg.Text = "";

            if (dataGridView1.RowCount <= 0)
            {
                lblMsg.Text = "성적서 발행건이 선택되지 않았습니다.";
                return;
            }

            if (dataGridView1[8, 0].Value == null ||
                string.IsNullOrEmpty(dataGridView1[8, 0].Value.ToString()))
            {
                lblMsg.Text = "저장된 검사건만 성적서 출력이 가능합니다.";
                return;
            }

            string rorderID = dataGridView1[8, 0].Value.ToString();

            sP_QcFinal_PrintTableAdapter.Fill(dataSetP1E.SP_QcFinal_Print, rorderID);

            string reportFileName = "SmartMES_SinMyung.Reports.P1ED01_QC_FINAL.rdlc";

            ViewReport_V viewReport = new ViewReport_V();

            viewReport.reportViewer1.ProcessingMode = ProcessingMode.Local;
            viewReport.reportViewer1.LocalReport.ReportEmbeddedResource = reportFileName;

            ReportDataSource rds = new ReportDataSource("DataSet1", sPQcFinalPrintBindingSource);

            viewReport.reportViewer1.LocalReport.DataSources.Add(rds);
            viewReport.reportViewer1.LocalReport.Refresh();

            viewReport.ShowDialog();
        }
        private void pbPrint_Click(object sender, EventArgs e)
        {
            if (dataGridView1.RowCount <= 1)
            {
                return;
            }

            string reportFileName = "SmartMES_SinMyung.Reports.P1B12_BUY_ITEM.rdlc";

            string reportParm1 = "매입기간 : ";
            string reportParm2 = "품목명/규격 : ";
            string reportParm3 = "매입처 : ";

            reportParm1 = reportParm1 + dtpFromDate.Value.ToString("yyyy-MM-dd") + " ~ " + dtpToDate.Value.ToString("yyyy-MM-dd");

            if (string.IsNullOrEmpty(tbSearch.Text.Trim()))
            {
                reportParm2 = reportParm2 + "전체";
            }
            else
            {
                reportParm2 = reportParm2 + tbSearch.Text.Trim();
            }

            if (string.IsNullOrEmpty(tbCust.Text))
            {
                reportParm2 = reportParm2 + "전체";
            }
            else
            {
                reportParm3 = reportParm3 + tbSearch.Text;
            }

            ViewReport_V viewReport = new ViewReport_V();

            viewReport.reportViewer1.ProcessingMode = ProcessingMode.Local;
            viewReport.reportViewer1.LocalReport.ReportEmbeddedResource = reportFileName;

            ReportParameter rp1 = new ReportParameter("ReportParameter1", reportParm1);
            ReportParameter rp2 = new ReportParameter("ReportParameter2", reportParm2);
            ReportParameter rp3 = new ReportParameter("ReportParameter3", reportParm3);

            viewReport.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3 });

            ReportDataSource rds = new ReportDataSource("DataSet1", sPBuyItemQueryBindingSource);

            viewReport.reportViewer1.LocalReport.DataSources.Add(rds);
            viewReport.reportViewer1.LocalReport.Refresh();

            viewReport.ShowDialog();
        }
Exemplo n.º 6
0
        private void pbPrint_Click(object sender, EventArgs e)
        {
            if (dataGridView1.RowCount <= 1)
            {
                return;
            }

            string reportFileName = "SmartMES_SinMyung.Reports.P1B07_DELI_REPORT.rdlc";

            string reportParm1 = "출하일자 : ";
            string reportParm2 = "전표번호/거래처/영업담당/현장/품목명 : ";
            string reportParm3 = "";

            reportParm1 = reportParm1 + dtpDate.Value.ToString("yyyy-MM-dd");

            if (string.IsNullOrEmpty(tbSearch.Text.Trim()))
            {
                reportParm2 = reportParm2 + "전체";
            }
            else
            {
                reportParm2 = reportParm2 + tbSearch.Text.Trim();
            }

            reportParm3 = reportParm3 + "";

            ViewReport_V viewReport = new ViewReport_V();

            viewReport.reportViewer1.ProcessingMode = ProcessingMode.Local;
            viewReport.reportViewer1.LocalReport.ReportEmbeddedResource = reportFileName;

            ReportParameter rp1 = new ReportParameter("ReportParameter1", reportParm1);
            ReportParameter rp2 = new ReportParameter("ReportParameter2", reportParm2);
            ReportParameter rp3 = new ReportParameter("ReportParameter3", reportParm3);

            viewReport.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3 });

            ReportDataSource rds = new ReportDataSource("DataSet1", sPDeliReportQueryBindingSource);

            viewReport.reportViewer1.LocalReport.DataSources.Add(rds);
            viewReport.reportViewer1.LocalReport.Refresh();

            viewReport.ShowDialog();
        }
Exemplo n.º 7
0
        private void pbPrint_Click(object sender, EventArgs e)
        {
            lblMsg.Text = "";
            string sNo = tbNo.Text;

            if (string.IsNullOrEmpty(sNo))
            {
                lblMsg.Text = "저장된 출하건만 명세서 출력이 가능합니다.";
                return;
            }

            sP_Delivery_PrintTableAdapter.Fill(dataSetP1B.SP_Delivery_Print, sNo);

            string    sql        = @"select sum(amount+vat) from tb_delivery_sub where deli_id = '" + sNo + "'";
            MariaCRUD m          = new MariaCRUD();
            string    msg        = string.Empty;
            long      lTotAmount = long.Parse(m.dbRonlyOne(sql, ref msg).ToString());

            //

            string reportFileName = "SmartMES_SinMyung.Reports.P1B05_DELIVERY.rdlc";

            string reportParm1 = "합계금액 : ";

            reportParm1 = reportParm1 + new MyClass().Number2Hangle(lTotAmount) + " 원정";


            ViewReport_V viewReport = new ViewReport_V();

            viewReport.reportViewer1.ProcessingMode = ProcessingMode.Local;
            viewReport.reportViewer1.LocalReport.ReportEmbeddedResource = reportFileName;

            ReportParameter rp1 = new ReportParameter("ReportParameter1", reportParm1);

            viewReport.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp1 });

            ReportDataSource rds = new ReportDataSource("DataSet1", sPDeliveryPrintBindingSource);

            viewReport.reportViewer1.LocalReport.DataSources.Add(rds);
            viewReport.reportViewer1.LocalReport.Refresh();

            viewReport.ShowDialog();
        }
        private void pbPrint_Click(object sender, EventArgs e)
        {
            if (dataGridView1.RowCount <= 1)
            {
                return;
            }

            string reportFileName = "SmartMES_SinMyung.Reports.P1D04_MACHINE_TIME.rdlc";

            string reportParm1 = "가동기간 : ";
            string reportParm2 = "설비그룹 : ";
            string reportParm3 = "";
            string reportParmH = "";

            reportParm1 = reportParm1 + dtpFromDate.Value.ToString("yyyy-MM-dd") + " ~ " + dtpToDate.Value.ToString("yyyy-MM-dd");
            reportParm2 = reportParm2 + cbGrp.Text;

            TimeSpan ts = dtpToDate.Value - dtpFromDate.Value;

            reportParmH = ((ts.Days + 1) * 8).ToString();

            ViewReport_V viewReport = new ViewReport_V();

            viewReport.reportViewer1.ProcessingMode = ProcessingMode.Local;
            viewReport.reportViewer1.LocalReport.ReportEmbeddedResource = reportFileName;

            ReportParameter rp1 = new ReportParameter("ReportParameter1", reportParm1);
            ReportParameter rp2 = new ReportParameter("ReportParameter2", reportParm2);
            ReportParameter rp3 = new ReportParameter("ReportParameter3", reportParm3);
            ReportParameter rpH = new ReportParameter("ReportParameterH", reportParmH);

            viewReport.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3, rpH });

            ReportDataSource rds = new ReportDataSource("DataSet1", sPMachineTimeQueryBindingSource);

            viewReport.reportViewer1.LocalReport.DataSources.Add(rds);
            viewReport.reportViewer1.LocalReport.Refresh();

            viewReport.ShowDialog();
        }
        private void pbPrint_Click(object sender, EventArgs e)
        {
            lblMsg.Text = "";

            string sDate = dtpDate.Value.ToString("yyyy-MM-dd");

            sP_ProdOrder_PrintTableAdapter.Fill(dataSetP1C.SP_ProdOrder_Print, DateTime.Parse(sDate));


            string reportFileName = "SmartMES_SinMyung.Reports.P1C01_PROD_ORDER.rdlc";

            string reportParm1 = "생산일자 : ";
            string reportParm2 = "";
            string reportParm3 = "";

            reportParm1 = reportParm1 + dtpDate.Value.ToString("yyyy-MM-dd");


            ViewReport_V viewReport = new ViewReport_V();

            viewReport.reportViewer1.ProcessingMode = ProcessingMode.Local;
            viewReport.reportViewer1.LocalReport.ReportEmbeddedResource = reportFileName;

            ReportParameter rp1 = new ReportParameter("ReportParameter1", reportParm1);
            ReportParameter rp2 = new ReportParameter("ReportParameter2", reportParm2);
            ReportParameter rp3 = new ReportParameter("ReportParameter3", reportParm3);

            viewReport.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3 });

            ReportDataSource rds = new ReportDataSource("DataSet1", sPProdOrderPrintBindingSource);

            viewReport.reportViewer1.LocalReport.DataSources.Add(rds);
            viewReport.reportViewer1.LocalReport.Refresh();

            viewReport.ShowDialog();
        }