protected override void Render1(Rdl.Render.Container parentBox, Rdl.Runtime.Context context, bool visible) { DataSet ds = null; if (_dataSetName != null) { ds = Report.DataSets[_dataSetName]; } else if (context.DataSet != null) { ds = context.DataSet; } else if (Report.DataSets.Count == 1) { ds = Report.DataSets.FirstDataSet; } else { throw new Exception("Missing data set name in dataregion " + this.Name); } if (ds == null) { throw new Exception("Invalid dataSetName " + _dataSetName + " in DataRegion " + _name); } _context = new Rdl.Runtime.Context( context.FindContextByDS(ds), ds, _filters, null, null); _context.ReportItemName = Name; parentBox.ContextBase = true; }
internal new Rdl.Render.GenericRender Render(Rdl.Render.Container box, Rdl.Runtime.Context parentContext) { Rdl.Runtime.Context context = new Rdl.Runtime.Context( parentContext, null, null, null, null); // Initialize the data sets. // Initialized in RunTimeBase //_dataSets.Initialize(); _dataSets.Reset(); // Set the default DataSet for the report if (_dataSchema != null) { _reportDataSet = _dataSets[_dataSchema]; } else { _reportDataSet = _dataSets.FirstDataSet; } // Set up the default data context. if (parentContext != null) { parentContext = parentContext.FindContextByDS(_reportDataSet); } context = new Rdl.Runtime.Context( parentContext, _reportDataSet, null, null, null); Rdl.Render.GenericRender render; if (box == null) { render = new Rdl.Render.GenericRender(this, context); box = render.BodyContainer; } else { render = box.Render; } if (_pageHeader != null) { _pageHeader.Render(render.PageHeaderContainer, context); } if (_pageFooter != null) { _pageFooter.Render(render.PageFooterContainer, context); } // Render the report. _body.Render(box, context); context.LinkToggles(); return(render); }