Ejemplo n.º 1
0
        public override void ConstructReportItemDefinition()
        {
            base.ConstructReportItemDefinitionImpl();
            ImageInstance imageInstance = this.ImageInstance;

            Global.Tracer.Assert(imageInstance != null, "(instance != null)");
            if (imageInstance.MIMEType != null)
            {
                this.ImageDef.MIMEType = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateConstExpression(imageInstance.MIMEType);
            }
            else
            {
                this.ImageDef.MIMEType = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
            }
            this.m_mimeType = null;
            if (imageInstance.ImageData != null || imageInstance.StreamName != null)
            {
                Global.Tracer.Assert(false, "Runtime construction of images with constant Image.Value is not supported.");
            }
            else
            {
                this.ImageDef.Value = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
            }
            this.m_value = null;
            if (!this.ActionInfo.ConstructActionDefinition())
            {
                this.ImageDef.Action = null;
                this.m_actionInfo    = null;
            }
        }
Ejemplo n.º 2
0
 public DataValue(RenderingContext renderingContext, object chartDataValue)
 {
     this.m_isChartValue     = true;
     this.m_name             = new ReportStringProperty();
     this.m_value            = new ReportVariantProperty(true);
     this.m_instance         = new ShimDataValueInstance(null, chartDataValue);
     this.m_renderingContext = renderingContext;
 }
        private string GetElementViewLayerName(MapElementView mapView)
        {
            ReportStringProperty layerName = mapView.LayerName;

            if (!layerName.IsExpression)
            {
                return(layerName.Value);
            }
            return(mapView.Instance.LayerName);
        }
Ejemplo n.º 4
0
        protected string GetFieldName(MapFieldName fieldName)
        {
            ReportStringProperty name = fieldName.Name;

            if (!fieldName.Name.IsExpression)
            {
                return(fieldName.Name.Value);
            }
            return(fieldName.Instance.Name);
        }
Ejemplo n.º 5
0
        private string EvaluateDataSetName()
        {
            ReportStringProperty dataSetName = this.DataSetName;

            if (!dataSetName.IsExpression)
            {
                return(dataSetName.Value);
            }
            return(this.Instance.DataSetName);
        }
Ejemplo n.º 6
0
 public CustomProperty(RenderingContext renderingContext, AspNetCore.ReportingServices.ReportProcessing.ExpressionInfo nameExpr, AspNetCore.ReportingServices.ReportProcessing.ExpressionInfo valueExpr, string name, object value, TypeCode typeCode)
 {
     this.m_name  = new ReportStringProperty(nameExpr);
     this.m_value = new ReportVariantProperty(valueExpr);
     if (nameExpr.IsExpression || valueExpr.IsExpression)
     {
         this.m_instance = new CustomPropertyInstance(this, name, value, typeCode);
     }
     this.m_renderingContext = renderingContext;
 }
Ejemplo n.º 7
0
        private string GetSpatialFieldName()
        {
            ReportStringProperty spatialField = this.m_spatialDataSet.SpatialField;

            if (!spatialField.IsExpression)
            {
                return(spatialField.Value);
            }
            return(this.m_spatialDataSet.Instance.SpatialField);
        }
Ejemplo n.º 8
0
        public static string GetBindingFieldName(MapBindingFieldPair bindingFieldPair)
        {
            ReportStringProperty fieldName = bindingFieldPair.FieldName;

            if (!fieldName.IsExpression)
            {
                return(fieldName.Value);
            }
            return(bindingFieldPair.Instance.FieldName);
        }
Ejemplo n.º 9
0
        public DataValue(RenderingContext renderingContext, AspNetCore.ReportingServices.ReportRendering.DataValue dataValue)
        {
            this.m_isChartValue = false;
            string name  = (dataValue != null) ? dataValue.Name : null;
            object value = (dataValue != null) ? dataValue.Value : null;

            this.m_name             = new ReportStringProperty(true, null, null);
            this.m_value            = new ReportVariantProperty(true);
            this.m_instance         = new ShimDataValueInstance(name, value);
            this.m_renderingContext = renderingContext;
        }
Ejemplo n.º 10
0
 public DataValue(IReportScope reportScope, RenderingContext renderingContext, AspNetCore.ReportingServices.ReportIntermediateFormat.DataValue dataValue, bool isChart, IInstancePath instancePath, string objectName)
 {
     this.m_isChartValue     = isChart;
     this.m_instancePath     = instancePath;
     this.m_dataValue        = dataValue;
     this.m_name             = new ReportStringProperty(dataValue.Name);
     this.m_value            = new ReportVariantProperty(dataValue.Value);
     this.m_instance         = new InternalDataValueInstance(reportScope, this);
     this.m_renderingContext = renderingContext;
     this.m_objectName       = objectName;
 }
Ejemplo n.º 11
0
 private void Init(AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo nameExpr, AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo valueExpr, string name, object value, TypeCode typeCode)
 {
     this.m_name  = new ReportStringProperty(nameExpr);
     this.m_value = new ReportVariantProperty(valueExpr);
     if (nameExpr.IsExpression || valueExpr.IsExpression)
     {
         this.m_instance = new CustomPropertyInstance(this, name, value, typeCode);
     }
     else
     {
         this.m_instance = null;
     }
 }
        string IBaseImage.GetMIMETypeValue()
        {
            ReportStringProperty mIMEType = this.MIMEType;

            if (mIMEType == null)
            {
                return(null);
            }
            if (!mIMEType.IsExpression)
            {
                return(mIMEType.Value);
            }
            return(this.MapMarkerImageDef.EvaluateMIMEType(this.Instance.ReportScopeInstance, this.MapDef.RenderingContext.OdpContext));
        }
Ejemplo n.º 13
0
        public void ConstructReportItemDefinitionImpl()
        {
            base.ConstructReportElementDefinitionImpl();
            ReportItemInstance instance = this.Instance;

            Global.Tracer.Assert(instance != null, "(instance != null)");
            if (instance.ToolTip != null)
            {
                base.ReportItemDef.ToolTip = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateConstExpression(instance.ToolTip);
            }
            else
            {
                base.ReportItemDef.ToolTip = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
            }
            this.m_toolTip = null;
            if (instance.Bookmark != null)
            {
                base.ReportItemDef.Bookmark = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateConstExpression(instance.Bookmark);
            }
            else
            {
                base.ReportItemDef.Bookmark = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
            }
            this.m_bookmark = null;
            if (instance.DocumentMapLabel != null)
            {
                base.ReportItemDef.DocumentMapLabel = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateConstExpression(instance.DocumentMapLabel);
            }
            else
            {
                base.ReportItemDef.DocumentMapLabel = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
            }
            this.m_documentMapLabel = null;
            if (this.m_customProperties != null)
            {
                if (this.m_customProperties.Count == 0)
                {
                    base.m_reportItemDef.CustomProperties = null;
                    this.m_customProperties = null;
                }
                else
                {
                    this.m_customProperties.ConstructCustomPropertyDefinitions(base.m_reportItemDef.CustomProperties);
                }
            }
        }
Ejemplo n.º 14
0
        public void ConstructDrillthoughDefinition()
        {
            ActionDrillthroughInstance instance = this.Instance;

            Global.Tracer.Assert(instance != null, "(instance != null)");
            if (instance.ReportName != null)
            {
                this.m_actionItemDef.DrillthroughReportName = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateConstExpression(instance.ReportName);
            }
            else
            {
                this.m_actionItemDef.DrillthroughReportName = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
            }
            this.m_reportName = null;
            if (this.m_parameters != null)
            {
                this.m_parameters.ConstructParameterDefinitions();
            }
        }
Ejemplo n.º 15
0
		public void ConstructActionDefinition()
		{
			ActionInstance instance = this.Instance;
			Global.Tracer.Assert(instance != null);
			if (instance.Label != null)
			{
				this.m_actionItemDef.Label = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateConstExpression(instance.Label);
			}
			else
			{
				this.m_actionItemDef.Label = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
			}
			this.m_label = null;
			if (this.BookmarkLink != null)
			{
				if (instance.BookmarkLink != null)
				{
					this.m_actionItemDef.BookmarkLink = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateConstExpression(instance.BookmarkLink);
				}
				else
				{
					this.m_actionItemDef.BookmarkLink = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
				}
				this.m_bookmark = null;
			}
			if (this.Hyperlink != null)
			{
				if (instance.HyperlinkText != null)
				{
					this.m_actionItemDef.HyperLinkURL = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateConstExpression(instance.HyperlinkText);
				}
				else
				{
					this.m_actionItemDef.HyperLinkURL = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
				}
				this.m_hyperlink = null;
			}
			if (this.Drillthrough != null)
			{
				this.Drillthrough.ConstructDrillthoughDefinition();
			}
		}
Ejemplo n.º 16
0
        protected void SetLegendText(RuleBase coreRule)
        {
            ReportStringProperty legendText = this.m_mapRule.LegendText;

            if (legendText != null)
            {
                if (!legendText.IsExpression)
                {
                    coreRule.LegendText = legendText.Value;
                }
                else
                {
                    coreRule.LegendText = this.m_mapRule.Instance.LegendText;
                }
            }
            else
            {
                coreRule.LegendText = "";
            }
        }
Ejemplo n.º 17
0
        public static string GetStyleFontFamily(Style style, StyleInstance styleInstance, string fallbackFont)
        {
            ReportStringProperty fontFamily = style.FontFamily;

            if (MappingHelper.IsStylePropertyDefined(fontFamily))
            {
                if (!fontFamily.IsExpression)
                {
                    if (fontFamily != null)
                    {
                        return(fontFamily.Value);
                    }
                }
                else if (styleInstance.FontFamily != null)
                {
                    return(styleInstance.FontFamily);
                }
            }
            return(fallbackFont);
        }
Ejemplo n.º 18
0
        public static string GetStyleFormat(Style style, StyleInstance styleInstance)
        {
            ReportStringProperty format = style.Format;
            string text = null;

            if (!format.IsExpression)
            {
                if (format.Value != null)
                {
                    text = format.Value;
                }
            }
            else if (styleInstance.Format != null)
            {
                text = styleInstance.Format;
            }
            if (text == null)
            {
                return("");
            }
            return(text);
        }
Ejemplo n.º 19
0
        protected void RenderSpatialElementTemplate(MapSpatialElementTemplate mapSpatialElementTemplate, ISpatialElement coreSpatialElement, bool ignoreBackgroundColor, bool hasScope)
        {
            ReportStringProperty toolTip = mapSpatialElementTemplate.ToolTip;
            string text = null;

            if (toolTip != null)
            {
                if (!toolTip.IsExpression)
                {
                    text = toolTip.Value;
                }
                else if (hasScope)
                {
                    text = mapSpatialElementTemplate.Instance.ToolTip;
                }
                if (text != null)
                {
                    text = (coreSpatialElement.ToolTip = VectorLayerMapper.AddPrefixToFieldNames(this.m_mapVectorLayer.Name, text));
                }
            }
            this.m_mapMapper.RenderActionInfo(mapSpatialElementTemplate.ActionInfo, text, coreSpatialElement, this.m_mapVectorLayer.Name, hasScope);
            ReportBoolProperty hidden = mapSpatialElementTemplate.Hidden;

            if (hidden != null)
            {
                if (!hidden.IsExpression)
                {
                    coreSpatialElement.Visible = !hidden.Value;
                }
                else if (hasScope)
                {
                    coreSpatialElement.Visible = !mapSpatialElementTemplate.Instance.Hidden;
                }
                else
                {
                    coreSpatialElement.Visible = true;
                }
            }
            else
            {
                coreSpatialElement.Visible = true;
            }
            ReportStringProperty label = mapSpatialElementTemplate.Label;

            if (label != null)
            {
                string text3 = "";
                if (!label.IsExpression)
                {
                    text3 = label.Value;
                }
                else if (hasScope)
                {
                    text3 = mapSpatialElementTemplate.Instance.Label;
                }
                if (text3 != null)
                {
                    coreSpatialElement.Text = VectorLayerMapper.AddPrefixToFieldNames(this.m_mapVectorLayer.Name, text3);
                }
            }
            ReportDoubleProperty offsetX = mapSpatialElementTemplate.OffsetX;
            double x = 0.0;

            if (offsetX != null)
            {
                if (!offsetX.IsExpression)
                {
                    x = offsetX.Value;
                }
                else if (hasScope)
                {
                    x = mapSpatialElementTemplate.Instance.OffsetX;
                }
                coreSpatialElement.Offset.X = x;
            }
            offsetX = mapSpatialElementTemplate.OffsetY;
            x       = 0.0;
            if (offsetX != null)
            {
                if (!offsetX.IsExpression)
                {
                    x = offsetX.Value;
                }
                else if (hasScope)
                {
                    x = mapSpatialElementTemplate.Instance.OffsetY;
                }
                coreSpatialElement.Offset.Y = x;
            }
            Style         style  = mapSpatialElementTemplate.Style;
            StyleInstance style2 = mapSpatialElementTemplate.Instance.Style;

            this.RenderStyle(style, style2, coreSpatialElement, ignoreBackgroundColor, hasScope);
        }