// Handle parsing of function in final pass override public void FinalPass() { if (_Value != null) { _Value.FinalPass(); } // Resolve the field if specified if (_DataField != null) { Fields f = (Fields)this.Parent; DataSetDefn ds = (DataSetDefn)f.Parent; Query q = ds.Query; if (q != null && q.Columns != null) { qc = (QueryColumn)q.Columns[_DataField]; if (qc == null) { // couldn't find the data field OwnerReport.rl.LogError(8, "DataField '" + _DataField + "' not part of query."); } } } return; }
// Handle parsing of function in final pass override public void FinalPass() { base.FinalPass(); // Subreports aren't allowed in PageHeader or PageFooter; if (this.InPageHeaderOrFooter()) { OwnerReport.rl.LogError(8, String.Format("The Subreport '{0}' is not allowed in a PageHeader or PageFooter", this.Name == null? "unknown": Name.Nm)); } if (_Parameters != null) { _Parameters.FinalPass(); } if (_NoRows != null) { _NoRows.FinalPass(); } _ReportDefn = GetReport(OwnerReport.ParseFolder); if (_ReportDefn != null) // only null in error case (e.g. subreport not found) { _ReportDefn.Subreport = this; } return; }
// Handle parsing of function in final pass override public void FinalPass() { if (_Expression != null) { _Expression.FinalPass(); } return; }
// Handle parsing of function in final pass override public void FinalPass() { if (_Value != null) { _Value.FinalPass(); } return; }
// Handle parsing of function in final pass override public void FinalPass() { if (_Label != null) { _Label.FinalPass(); } return; }
override public void FinalPass() { if (_ConnectString != null) { _ConnectString.FinalPass(); } return; }
// Handle parsing of function in final pass override public void FinalPass() { if (_Hidden != null) { _Hidden.FinalPass(); } return; }
// Handle parsing of function in final pass override public void FinalPass() { if (_InitialState != null) { _InitialState.FinalPass(); } return; }
// Handle parsing of function in final pass override public void FinalPass() { if (_Style != null) { _Style.FinalPass(); } if (_Action != null) { _Action.FinalPass(); } if (_Visibility != null) { _Visibility.FinalPass(); } if (_ToolTip != null) { _ToolTip.FinalPass(); } if (_Label != null) { _Label.FinalPass(); } if (_Bookmark != null) { _Bookmark.FinalPass(); } if (_Custom != null) { _Custom.FinalPass(); } if (Parent.Parent is TableCell) // This is part of a table { _TC = Parent.Parent as TableCell; } else { _TC = null; } // Determine if ReportItem is defined inside of a Matrix _InMatrix = false; for (ReportLink rl = this.Parent; rl != null; rl = rl.Parent) { if (rl is Matrix) { _InMatrix = true; break; } if (rl is Table || rl is List || rl is Chart) { break; } } return; }
// Handle parsing of function in final pass override public void FinalPass() { if (_Caption != null) { _Caption.FinalPass(); } if (_Style != null) { _Style.FinalPass(); } return; }
// Handle parsing of function in final pass override public void FinalPass() { if (_Hyperlink != null) { _Hyperlink.FinalPass(); } if (_Drillthrough != null) { _Drillthrough.FinalPass(); } if (_BookmarkLink != null) { _BookmarkLink.FinalPass(); } return; }
// Handle parsing of function in final pass override public void FinalPass() { if (_Grouping != null) { _Grouping.FinalPass(); } if (_Sorting != null) { _Sorting.FinalPass(); } if (_Label != null) { _Label.FinalPass(); } return; }
// Handle parsing of function in final pass override public void FinalPass() { base.FinalPass(); _Value.FinalPass(); if (this.DataElementName == null && this.Name == null) { // no name or dataelementname; try using expression FunctionField ff = _Value.Expr as FunctionField; if (ff != null && ff.Fld != null) { this.DataElementName = ff.Fld.DataField; } } if (_ToggleImage != null) { _ToggleImage.FinalPass(); } if (_HideDuplicates != null) { object o = OwnerReport.LUAggrScope[_HideDuplicates]; if (o == null) { OwnerReport.rl.LogError(4, "HideDuplicate '" + _HideDuplicates + "' is not a Group or DataSet name. It will be ignored."); _HideDuplicates = null; } else if (o is Grouping) { Grouping g = o as Grouping; g.AddHideDuplicates(this); } else if (o is DataSetDefn) { DataSetDefn ds = o as DataSetDefn; ds.AddHideDuplicates(this); } } return; }
override public void FinalPass() { if (_MajorInterval != null) { _MajorInterval.FinalPass(); } if (_MinorInterval != null) { _MinorInterval.FinalPass(); } if (_Max != null) { _Max.FinalPass(); } if (_Min != null) { _Min.FinalPass(); } if (_Style != null) { _Style.FinalPass(); } if (_Title != null) { _Title.FinalPass(); } // 20022008 AJM GJL - Second Y axis if (_Title2 != null) { _Title2.FinalPass(); } if (_MajorGridLines != null) { _MajorGridLines.FinalPass(); } if (_MinorGridLines != null) { _MinorGridLines.FinalPass(); } return; }
// Handle parsing of function in final pass override public void FinalPass() { base.FinalPass(); if (_Values != null) { _Values.FinalPass(); } if (_DataPoint != null) { _DataPoint.FinalPass(); } if (_ChartLabel != null) { _ChartLabel.FinalPass(); } if (_PlotType != null) { _PlotType.FinalPass(); } if (_YAxis != null) { _YAxis.FinalPass(); } if (_NoMarker != null) { _NoMarker.FinalPass(); } if (_LineSize != null) { _LineSize.FinalPass(); } if (_Colour != null) { _Colour.FinalPass(); } return; }
// Handle parsing of function in final pass override public void FinalPass() { if (_Default != null) { _Default.FinalPass(); } if (_Left != null) { _Left.FinalPass(); } if (_Right != null) { _Right.FinalPass(); } if (_Top != null) { _Top.FinalPass(); } if (_Bottom != null) { _Bottom.FinalPass(); } return; }
// Handle parsing of function in final pass override public void FinalPass() { if (_CommandText != null) { _CommandText.FinalPass(); } if (_QueryParameters != null) { _QueryParameters.FinalPass(); } // verify the data source DataSourceDefn ds = null; if (OwnerReport.DataSourcesDefn != null && OwnerReport.DataSourcesDefn.Items != null) { ds = OwnerReport.DataSourcesDefn[_DataSourceName]; } if (ds == null) { OwnerReport.rl.LogError(8, "Query references unknown data source '" + _DataSourceName + "'"); return; } _DataSourceDefn = ds; IDbConnection cnSQL = ds.SqlConnect(null); if (cnSQL == null || _CommandText == null) { return; } // Treat this as a SQL statement String sql = _CommandText.EvaluateString(null, null); IDbCommand cmSQL = null; IDataReader dr = null; try { cmSQL = cnSQL.CreateCommand(); cmSQL.CommandText = AddParametersAsLiterals(null, cnSQL, sql, false); if (this._QueryCommandType == QueryCommandTypeEnum.StoredProcedure) { cmSQL.CommandType = CommandType.StoredProcedure; } AddParameters(null, cnSQL, cmSQL, false); dr = cmSQL.ExecuteReader(CommandBehavior.SchemaOnly); if (dr.FieldCount < 10) { _Columns = new ListDictionary(); // Hashtable is overkill for small lists } else { _Columns = new Hashtable(dr.FieldCount); } for (int i = 0; i < dr.FieldCount; i++) { QueryColumn qc = new QueryColumn(i, dr.GetName(i), Type.GetTypeCode(dr.GetFieldType(i))); try { _Columns.Add(qc.colName, qc); } catch // name has already been added to list: { // According to the RDL spec SQL names are matched by Name not by relative // position: this seems wrong to me and causes this problem; but // user can fix by using "as" keyword to name columns in Select // e.g. Select col as "col1", col as "col2" from tableA OwnerReport.rl.LogError(8, String.Format("Column '{0}' is not uniquely defined within the SQL Select columns.", qc.colName)); } } } catch (Exception e) { OwnerReport.rl.LogError(4, "SQL Exception during report compilation: " + e.Message + "\r\nSQL: " + sql); } finally { if (cmSQL != null) { cmSQL.Dispose(); if (dr != null) { dr.Close(); } } } return; }
override public void FinalPass() { base.FinalPass(); if (_SeriesGroupings != null) { _SeriesGroupings.FinalPass(); } if (_CategoryGroupings != null) { _CategoryGroupings.FinalPass(); } if (_ChartData != null) { _ChartData.FinalPass(); } if (_Legend != null) { _Legend.FinalPass(); } if (_CategoryAxis != null) { _CategoryAxis.FinalPass(); } if (_ValueAxis != null) { _ValueAxis.FinalPass(); } if (_Title != null) { _Title.FinalPass(); } if (_ThreeDProperties != null) { _ThreeDProperties.FinalPass(); } if (_PlotArea != null) { _PlotArea.FinalPass(); } //AJM GJL 14082008 if (_Palette != null) { _Palette.FinalPass(); } if (_isHYNEsWonderfulVector != null) { _isHYNEsWonderfulVector.FinalPass(); } if (_showTooltips != null) { _showTooltips.FinalPass(); } if (_showTooltipsX != null) { _showTooltipsX.FinalPass(); } if (_Subtype != null) { _Subtype.FinalPass(); } if (_ToolTipXFormat != null) { _ToolTipXFormat.FinalPass(); } if (_ToolTipYFormat != null) { _ToolTipYFormat.FinalPass(); } if (this.OwnerReport.rl.MaxSeverity < 8) // Don't take this step if already have errors { _ChartMatrix = GenerateMatrix(); // GenerateMatrix() needs no error in defn to date _ChartMatrix.FinalPass(); } return; }
// void FinalPass(string folder) { // Now do some addition validation and final preparation // Create the Globals and User lookup dictionaries _LUGlobals = new ListDictionary(); // if entries grow beyond 10; make hashtable _LUGlobals.Add("PageNumber", new FunctionPageNumber()); _LUGlobals.Add("TotalPages", new FunctionTotalPages()); _LUGlobals.Add("ExecutionTime", new FunctionExecutionTime()); _LUGlobals.Add("ReportFolder", new FunctionReportFolder()); _LUGlobals.Add("ReportName", new FunctionReportName()); _LUUser = new ListDictionary(); // if entries grow beyond 10; make hashtable _LUUser.Add("UserID", new FunctionUserID()); _LUUser.Add("Language", new FunctionUserLanguage()); if (_CodeModules != null) { _CodeModules.FinalPass(); _CodeModules.LoadModules(); } if (_Classes != null) { _Classes.FinalPass(); // _Classes.Load(); } if (_Code != null) { _Code.FinalPass(); _CodeType = _Code.CodeType(); } if (_ReportParameters != null) // report parameters might be used in data source connection strings { _ReportParameters.FinalPass(); } if (_DataSourcesDefn != null) { _DataSourcesDefn.FinalPass(); } if (_DataSetsDefn != null) { _DataSetsDefn.FinalPass(); } _Body.FinalPass(); if (_PageHeader != null) { _PageHeader.FinalPass(); } if (_PageFooter != null) { _PageFooter.FinalPass(); } if (_EmbeddedImages != null) { _EmbeddedImages.FinalPass(); } if (_Language != null) { _Language.FinalPass(); } _DataCache.TrimExcess(); // reduce size of array of expressions that cache data return; }
// Handle parsing of function in final pass override public void FinalPass() { base.FinalPass(); if (this is Table) { // Grids don't have any data responsibilities Table t = this as Table; if (t.IsGrid) { return; } } // DataRegions aren't allowed in PageHeader or PageFooter; if (this.InPageHeaderOrFooter()) { OwnerReport.rl.LogError(8, String.Format("The DataRegion '{0}' is not allowed in a PageHeader or PageFooter", this.Name == null? "unknown": Name.Nm)); } ResolveNestedDataRegions(); if (_ParentDataRegion != null) // when nested we use the dataset of the parent { _DataSetDefn = _ParentDataRegion.DataSetDefn; } else if (_DataSetName != null) { if (OwnerReport.DataSetsDefn != null) { _DataSetDefn = (DataSetDefn)OwnerReport.DataSetsDefn.Items[_DataSetName]; } if (_DataSetDefn == null) { OwnerReport.rl.LogError(8, String.Format("DataSetName '{0}' not specified in DataSets list.", _DataSetName)); } } else { // No name but maybe we can default to a single Dataset if (_DataSetDefn == null && OwnerReport.DataSetsDefn != null && OwnerReport.DataSetsDefn.Items.Count == 1) { foreach (DataSetDefn d in OwnerReport.DataSetsDefn.Items.Values) { _DataSetDefn = d; break; // since there is only 1 this will obtain it } } if (_DataSetDefn == null) { OwnerReport.rl.LogError(8, string.Format("{0} must specify a DataSetName.", this.Name == null? "DataRegions": this.Name.Nm)); } } if (_NoRows != null) { _NoRows.FinalPass(); } if (_Filters != null) { _Filters.FinalPass(); } return; }
// Handle parsing of function in final pass override public void FinalPass() { _FilterExpression.FinalPass(); _FilterValues.FinalPass(); return; }