private void frm_seisan_schedule_preview_Load(object sender, EventArgs e)
        {
            rpt_seisan_schedule_03 rpt = new rpt_seisan_schedule_03();
            //レポートへデータを受け渡す
            rpt.DataSource = ppt_dt;
            rpt.w_yyyymmdd = w_yyyymmdd;
            rpt.w_hd10 = w_hd10;
            rpt.w_hd11 = w_hd11;
            rpt.w_hd12 = w_hd12;
            rpt.w_hd20 = w_hd20;
            rpt.w_hd21 = w_hd21;
            rpt.w_hd30 = w_hd30;
            rpt.w_hd31 = w_hd31;
            rpt.w_hd40 = w_hd40;
            rpt.w_hd41 = w_hd41;
            rpt.w_hd50 = w_hd50;
            rpt.w_hd51 = w_hd51;

            rpt.Run();
            this.vwr.Document = rpt.Document;
        }
Ejemplo n.º 2
0
        private void frm_seisan_schedule_preview_Load(object sender, EventArgs e)
        {
            rpt_seisan_schedule_03 rpt = new rpt_seisan_schedule_03();

            //レポートへデータを受け渡す
            rpt.DataSource = ppt_dt;
            rpt.w_yyyymmdd = w_yyyymmdd;
            rpt.w_hd10     = w_hd10;
            rpt.w_hd11     = w_hd11;
            rpt.w_hd12     = w_hd12;
            rpt.w_hd20     = w_hd20;
            rpt.w_hd21     = w_hd21;
            rpt.w_hd30     = w_hd30;
            rpt.w_hd31     = w_hd31;
            rpt.w_hd40     = w_hd40;
            rpt.w_hd41     = w_hd41;
            rpt.w_hd50     = w_hd50;
            rpt.w_hd51     = w_hd51;

            rpt.Run();
            this.vwr.Document = rpt.Document;
        }
        private void viewer_disp()
        {
            //セクションレポート
            rpt_seisan_schedule_03 rpt = new rpt_seisan_schedule_03();
            DataTable w_rpt_dt         = new DataTable();

            //w_rpt_dt =  tss.OracleSelect("select * from " + w_trn_name + " order by seisan_yotei_date,busyo_cd,koutei_cd,line_cd,seq1");
            w_rpt_dt = w_dt;
            if (w_dt.Rows.Count == 0)
            {
                MessageBox.Show("該当するデータがありません");
                viewer1.Document.Pages.Clear();
                return;
            }

            //印刷画面に渡す値を取得
            //生産予定日
            w_yyyymmdd = tb_seisan_yotei_date.Text.Substring(0, 4) + "年" + tb_seisan_yotei_date.Text.Substring(5, 2) + "月" + tb_seisan_yotei_date.Text.Substring(8, 2) + "日";
            w_hd10     = w_yyyymmdd;
            //部署
            if (tb_busyo_cd.Text.ToString() == "")
            {
                w_hd11 = "指定なし";
                w_hd12 = "";
            }
            else
            {
                w_hd11 = tb_busyo_cd.Text;
                w_hd12 = tb_busyo_name.Text;
            }
            //工程
            if (tb_koutei_cd.Text.ToString() == "")
            {
                w_hd20 = "指定なし";
                w_hd21 = "";
            }
            else
            {
                w_hd20 = tb_koutei_cd.Text;
                w_hd21 = tb_koutei_name.Text;
            }
            //ライン
            if (tb_line_cd.Text.ToString() == "")
            {
                w_hd30 = "指定なし";
                w_hd31 = "";
            }
            else
            {
                w_hd30 = tb_line_cd.Text;
                w_hd31 = tb_line_name.Text;
            }
            //作成者
            string c_user_cd = w_dt.Rows[0]["create_user_cd"].ToString();

            if (c_user_cd != "")
            {
                DataTable w_d2 = tss.OracleSelect("select * from TSS_USER_M where user_cd = '" + c_user_cd + "'");
                w_hd40 = w_d2.Rows[0]["user_name"].ToString();
                w_hd41 = w_dt.Rows[0]["create_datetime"].ToString();
            }
            else
            {
                w_hd40 = "";
                w_hd41 = "";
            }

            //更新者
            string u_user_cd = w_dt.Rows[0]["update_user_cd"].ToString();

            if (u_user_cd != "")
            {
                DataTable w_d2 = tss.OracleSelect("select * from TSS_USER_M where user_cd = '" + u_user_cd + "'");
                w_hd50 = w_d2.Rows[0]["user_name"].ToString();
                w_hd51 = w_dt.Rows[0]["update_datetime"].ToString();
            }
            else
            {
                w_hd50 = "";
                w_hd51 = "";
            }

            //レポート画面のプロパティにセット
            rpt.DataSource = w_rpt_dt;
            rpt.w_yyyymmdd = w_yyyymmdd;
            rpt.w_hd10     = w_hd10;
            rpt.w_hd11     = w_hd11;
            rpt.w_hd12     = w_hd12;
            rpt.w_hd20     = w_hd20;
            rpt.w_hd21     = w_hd21;
            rpt.w_hd30     = w_hd30;
            rpt.w_hd31     = w_hd31;
            rpt.w_hd40     = w_hd40;
            rpt.w_hd41     = w_hd41;
            rpt.w_hd50     = w_hd50;
            rpt.w_hd51     = w_hd51;
            rpt.Run();
            this.viewer1.Document = rpt.Document;
        }