Beispiel #1
0
        private void Init()
        {
            this.reportDocument.DocumentName = reportSettings.ReportName;

            // Events from ReportDocument
            this.reportDocument.QueryPageSettings += new QueryPageSettingsEventHandler(ReportQueryPage);
            this.reportDocument.BeginPrint        += new PrintEventHandler(ReportBegin);

            this.reportDocument.PrintPage += delegate(object sender, PrintPageEventArgs e){
                this.CalculatePageBounds();
            };

            this.reportDocument.EndPrint += new PrintEventHandler(ReportEnd);

            // homemade events
            this.reportDocument.BodyStart += new EventHandler <ReportPageEventArgs> (BodyStart);

            this.reportDocument.BodyEnd += new EventHandler <ReportPageEventArgs> (BodyEnd);

            //
            this.reportDocument.RenderReportHeader += new EventHandler <ReportPageEventArgs> (PrintReportHeader);
            this.reportDocument.RenderPageHeader   += new EventHandler <ReportPageEventArgs> (PrintPageHeader);
            this.reportDocument.RenderDetails      += new EventHandler <ReportPageEventArgs> (PrintDetail);
            this.reportDocument.RenderPageEnd      += new EventHandler <ReportPageEventArgs> (PrintPageFooter);
            this.reportDocument.RenderReportEnd    += new EventHandler <ReportPageEventArgs> (PrintReportFooter);

            this.Evaluator = EvaluationHelper.SetupEvaluator();
        }