void PrintDocument_EndPrint(object sender, PrintEventArgs e)
        {
            ReportSingleEntity rse = DataSource as ReportSingleEntity;

            if (rse != null)
            {
                rse.DoAfterSendToPrinter();
            }
        }
        protected override void AfterReportPrint()
        {
            ReportSingleEntity rse = DataSource as ReportSingleEntity;

            if (rse != null)
            {
                rse.DoAfterPrint();
            }
            base.AfterReportPrint();
        }
        protected override void BeforeReportPrint()
        {
            ReportSingleEntity rse = DataSource as ReportSingleEntity;

            if (rse != null)
            {
                rse.DoBeforePrint(Evaluator);
            }
            else if (ReportEntity != null)
            {
                ((IBaseEntity)ReportEntity).BeforePrint(Evaluator);
            }
            base.BeforeReportPrint();
        }
Exemple #4
0
        // Dari Dokumen
        public void ShowForm(Form MdiParent, string ReportName,
                             BusinessEntity DataSource, Evaluator Evaluator)
        {
            SaveEval = false;
            try
            {
                xrDesignPanel1.SetCommandVisibility(ReportCommand.AddNewDataSource, CommandVisibility.None);

                _Evaluator = Evaluator ?? BaseFactory
                             .CreateInstance <Evaluator>();
                LayoutHeader = "D_";
                IDataDictionary ds = new ReportSingleEntity(DataSource);

                Text = "Desain Cetak " + ReportName;
                xReport rpt = new xReport(_Evaluator);
                rpt.PaperKind  = PaperKind.A4;
                rpt.DataSource = ds;

                RptName = ReportName;
                NewDesign(rpt);
                msTanpaLayout = new MemoryStream();
                rpt.SaveLayout(msTanpaLayout);

                if (MdiParent != null)
                {
                    this.MdiParent = MdiParent;
                }

                List <string> ListLayout = DocPrintBrowseLayout
                                           .GetListLayout(LayoutHeader + RptName);
                ((RepositoryItemComboBox)barEditItem3.Edit)
                .Items.AddRange(ListLayout);
                barEditItem3.EditValue = strTanpaLayout;
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message, "Error Baca Layout Laporan",
                                    MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            finally
            {
                Show();
            }
        }