private void btnCETAK_Click(object sender, EventArgs e)
        {
            if (param == "")
            {
                MessageBox.Show("Pilih data yang ingin di cetak ...");
            }
            else
            {
                Laporan.kontrak cr = new Laporan.kontrak();
                cr.RecordSelectionFormula = "{Peminjaman.ID_TRANS}='" + param + "'";

                Laporan.CETAK frm = new Laporan.CETAK();
                frm.crystalReportViewer1.ReportSource  = cr;
                frm.crystalReportViewer1.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None;
                frm.crystalReportViewer1.RefreshReport();
                frm.ShowDialog();
            }
        }
        private void btnCETAK_Click(object sender, EventArgs e)
        {
            if (lengkap() == true && txtKTP.MaskCompleted)
            {
                if (bntPerbarui.Enabled == false)
                {
                    if (cetak == true)
                    {
                        if (cboBARANG.SelectedIndex == 0)
                        {
                            kode_gudang = global.serial_number("PC");
                        }
                        else
                        {
                            kode_gudang = global.serial_number("HP");
                        }
                        no_barang     = global.no;
                        kode_pinjaman = global.serial_number("TRANS");
                        no_trans      = global.no;
                    }
                    proses_peminjaman();
                }
                else
                {
                    bntPerbarui_Click(null, null);
                }
                if (cetak == true)
                {
                    if (MessageBox.Show("Silahkan cetak kontrak peminjaman ... ", "Cetak", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
                    {
                        Laporan.kontrak cr = new Laporan.kontrak();
                        if (bntPerbarui.Enabled == false)
                        {
                            cr.RecordSelectionFormula = "{Peminjaman.ID_TRANS}='" + kode_pinjaman + "'";
                        }
                        else
                        {
                            cr.RecordSelectionFormula = "{Peminjaman.ID_TRANS}='" + txtNO_TRANS.Text + "'";
                        }

                        Laporan.CETAK frm = new Laporan.CETAK();
                        frm.crystalReportViewer1.ReportSource  = cr;
                        frm.crystalReportViewer1.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None;
                        frm.crystalReportViewer1.RefreshReport();
                        frm.ShowDialog();
                    }
                }
            }
            else
            {
                if (msg != "")
                {
                    MessageBox.Show(msg);
                    msg = "";
                }
                else
                {
                    MessageBox.Show("Data harus lengkap");
                }
            }
        }