Esempio n. 1
0
        private void btnRekapAkhir_Click(object sender, EventArgs e)
        {
            Rahayu_Program.Report.ReportForm reportForm = new Rahayu_Program.Report.ReportForm(main);
            reportForm.MdiParent   = main;
            reportForm.WindowState = FormWindowState.Maximized;

            DataTable dt = main.ExecuteQuery("SELECT pvcTypeName, mp.pvcID, pvcName, pvcPerPack, pvcTypeUnit, sellPrice, homeStock, rahayuStock FROM MsPVC mp JOIN MsPVCType mpt ON mp.pvcTypeID = mpt.pvcTypeID WHERE NOT mp.pvcTypeID = 8 AND NOT mp.pvcTypeID = 9 ORDER BY mpt.pvcTypeID");

            if (dt == null)
            {
                MessageBox.Show("ERROR PRINT REPORT (LAPORAN HARIAN DI CLOSING FORM PVC)");
                this.Dispose();
            }
            else
            {
                if (dt.Rows.Count > 0)
                {
                    Rahayu_Program.Report.PVC.LaporanStockManual laporan = new Rahayu_Program.Report.PVC.LaporanStockManual();
                    laporan.SetDataSource(dt);
                    laporan.SummaryInfo.ReportTitle = "PVC Laporan Stock Manual";

                    buatLaporanByQueryStock(laporan, false); //false soalnya ga mau di tutupin
                }
                else
                {
                    MessageBox.Show("DATA TIDAK ADA (LAPORAN HARIAN DI CLOSING FORM PVC)");
                }
            }
        }
Esempio n. 2
0
        private void btnBedaRekap_Click(object sender, EventArgs e)
        {
            Rahayu_Program.Report.ReportForm reportForm = new Rahayu_Program.Report.ReportForm(main);
            reportForm.MdiParent   = main;
            reportForm.WindowState = FormWindowState.Maximized;

            DataTable dt = main.ExecuteQuery("SELECT DISTINCT srsh.nomorRak, srsd.barangID, mb.namaBarang, srsd.stockAsli AS stockKomputer, srsd.selisih, srsd.stockHitung FROM MsBarang mb JOIN StationeryRekapStockHeader srsh ON mb.barangID = srsd.barangID JOIN StationeryRekapStockDetail srsd ON srsh.rekapStockID = srsd.rekapStockID JOIN MsPVCType mpt WHERE NOT srsd.selisih = 0 AND srsh.rekapTime > '" + awal.ToString("yyyy-MM-dd HH:mm:ss") + "' AND srsh.rekapTime < '" + akhir.ToString("yyyy-MM-dd HH:mm:ss") + "' AND NOT mp.pvcTypeID = 8 AND NOT mp.pvcTypeID = 9 ORDER BY mpt.pvcTypeID");

            if (dt == null)
            {
                MessageBox.Show("OPEN REPORT ERROR (PRINT REKAP STOCK INPUT STATIONERY)");
                this.Dispose();
            }
            else
            {
                if (dt.Rows.Count > 0)
                {
                    Rahayu_Program.Report.Stationery.LaporanBedaStock laporan = new Rahayu_Program.Report.Stationery.LaporanBedaStock();
                    laporan.SetDataSource(dt);

                    reportForm.GetCrystalReportViewer().ReportSource = laporan;
                    reportForm.GetCrystalReportViewer().Refresh();

                    reportForm.Show();
                }
                else
                {
                    MessageBox.Show("DATA TIDAK ADA");
                }
            }
        }