public void WhenTheReportEngineRuns()
        {
            _newReport = _controller.Print(r => r.ExportToMemory());

            _newChangeMeLabel = (XRLabel)_newReport.Bands[0].Controls[_changeMeLabel.Name];
            _newDontChangeMeLabel = (XRLabel) _newReport.Bands[0].Controls[_dontChangeMeLabel.Name];
        }
        public static gcXtraReport CloneLayoutAsMyReportBase(this XtraReport report, IEventAggregator aggregator)
        {
            var stream = new MemoryStream();
            report.SaveLayout(stream);
            stream.Position = 0;

            var newReport = new gcXtraReport(aggregator);
            newReport.LoadLayout(stream);
            newReport.DataSource = report.DataSource;

            return newReport;
        }
 public ReportVisitor(IEventAggregator eventAggregator, gcXtraReport report)
 {
     _eventAggregator = eventAggregator;
     _report = report;
 }
 public void WhenTheReportEngineRuns()
 {
     _newParentReport = _controller.Print(r => r.ExportToMemory());
 }
 public BeforeReportPrintMessage(gcXtraReport report, PrintEventArgs e)
 {
     Report = report;
     PrintArgs = e;
 }
        public void ThenTheSubreportSDatasourceShouldBeTheSameAsTheParentReportSDatasource()
        {
            _newSubReport = (gcXtraReport)_newSubReportContainer.ReportSource;

            var parentList = (List<Person>)_newParentReport.DataSource;
            var childList = (List<Person>)_newSubReport.DataSource;

            parentList.Should().Equal(childList);
        }
        public void WhenTheReportEngineRuns()
        {
            _newParentReport = _controller.Print(r => r.ExportToMemory());

            _newSubReportContainer = _getContainerFunc(_newParentReport);
        }