public void SubReportCallback(ICatalogItemContext reportContext, string subreportPath, out ICatalogItemContext subreportContext, out string description, out ReportProcessing.GetReportChunk getCompiledDefinitionCallback, out ParameterInfoCollection parameters) { getCompiledDefinitionCallback = null; IChunkFactory chunkFactory = null; this.m_subreportCallback(reportContext, subreportPath, null, this.NeedsUpgrade, null, out subreportContext, out description, out chunkFactory, out parameters); if (chunkFactory != null) { if (ReportProcessing.ContainsFlag(chunkFactory.ReportProcessingFlags, ReportProcessingFlags.OnDemandEngine)) { subreportContext = null; description = null; getCompiledDefinitionCallback = null; parameters = null; string text = subreportPath.MarkAsPrivate(); string text2 = reportContext.ItemPathAsString.MarkAsPrivate(); Global.Tracer.Trace(TraceLevel.Warning, "The subreport '{0}' could not be processed. Parent report '{1}' failed to automatically republish, or it contains a Reporting Services 2005-style CustomReportItem, and is therefore incompatible with the subreport. To correct this error, please attempt to republish the parent report manually. If it contains a CustomReportItem, please upgrade the report to the latest version.", text, text2); if (this.m_errorContext != null) { this.m_errorContext.Register(ProcessingErrorCode.rsEngineMismatchParentReport, Severity.Warning, ObjectType.Subreport, text, null, text, text2); } throw new ReportProcessingException(ErrorCode.rsInvalidOperation, RPRes.rsEngineMismatchParentReport(ObjectType.Subreport.ToString(), subreportPath, null, subreportPath, reportContext.ItemPathAsString)); } ChunkFactoryAdapter @object = new ChunkFactoryAdapter(chunkFactory); getCompiledDefinitionCallback = @object.GetReportChunk; return; } if (subreportContext != null) { return; } throw new ReportProcessingException(RPRes.rsMissingSubReport(subreportPath, subreportPath), ErrorCode.rsItemNotFound); }
private void RenderMarker(PredefinedSymbol customSymbol, MapMarker mapMarker) { MapMarkerStyle markerStyle = MapMapper.GetMarkerStyle(mapMarker, hasScope: true); if (markerStyle != MapMarkerStyle.Image) { customSymbol.MarkerStyle = MapMapper.GetMarkerStyle(markerStyle); return; } MapMarkerImage mapMarkerImage = mapMarker.MapMarkerImage; if (mapMarkerImage == null) { throw new RenderingObjectModelException(RPRes.rsMapLayerMissingProperty(RPRes.rsObjectTypeMap, m_mapRule.MapDef.Name, m_mapVectorLayer.Name, "MapMarkerImage")); } customSymbol.Image = m_mapMapper.AddImage(mapMarkerImage); customSymbol.ImageResizeMode = m_mapMapper.GetImageResizeMode(mapMarkerImage); customSymbol.ImageTransColor = m_mapMapper.GetImageTransColor(mapMarkerImage); }
protected override void RenderPointTemplate(MapPointTemplate mapPointTemplate, Symbol coreSymbol, bool customTemplate, bool ignoreBackgoundColor, bool ignoreSize, bool ignoreMarker, bool hasScope) { base.RenderPointTemplate(mapPointTemplate, coreSymbol, customTemplate, ignoreBackgoundColor, ignoreSize, ignoreMarker, hasScope); if (ignoreMarker) { return; } MapMarker mapMarker = ((MapMarkerTemplate)mapPointTemplate).MapMarker; MapMarkerStyle markerStyle = MapMapper.GetMarkerStyle(mapMarker, hasScope); if (markerStyle != MapMarkerStyle.Image) { coreSymbol.MarkerStyle = MapMapper.GetMarkerStyle(markerStyle); return; } MapMarkerImage mapMarkerImage = mapMarker.MapMarkerImage; if (mapMarkerImage == null) { throw new RenderingObjectModelException(RPRes.rsMapLayerMissingProperty(RPRes.rsObjectTypeMap, m_mapVectorLayer.MapDef.Name, m_mapVectorLayer.Name, "MapMarkerImage")); } string image; if (CanShareMarkerImage(mapMarkerImage, customTemplate)) { if (sharedImageName == null) { sharedImageName = m_mapMapper.AddImage(mapMarkerImage); } image = sharedImageName; } else { image = m_mapMapper.AddImage(mapMarkerImage); } coreSymbol.Image = image; coreSymbol.ImageResizeMode = m_mapMapper.GetImageResizeMode(mapMarkerImage); coreSymbol.ImageTransColor = m_mapMapper.GetImageTransColor(mapMarkerImage); }
protected int GetBucketCount() { if (!this.IsRuleFieldDefined) { return(this.m_coreSpatialElementManager.GetSpatialElementCount()); } MapRuleDistributionType distributionType = this.GetDistributionType(); ReportIntProperty bucketCount = this.m_mapRule.BucketCount; int num = RuleMapper.m_defaultBucketCount; if (bucketCount != null) { num = (bucketCount.IsExpression ? this.m_mapRule.Instance.BucketCount : bucketCount.Value); } if (!this.IsRuleFieldScalar) { return(this.m_coreSpatialElementManager.GetDistinctValuesCount(this.m_coreRule.Field)); } switch (distributionType) { case MapRuleDistributionType.Optimal: case MapRuleDistributionType.EqualDistribution: return(Math.Min(num, this.m_coreSpatialElementManager.GetDistinctValuesCount(this.m_coreRule.Field))); case MapRuleDistributionType.Custom: { MapBucketCollection mapBuckets = this.m_mapRule.MapBuckets; if (mapBuckets == null) { throw new RenderingObjectModelException(RPRes.rsMapLayerMissingProperty(RPRes.rsObjectTypeMap, this.m_mapRule.MapDef.Name, this.m_mapVectorLayer.Name, "MapBuckets")); } return(mapBuckets.Count); } default: return(num); } }