Пример #1
0
        internal override void ConstructReportItemDefinition()
        {
            ConstructReportItemDefinitionImpl();
            ImageInstance imageInstance = ImageInstance;

            Global.Tracer.Assert(imageInstance != null, "(instance != null)");
            if (imageInstance.MIMEType != null)
            {
                ImageDef.MIMEType = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateConstExpression(imageInstance.MIMEType);
            }
            else
            {
                ImageDef.MIMEType = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
            }
            m_mimeType = null;
            if (imageInstance.ImageData != null || imageInstance.StreamName != null)
            {
                Global.Tracer.Assert(condition: false, "Runtime construction of images with constant Image.Value is not supported.");
            }
            else
            {
                ImageDef.Value = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
            }
            m_value = null;
            if (!ActionInfo.ConstructActionDefinition())
            {
                ImageDef.Action = null;
                m_actionInfo    = null;
            }
        }
Пример #2
0
 internal DataValue(RenderingContext renderingContext, object chartDataValue)
 {
     m_isChartValue     = true;
     m_name             = new ReportStringProperty();
     m_value            = new ReportVariantProperty(isExpression: true);
     m_instance         = new ShimDataValueInstance(null, chartDataValue);
     m_renderingContext = renderingContext;
 }
        private string GetSpatialFieldName()
        {
            ReportStringProperty spatialField = m_spatialDataSet.SpatialField;

            if (!spatialField.IsExpression)
            {
                return(spatialField.Value);
            }
            return(m_spatialDataSet.Instance.SpatialField);
        }
        internal static string GetBindingFieldName(MapBindingFieldPair bindingFieldPair)
        {
            ReportStringProperty fieldName = bindingFieldPair.FieldName;

            if (!fieldName.IsExpression)
            {
                return(fieldName.Value);
            }
            return(bindingFieldPair.Instance.FieldName);
        }
        private string GetElementViewLayerName(MapElementView mapView)
        {
            ReportStringProperty layerName = mapView.LayerName;

            if (!layerName.IsExpression)
            {
                return(layerName.Value);
            }
            return(mapView.Instance.LayerName);
        }
 internal CustomProperty(RenderingContext renderingContext, Microsoft.ReportingServices.ReportProcessing.ExpressionInfo nameExpr, Microsoft.ReportingServices.ReportProcessing.ExpressionInfo valueExpr, string name, object value, TypeCode typeCode)
 {
     m_name  = new ReportStringProperty(nameExpr);
     m_value = new ReportVariantProperty(valueExpr);
     if (nameExpr.IsExpression || valueExpr.IsExpression)
     {
         m_instance = new CustomPropertyInstance(this, name, value, typeCode);
     }
     m_renderingContext = renderingContext;
 }
        private string EvaluateDataSetName()
        {
            ReportStringProperty dataSetName = DataSetName;

            if (!dataSetName.IsExpression)
            {
                return(dataSetName.Value);
            }
            return(Instance.DataSetName);
        }
Пример #8
0
 internal DataValue(IReportScope reportScope, RenderingContext renderingContext, Microsoft.ReportingServices.ReportIntermediateFormat.DataValue dataValue, bool isChart, IInstancePath instancePath, string objectName)
 {
     m_isChartValue     = isChart;
     m_instancePath     = instancePath;
     m_dataValue        = dataValue;
     m_name             = new ReportStringProperty(dataValue.Name);
     m_value            = new ReportVariantProperty(dataValue.Value);
     m_instance         = new InternalDataValueInstance(reportScope, this);
     m_renderingContext = renderingContext;
     m_objectName       = objectName;
 }
Пример #9
0
        internal DataValue(RenderingContext renderingContext, Microsoft.ReportingServices.ReportRendering.DataValue dataValue)
        {
            m_isChartValue = false;
            string name  = dataValue?.Name;
            object value = dataValue?.Value;

            m_name             = new ReportStringProperty(isExpression: true, null, null);
            m_value            = new ReportVariantProperty(isExpression: true);
            m_instance         = new ShimDataValueInstance(name, value);
            m_renderingContext = renderingContext;
        }
Пример #10
0
 private void Init(Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo nameExpr, Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo valueExpr, string name, object value, TypeCode typeCode)
 {
     m_name  = new ReportStringProperty(nameExpr);
     m_value = new ReportVariantProperty(valueExpr);
     if (nameExpr.IsExpression || valueExpr.IsExpression)
     {
         m_instance = new CustomPropertyInstance(this, name, value, typeCode);
     }
     else
     {
         m_instance = null;
     }
 }
Пример #11
0
        string IBaseImage.GetMIMETypeValue()
        {
            ReportStringProperty mIMEType = MIMEType;

            if (mIMEType == null)
            {
                return(null);
            }
            if (!mIMEType.IsExpression)
            {
                return(mIMEType.Value);
            }
            return(BaseGaugeImageDef.EvaluateMIMEType(Instance.ReportScopeInstance, GaugePanelDef.RenderingContext.OdpContext));
        }
Пример #12
0
        internal void ConstructReportItemDefinitionImpl()
        {
            ConstructReportElementDefinitionImpl();
            ReportItemInstance instance = Instance;

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

            Global.Tracer.Assert(instance != null, "(instance != null)");
            if (instance.ReportName != null)
            {
                m_actionItemDef.DrillthroughReportName = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateConstExpression(instance.ReportName);
            }
            else
            {
                m_actionItemDef.DrillthroughReportName = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
            }
            m_reportName = null;
            if (m_parameters != null)
            {
                m_parameters.ConstructParameterDefinitions();
            }
        }
Пример #14
0
        internal void ConstructActionDefinition()
        {
            ActionInstance instance = Instance;

            Global.Tracer.Assert(instance != null);
            if (instance.Label != null)
            {
                m_actionItemDef.Label = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateConstExpression(instance.Label);
            }
            else
            {
                m_actionItemDef.Label = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
            }
            m_label = null;
            if (BookmarkLink != null)
            {
                if (instance.BookmarkLink != null)
                {
                    m_actionItemDef.BookmarkLink = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateConstExpression(instance.BookmarkLink);
                }
                else
                {
                    m_actionItemDef.BookmarkLink = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
                }
                m_bookmark = null;
            }
            if (Hyperlink != null)
            {
                if (instance.HyperlinkText != null)
                {
                    m_actionItemDef.HyperLinkURL = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateConstExpression(instance.HyperlinkText);
                }
                else
                {
                    m_actionItemDef.HyperLinkURL = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
                }
                m_hyperlink = null;
            }
            if (Drillthrough != null)
            {
                Drillthrough.ConstructDrillthoughDefinition();
            }
        }
Пример #15
0
        protected void SetLegendText(RuleBase coreRule)
        {
            ReportStringProperty legendText = m_mapRule.LegendText;

            if (legendText != null)
            {
                if (!legendText.IsExpression)
                {
                    coreRule.LegendText = legendText.Value;
                }
                else
                {
                    coreRule.LegendText = m_mapRule.Instance.LegendText;
                }
            }
            else
            {
                coreRule.LegendText = "";
            }
        }
Пример #16
0
        internal static string GetStyleFontFamily(Style style, StyleInstance styleInstance, string fallbackFont)
        {
            ReportStringProperty fontFamily = style.FontFamily;

            if (IsStylePropertyDefined(fontFamily))
            {
                if (!fontFamily.IsExpression)
                {
                    if (fontFamily != null)
                    {
                        return(fontFamily.Value);
                    }
                }
                else if (styleInstance.FontFamily != null)
                {
                    return(styleInstance.FontFamily);
                }
            }
            return(fallbackFont);
        }
Пример #17
0
        internal 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);
        }
        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(m_mapVectorLayer.Name, text));
                }
            }
            m_mapMapper.RenderActionInfo(mapSpatialElementTemplate.ActionInfo, text, coreSpatialElement, 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(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;

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