Exemplo n.º 1
0
        private void btnPrintTotal_Click(object sender, EventArgs e)
        {
            DialogResult res = RadMessageBox.Show("Print Total Gaji Satpam. Siap kan kertas di printer."
                                                  , "Print Total Gaji Satpam"
                                                  , MessageBoxButtons.OKCancel
                                                  , RadMessageIcon.Question
                                                  , MessageBoxDefaultButton.Button2);

            if (res == System.Windows.Forms.DialogResult.OK)
            {
                //Print Slip Gaji
                rptGajiOtherSummary ab = new rptGajiOtherSummary();
                ab.ReportParameters[0].Value      = "satpam";
                ab.ReportParameters[1].Value      = NBConfig.IGBID;
                ab.ReportParameters["User"].Value = NBConfig.ValidUserName;

                IReportDocument report1 = (IReportDocument)ab;
                ////set parameters when necessary

                //// PrinterSettings
                PrinterSettings printerSettings = new PrinterSettings();
                //// Adjust the printer settings if necessary...

                // Print the report using the printer settings.
                ReportProcessor reportProcessor = new ReportProcessor();
                reportProcessor.PrintReport(report1, printerSettings);

                helper.PrintLog(this.Text, ab.Name, "Satpam ; GBID = " + NBConfig.IGBID.ToString());
            }
        }
Exemplo n.º 2
0
        public frmGajiStaff()
        {
            InitializeComponent();
            rptGajiOther rpt = new rptGajiOther();

            reportViewer1.Report = rpt;
            rpt.ReportParameters["TipeMember"].Visible = false;
            rpt.ReportParameters["TipeMember"].Value   = "staff";

            rptGajiOtherSummary rpt2 = new rptGajiOtherSummary();

            reportViewer2.Report = rpt2;
            rpt2.ReportParameters["TipeMember"].Visible = false;
            rpt2.ReportParameters["TipeMember"].Value   = "staff";
        }