internal CustomPropertyCollection(IReportScopeInstance romInstance, RenderingContext renderingContext, ReportElement reportElementOwner, ICustomPropertiesHolder customPropertiesHolder, ObjectType objectType, string objectName) { m_reportElementOwner = reportElementOwner; Microsoft.ReportingServices.ReportIntermediateFormat.DataValueList customProperties = customPropertiesHolder.CustomProperties; if (customProperties == null) { m_list = new List <CustomProperty>(); return; } bool flag = InstancePathItem.IsValidContext(customPropertiesHolder.InstancePath.InstancePath); int count = customProperties.Count; m_list = new List <CustomProperty>(count); for (int i = 0; i < count; i++) { Microsoft.ReportingServices.ReportIntermediateFormat.DataValue dataValue = customProperties[i]; string name = null; object value = null; TypeCode valueTypeCode = TypeCode.Empty; if (flag) { dataValue.EvaluateNameAndValue(m_reportElementOwner, romInstance, customPropertiesHolder.InstancePath, renderingContext.OdpContext, objectType, objectName, out name, out value, out valueTypeCode); } CustomProperty customProperty = new CustomProperty(m_reportElementOwner, renderingContext, dataValue.Name, dataValue.Value, name, value, valueTypeCode); m_list.Add(customProperty); if (flag) { AddPropToLookupTable(name, customProperty); } } }
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; }
public CustomProperty CreateCustomProperty() { if (base.CriGenerationPhase != CriGenerationPhases.Definition) { throw new RenderingObjectModelException(ProcessingErrorCode.rsInvalidOperation); } PrepareCustomProperties(); Microsoft.ReportingServices.ReportIntermediateFormat.DataValue dataValue = new Microsoft.ReportingServices.ReportIntermediateFormat.DataValue(); dataValue.Name = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression(); dataValue.Value = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression(); if (m_reportItemDef.CustomProperties == null) { m_reportItemDef.CustomProperties = new Microsoft.ReportingServices.ReportIntermediateFormat.DataValueList(); } m_reportItemDef.CustomProperties.Add(dataValue); return(CustomProperties.Add(base.RenderingContext, dataValue.Name, dataValue.Value)); }
internal void ConstructCustomPropertyDefinition(Microsoft.ReportingServices.ReportIntermediateFormat.DataValue dataValueDef) { Global.Tracer.Assert(m_reportElementOwner != null && m_instance != null, "m_reportElementOwner != null && m_instance != null"); if (m_instance.Name != null) { dataValueDef.Name = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateConstExpression(m_instance.Name); } else { dataValueDef.Name = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression(); } if (m_instance.Value != null) { dataValueDef.Value = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateConstExpression((string)m_instance.Value); } else { dataValueDef.Value = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression(); } Init(dataValueDef.Name, dataValueDef.Value, m_instance.Name, m_instance.Value, m_instance.TypeCode); }