예제 #1
0
        private void FrmPengRill_Load(object sender, EventArgs e)
        {
            string sql = "SELECT * FROM biaya WHERE id='" + pid.Text + "'";

            DbQuery.ExecuteSQL(sql);
            DataTable dt = DbQuery.GetDataTable(sql);

            ReportDataSource reportDSDetail = new ReportDataSource("DataSet1", dt);

            this.reportViewer1.LocalReport.DataSources.Clear();
            this.reportViewer1.LocalReport.DataSources.Add(reportDSDetail);
            this.reportViewer1.LocalReport.Refresh();
            this.reportViewer1.RefreshReport();

            ReportParameterCollection reportParameters = new ReportParameterCollection();

            reportParameters.Add(new ReportParameter("pnama", pnama.Text));
            reportParameters.Add(new ReportParameter("pnip", pnip.Text));
            reportParameters.Add(new ReportParameter("pjabatan", pjabatan.Text));
            reportParameters.Add(new ReportParameter("pnomor", pnomor.Text));
            reportParameters.Add(new ReportParameter("ptgl", ptgl.Text));
            reportParameters.Add(new ReportParameter("ptransportasi", ptransportasi.Text));

            this.reportViewer1.LocalReport.SetParameters(reportParameters);

            //this.DataTable2TableAdapter.Fill(this.DataSet1.DataTable2);
            this.reportViewer1.RefreshReport();

            this.reportViewer1.RefreshReport();
        }
예제 #2
0
        private void FrmKwitansi_Load(object sender, EventArgs e)
        {
            string sql = "SELECT * FROM biaya";

            DbQuery.ExecuteSQL(sql);
            DataTable dt = DbQuery.GetDataTable(sql);

            ReportDataSource reportDSDetail = new ReportDataSource("DataSet1", dt);

            this.reportViewer1.LocalReport.DataSources.Clear();
            this.reportViewer1.LocalReport.DataSources.Add(reportDSDetail);
            this.reportViewer1.LocalReport.Refresh();
            this.reportViewer1.RefreshReport();

            ReportParameterCollection reportParameters = new ReportParameterCollection();

            reportParameters.Add(new ReportParameter("total_uang", ktotal_uang.Text));
            reportParameters.Add(new ReportParameter("kterbilang", kterbilang.Text));
            reportParameters.Add(new ReportParameter("ktujuan", ktujuan.Text));

            reportParameters.Add(new ReportParameter("kmaksud", kmaksud.Text));
            reportParameters.Add(new ReportParameter("klama", klama.Text));
            reportParameters.Add(new ReportParameter("ktgl_berangkat", ktglberangkat.Text));
            reportParameters.Add(new ReportParameter("ktgl_pulang", ktglpulang.Text));
            reportParameters.Add(new ReportParameter("ktgl", ktgl.Text));
            reportParameters.Add(new ReportParameter("kpejabat", kpejabat.Text));
            reportParameters.Add(new ReportParameter("knip", knip.Text));

            this.reportViewer1.LocalReport.SetParameters(reportParameters);

            //this.DataTable2TableAdapter.Fill(this.DataSet1.DataTable2);
            this.reportViewer1.RefreshReport();
            // TODO: This line of code loads data into the 'DataSet1.DataTable1' table. You can move, or remove it, as needed.
            // this.DataTable1TableAdapter.Fill(this.DataSet1.DataTable1);

            // this.reportViewer1.RefreshReport();
        }
예제 #3
0
        private void FrmRincian_Load(object sender, EventArgs e)
        {
            string sql = "SELECT * FROM biaya WHERE id='" + tbnosurat_.Text + "'";

            DbQuery.ExecuteSQL(sql);
            DataTable dt = DbQuery.GetDataTable(sql);

            ReportDataSource reportDSDetail = new ReportDataSource("DataSet1", dt);

            this.reportViewer1.LocalReport.DataSources.Clear();
            this.reportViewer1.LocalReport.DataSources.Add(reportDSDetail);
            this.reportViewer1.LocalReport.Refresh();
            this.reportViewer1.RefreshReport();

            // TODO: This line of code loads data into the 'DataSet1.DataTable2' table. You can move, or remove it, as needed.
            //   this.DataTable2TableAdapter.Fill (this.DataSet1.DataTable2);

            ReportParameterCollection reportParameters = new ReportParameterCollection();

            reportParameters.Add(new ReportParameter("no_surat", nmr.Text));
            reportParameters.Add(new ReportParameter("tgl", tgl_.Text));
            reportParameters.Add(new ReportParameter("asal", asal_.Text));
            reportParameters.Add(new ReportParameter("tujuan", tujuan_.Text));
            reportParameters.Add(new ReportParameter("pp", pp.Text));
            reportParameters.Add(new ReportParameter("lokal", lokal.Text));
            reportParameters.Add(new ReportParameter("damri", damri_.Text));
            reportParameters.Add(new ReportParameter("lain", lain_.Text));
            reportParameters.Add(new ReportParameter("total", total_.Text));
            reportParameters.Add(new ReportParameter("terbilang", terbilang_.Text));
            reportParameters.Add(new ReportParameter("nama_pejabat", nmpejabat_.Text));
            reportParameters.Add(new ReportParameter("nip", nip_.Text));
            this.reportViewer1.LocalReport.SetParameters(reportParameters);

            //this.DataTable2TableAdapter.Fill(this.DataSet1.DataTable2);
            this.reportViewer1.RefreshReport();
        }
예제 #4
0
        private void Form1_Load(object sender, EventArgs e)
        {
            lblkomitmen.Text = komitmen;
            lblnips.Text     = nip;

            string sql = "SELECT * FROM v_data WHERE no_surat = '" + tbnomor.Text + "'";

            DbQuery.ExecuteSQL(sql);
            DataTable dt = DbQuery.GetDataTable(sql);

            ReportDataSource reportDSDetail = new ReportDataSource("DataSet1", dt);

            this.reportViewer1.LocalReport.DataSources.Clear();
            this.reportViewer1.LocalReport.DataSources.Add(reportDSDetail);
            this.reportViewer1.LocalReport.Refresh();
            this.reportViewer1.RefreshReport();

            // TODO: This line of code loads data into the 'DataSet1.DataTable2' table. You can move, or remove it, as needed.
            //   this.DataTable2TableAdapter.Fill (this.DataSet1.DataTable2);

            ReportParameterCollection reportParameters = new ReportParameterCollection();

            reportParameters.Add(new ReportParameter("nm1", nm1.Text));
            reportParameters.Add(new ReportParameter("nm2", nm2.Text));
            reportParameters.Add(new ReportParameter("nm3", nm3.Text));
            reportParameters.Add(new ReportParameter("tgl1", tgl1.Text));
            reportParameters.Add(new ReportParameter("tgl2", tgl2.Text));
            reportParameters.Add(new ReportParameter("tgl3", tgl3.Text));
            reportParameters.Add(new ReportParameter("ket1", ket1.Text));
            reportParameters.Add(new ReportParameter("ket2", ket2.Text));
            reportParameters.Add(new ReportParameter("ket3", ket3.Text));
            reportParameters.Add(new ReportParameter("pembuat_komitmen", komitmen));
            reportParameters.Add(new ReportParameter("nip_komitmen", nip));
            this.reportViewer1.LocalReport.SetParameters(reportParameters);

            //this.DataTable2TableAdapter.Fill(this.DataSet1.DataTable2);

            //sembunyikan label parameter
            nm1.Visible = false;
            nm2.Visible = false;
            nm3.Visible = false;

            tgl1.Visible = false;
            tgl2.Visible = false;
            tgl3.Visible = false;

            ket1.Visible = false;
            ket2.Visible = false;
            ket3.Visible = false;

            //hide label dari report spd
            lblkomitmen.Visible = false;
            lblnips.Visible     = false;

            //hide label dari data spd
            lbl_pembuat_komitmen.Visible = false;
            lblnip_komitmen.Visible      = false;

            // label3.Text = LabelText;
            // TODO: This line of code loads data into the 'DataSet1.DataTable1' table. You can move, or remove it, as needed.
            //           this.DataTable1TableAdapter.Fill(this.DataSet1.DataTable1);
            RefSpd();
            //          ReportParameterCollection reportParameters = new ReportParameterCollection();
            //        reportParameters.Add(new ReportParameter("ReportParameter1", fds.lblNPengikut1.Text));
            //      this.reportViewer1.LocalReport.SetParameters(reportParameters);
            //         this.reportViewer1.RefreshReport();
            //       this.reportViewer1.RefreshReport();
            this.reportViewer1.RefreshReport();
        }