Ejemplo n.º 1
0
        internal int GetStyleAttribute(Microsoft.ReportingServices.ReportProcessing.ObjectType objectType, string objectName, string styleAttributeName, OnDemandProcessingContext context, ref bool sharedFormatSettings, out string styleStringValue)
        {
            styleStringValue = null;
            int           result         = 0;
            object        obj            = null;
            AttributeInfo styleAttribute = null;

            if (GetAttributeInfo(styleAttributeName, out styleAttribute))
            {
                if (styleAttribute.IsExpression)
                {
                    result = 1;
                    sharedFormatSettings = false;
                    obj = EvaluateStyle(objectType, objectName, styleAttributeName, context);
                }
                else
                {
                    result = 2;
                    obj    = styleAttribute.Value;
                }
            }
            if (obj != null)
            {
                styleStringValue = (string)obj;
            }
            return(result);
        }
Ejemplo n.º 2
0
 private void ValidateParentBoundaries(InitializationContext context, Microsoft.ReportingServices.ReportProcessing.ObjectType objectType, string objectName)
 {
     if (m_parent == null || m_parent is Report || m_parent is ReportSection)
     {
         return;
     }
     if (objectType == Microsoft.ReportingServices.ReportProcessing.ObjectType.Line)
     {
         if (AbsoluteTopValue < 0.0)
         {
             context.ErrorContext.Register(ProcessingErrorCode.rsReportItemOutsideContainer, Severity.Warning, objectType, objectName, "Top".ToLowerInvariant());
         }
         if (AbsoluteLeftValue < 0.0)
         {
             context.ErrorContext.Register(ProcessingErrorCode.rsReportItemOutsideContainer, Severity.Warning, objectType, objectName, "Left".ToLowerInvariant());
         }
     }
     if (AbsoluteBottomValue > RoundSize(m_parent.HeightValue))
     {
         context.ErrorContext.Register(ProcessingErrorCode.rsReportItemOutsideContainer, Severity.Warning, objectType, objectName, "Bottom".ToLowerInvariant());
     }
     if (AbsoluteRightValue > RoundSize(m_parent.WidthValue))
     {
         context.ErrorContext.Register(ProcessingErrorCode.rsReportItemOutsideContainer, Severity.Warning, objectType, objectName, "Right".ToLowerInvariant());
     }
 }
        internal RuntimeGroupingObjTree(RuntimeHierarchyObj owner, Microsoft.ReportingServices.ReportProcessing.ObjectType objectType)
            : base(owner, objectType)
        {
            OnDemandProcessingContext odpContext = m_owner.OdpContext;

            m_tree = new BTree(owner, odpContext, owner.Depth + 1);
        }
        public virtual void Deserialize(IntermediateFormatReader reader)
        {
            reader.RegisterDeclaration(m_declaration);
            IScalabilityCache scalabilityCache = reader.PersistenceHelper as IScalabilityCache;

            while (reader.NextMember())
            {
                switch (reader.CurrentMember.MemberName)
                {
                case MemberName.OdpContext:
                {
                    int id = reader.ReadInt32();
                    m_odpContext = (OnDemandProcessingContext)scalabilityCache.FetchStaticReference(id);
                    break;
                }

                case MemberName.ObjectType:
                    m_objectType = (Microsoft.ReportingServices.ReportProcessing.ObjectType)reader.ReadEnum();
                    break;

                case MemberName.Depth:
                    m_depth = reader.ReadInt32();
                    break;

                default:
                    Global.Tracer.Assert(condition: false);
                    break;
                }
            }
        }
Ejemplo n.º 5
0
 internal RuntimeDetailObj(RuntimeDetailObj detailRoot, Microsoft.ReportingServices.ReportProcessing.ObjectType objectType)
     : base(detailRoot.OdpContext, objectType, detailRoot.Depth)
 {
     m_hierarchyRoot = (RuntimeDetailObjReference)detailRoot.SelfReference;
     m_outerScope    = detailRoot.m_outerScope;
     m_dataRegionDef = detailRoot.m_dataRegionDef;
 }
 protected RuntimeDataRegionObj(OnDemandProcessingContext odpContext, Microsoft.ReportingServices.ReportProcessing.ObjectType objectType, int depth)
 {
     m_odpContext = odpContext;
     m_objectType = objectType;
     m_depth      = depth;
     m_odpContext.TablixProcessingScalabilityCache.AllocateAndPin(this, m_depth);
 }
        internal RuntimeGroupingObjHash(RuntimeHierarchyObj owner, Microsoft.ReportingServices.ReportProcessing.ObjectType objectType)
            : base(owner, objectType)
        {
            OnDemandProcessingContext odpContext = owner.OdpContext;

            m_hashtable = new ScalableDictionary <object, IReference <RuntimeHierarchyObj> >(owner.Depth + 1, odpContext.TablixProcessingScalabilityCache, 101, 27, odpContext.ProcessingComparer);
        }
Ejemplo n.º 8
0
 private Filters(FilterTypes filterType, List <Microsoft.ReportingServices.ReportIntermediateFormat.Filter> filters, Microsoft.ReportingServices.ReportProcessing.ObjectType objectType, string objectName, OnDemandProcessingContext processingContext, int scalabilityPriority)
 {
     m_filterType          = filterType;
     m_filters             = filters;
     m_objectType          = objectType;
     m_objectName          = objectName;
     m_processingContext   = processingContext;
     m_scalabilityPriority = scalabilityPriority;
 }
Ejemplo n.º 9
0
 internal ExprCompileTimeInfo(Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo expression, ExpressionParser.ExpressionContext context)
 {
     ExpressionInfo    = expression;
     OwnerObjectType   = context.ObjectType;
     OwnerObjectName   = context.ObjectName;
     OwnerPropertyName = context.PropertyName;
     NumErrors         = 0;
     NumWarnings       = 0;
 }
 void IErrorContext.Register(ProcessingErrorCode code, Severity severity, Microsoft.ReportingServices.ReportProcessing.ObjectType objectType, string objectName, string propertyName, params string[] arguments)
 {
     if (!m_aggregateResult.HasCode)
     {
         m_aggregateResult.HasCode   = true;
         m_aggregateResult.Code      = code;
         m_aggregateResult.Severity  = severity;
         m_aggregateResult.Arguments = arguments;
     }
 }
 internal void Initialize(InitializationContext context, string dataSetName, Microsoft.ReportingServices.ReportProcessing.ObjectType objectType, string objectName, string propertyName)
 {
     context.ExprHostBuilder.LookupDestStart();
     if (m_destinationExpr != null)
     {
         m_destinationExpr.LookupInitialize(dataSetName, objectType, objectName, propertyName, context);
         context.ExprHostBuilder.LookupDestExpr(m_destinationExpr);
     }
     m_exprHostID = context.ExprHostBuilder.LookupDestEnd();
 }
Ejemplo n.º 12
0
        internal object EvaluateStyle(Microsoft.ReportingServices.ReportProcessing.ObjectType objectType, string objectName, StyleId styleId, OnDemandProcessingContext context)
        {
            AttributeInfo styleAttribute = null;

            if (GetAttributeInfo(GetStyleString(styleId), out styleAttribute))
            {
                return(EvaluateStyle(objectType, objectName, styleAttribute, styleId, context));
            }
            return(null);
        }
 internal RuntimeHierarchyObj(RuntimeHierarchyObj outerHierarchy, Microsoft.ReportingServices.ReportProcessing.ObjectType objectType, int level)
     : base(outerHierarchy.OdpContext, objectType, level)
 {
     if (outerHierarchy.m_expression != null)
     {
         ConstructorHelper(outerHierarchy.m_expression.ExpressionIndex + 1, outerHierarchy.m_hierarchyRoot);
     }
     else
     {
         ConstructorHelper(-1, outerHierarchy.m_hierarchyRoot);
     }
 }
Ejemplo n.º 14
0
 internal void Initialize(InitializationContext context, string dataSetName, Microsoft.ReportingServices.ReportProcessing.ObjectType objectType, string objectName, string propertyName)
 {
     context.ExprHostBuilder.LookupStart();
     if (m_resultExpr != null)
     {
         m_resultExpr.LookupInitialize(dataSetName, objectType, objectName, propertyName, context);
         context.ExprHostBuilder.LookupResultExpr(m_resultExpr);
     }
     if (m_sourceExpr != null)
     {
         m_sourceExpr.Initialize(propertyName, context);
         context.ExprHostBuilder.LookupSourceExpr(m_sourceExpr);
     }
     ExprHostID = context.ExprHostBuilder.LookupEnd();
 }
 public virtual void Deserialize(IntermediateFormatReader reader)
 {
     reader.RegisterDeclaration(m_declaration);
     while (reader.NextMember())
     {
         MemberName memberName = reader.CurrentMember.MemberName;
         if (memberName == MemberName.ObjectType)
         {
             m_objectType = (Microsoft.ReportingServices.ReportProcessing.ObjectType)reader.ReadEnum();
         }
         else
         {
             Global.Tracer.Assert(condition: false);
         }
     }
 }
 internal void Initialize(InitializationContext context)
 {
     if (m_queryParameters != null)
     {
         Microsoft.ReportingServices.ReportProcessing.ObjectType objectType = context.ObjectType;
         string objectName = context.ObjectName;
         context.ObjectType = Microsoft.ReportingServices.ReportProcessing.ObjectType.QueryParameter;
         context.ExprHostBuilder.QueryParametersStart();
         for (int i = 0; i < m_queryParameters.Count; i++)
         {
             ParameterValue parameterValue = m_queryParameters[i];
             context.ObjectName = parameterValue.Name;
             parameterValue.Initialize(null, context, queryParam: true);
         }
         context.ExprHostBuilder.QueryParametersEnd();
         context.ObjectType = objectType;
         context.ObjectName = objectName;
     }
 }
        private bool LoadGeneratedReportItemDefinition()
        {
            if (!base.RenderingContext.OdpContext.OdpMetadata.ReportSnapshot.TryGetGeneratedReportItemChunkName(GetGeneratedDefinitionChunkKey(), out string name))
            {
                return(false);
            }
            string mimeType;
            Stream chunk = base.RenderingContext.OdpContext.ChunkFactory.GetChunk(name, Microsoft.ReportingServices.ReportProcessing.ReportProcessing.ReportChunkTypes.GeneratedReportItems, ChunkMode.Open, out mimeType);

            if (chunk == null)
            {
                return(false);
            }
            using (chunk)
            {
                IntermediateFormatReader intermediateFormatReader = new IntermediateFormatReader(chunk, new ProcessingRIFObjectCreator((Microsoft.ReportingServices.ReportIntermediateFormat.IDOwner)m_reportItemDef.ParentInstancePath, m_reportItemDef.Parent));
                Microsoft.ReportingServices.ReportIntermediateFormat.ReportItem reportItem = (Microsoft.ReportingServices.ReportIntermediateFormat.ReportItem)intermediateFormatReader.ReadRIFObject();
                Global.Tracer.Assert(!intermediateFormatReader.HasReferences, "!reader.HasReferences");
                reportItem.GlobalID = -CriDef.GlobalID;
                if (reportItem.StyleClass != null)
                {
                    reportItem.StyleClass.InitializeForCRIGeneratedReportItem();
                }
                reportItem.Visibility = m_reportItemDef.Visibility;
                Microsoft.ReportingServices.ReportProcessing.ObjectType objectType = reportItem.ObjectType;
                if (objectType == Microsoft.ReportingServices.ReportProcessing.ObjectType.Image)
                {
                    Image image = new Image(ParentScope, base.ParentDefinitionPath, m_indexIntoParentCollectionDef, (Microsoft.ReportingServices.ReportIntermediateFormat.Image)reportItem, base.RenderingContext);
                    image.CriOwner           = this;
                    image.CriGenerationPhase = CriGenerationPhases.None;
                    m_generatedReportItem    = image;
                }
                else
                {
                    Global.Tracer.Assert(condition: false, "Unexpected CRI generated report item type: " + reportItem.ObjectType);
                }
            }
            return(true);
        }
		internal void Initialize(InitializationContext context, string dataSetName, Microsoft.ReportingServices.ReportProcessing.ObjectType objectType, string objectName, string propertyName)
		{
			if (base.Expressions == null || base.Expressions.Length == 0)
			{
				return;
			}
			for (int i = 0; i < base.Expressions.Length; i++)
			{
				ExpressionInfo expressionInfo = base.Expressions[i];
				if (base.AggregateType == AggregateTypes.Previous && m_scope != null && expressionInfo.Aggregates != null)
				{
					foreach (DataAggregateInfo aggregate in expressionInfo.Aggregates)
					{
						if (aggregate.GetScope(out string scope) && !context.IsSameOrChildScope(m_scope, scope))
						{
							context.ErrorContext.Register(ProcessingErrorCode.rsInvalidScopeInInnerAggregateOfPreviousAggregate, Severity.Error, objectType, objectName, propertyName);
						}
					}
				}
				expressionInfo.AggregateInitialize(dataSetName, objectType, objectName, propertyName, context);
			}
		}
Ejemplo n.º 19
0
        internal void GetStyleAttribute(Microsoft.ReportingServices.ReportProcessing.ObjectType objectType, string objectName, string styleAttributeName, OnDemandProcessingContext context, ref bool sharedFormatSettings, out int styleIntValue)
        {
            styleIntValue = 0;
            AttributeInfo styleAttribute = null;

            if (!GetAttributeInfo(styleAttributeName, out styleAttribute))
            {
                return;
            }
            if (styleAttribute.IsExpression)
            {
                sharedFormatSettings = false;
                object obj = EvaluateStyle(objectType, objectName, styleAttributeName, context);
                if (obj != null)
                {
                    styleIntValue = (int)obj;
                }
            }
            else
            {
                styleIntValue = styleAttribute.IntValue;
            }
        }
 internal RuntimeRDLDataRegionObj(IReference<IScope> outerScope, Microsoft.ReportingServices.ReportIntermediateFormat.DataRegion dataRegionDef, ref DataActions dataAction, OnDemandProcessingContext odpContext, bool onePassProcess, List<Microsoft.ReportingServices.ReportIntermediateFormat.RunningValueInfo> runningValues, Microsoft.ReportingServices.ReportProcessing.ObjectType objectType, int level)
     : base(odpContext, objectType, level)
 {
     m_dataRegionDef = dataRegionDef;
     m_outerScope = outerScope;
     RuntimeDataRegionObj.CreateAggregates(m_odpContext, dataRegionDef.Aggregates, ref m_nonCustomAggregates, ref m_customAggregates);
     if (dataRegionDef.DataScopeInfo != null)
     {
         RuntimeDataRegionObj.CreateAggregates(m_odpContext, dataRegionDef.DataScopeInfo.AggregatesOfAggregates, ref m_aggregatesOfAggregates);
     }
     if (dataRegionDef.Filters != null)
     {
         m_filters = new Filters(Filters.FilterTypes.DataRegionFilter, (IReference<Microsoft.ReportingServices.ReportProcessing.ReportProcessing.IFilterOwner>)base.SelfReference, dataRegionDef.Filters, dataRegionDef.ObjectType, dataRegionDef.Name, m_odpContext, level + 1);
         return;
     }
     m_outerDataAction = dataAction;
     m_dataAction = dataAction;
     dataAction = DataActions.None;
 }
Ejemplo n.º 21
0
 internal RuntimeTablixGroupLeafObj(RuntimeDataTablixGroupRootObjReference groupRootRef, Microsoft.ReportingServices.ReportProcessing.ObjectType objectType)
     : base(groupRootRef, objectType)
 {
 }
        internal RuntimeDataTablixObj(IReference <IScope> outerScope, Microsoft.ReportingServices.ReportIntermediateFormat.DataRegion dataTablixDef, ref DataActions dataAction, OnDemandProcessingContext odpContext, bool onePassProcess, Microsoft.ReportingServices.ReportProcessing.ObjectType objectType)
            : base(outerScope, dataTablixDef, ref dataAction, odpContext, onePassProcess, dataTablixDef.RunningValues, objectType, outerScope.Value().Depth + 1)
        {
            ConstructorHelper(ref dataAction, onePassProcess, out bool handleMyDataAction, out DataActions innerDataAction);
            m_innerDataAction = innerDataAction;
            DataActions userSortDataAction = HandleSortFilterEvent();

            ConstructRuntimeStructure(ref innerDataAction, onePassProcess);
            HandleDataAction(handleMyDataAction, innerDataAction, userSortDataAction);
            m_odpContext.CreatedScopeInstance(m_dataRegionDef);
            m_scopeInstanceNumber = RuntimeDataRegionObj.AssignScopeInstanceNumber(m_dataRegionDef.DataScopeInfo);
        }
        internal static RuntimeGroupingObj CreateGroupingObj(GroupingTypes type, RuntimeHierarchyObj owner, Microsoft.ReportingServices.ReportProcessing.ObjectType objectType)
        {
            switch (type)
            {
            case GroupingTypes.None:
                return(new RuntimeGroupingObjLinkedList(owner, objectType));

            case GroupingTypes.Hash:
                return(new RuntimeGroupingObjHash(owner, objectType));

            case GroupingTypes.Sort:
                return(new RuntimeGroupingObjTree(owner, objectType));

            case GroupingTypes.Detail:
                return(new RuntimeGroupingObjDetail(owner, objectType));

            case GroupingTypes.DetailUserSort:
                return(new RuntimeGroupingObjDetailUserSort(owner, objectType));

            case GroupingTypes.NaturalGroup:
                return(new RuntimeGroupingObjNaturalGroup(owner, objectType));

            default:
                Global.Tracer.Assert(condition: false, "Unexpected GroupingTypes");
                throw new InvalidOperationException();
            }
        }
 internal RuntimeGroupingObj(RuntimeHierarchyObj owner, Microsoft.ReportingServices.ReportProcessing.ObjectType objectType)
 {
     m_owner      = owner;
     m_objectType = objectType;
 }
Ejemplo n.º 25
0
 internal object EvaluateDrillthroughParamValue(IReportScopeInstance romInstance, OnDemandProcessingContext context, IInstancePath ownerItem, List <string> fieldsUsedInOwnerValue, ParameterValue paramValue, Microsoft.ReportingServices.ReportProcessing.ObjectType objectType, string objectName)
 {
     context.SetupContext(ownerItem, romInstance);
     Microsoft.ReportingServices.RdlExpressions.ReportRuntime reportRuntime = context.ReportRuntime;
     reportRuntime.FieldsUsedInCurrentActionOwnerValue = fieldsUsedInOwnerValue;
     Microsoft.ReportingServices.RdlExpressions.ParameterValueResult parameterValueResult = reportRuntime.EvaluateParameterValueExpression(paramValue, objectType, objectName, "DrillthroughParameterValue");
     reportRuntime.FieldsUsedInCurrentActionOwnerValue = null;
     return(parameterValueResult.Value);
 }
Ejemplo n.º 26
0
 internal bool EvaluateDrillthroughParamOmit(IReportScopeInstance romInstance, OnDemandProcessingContext context, IInstancePath ownerItem, ParameterValue paramValue, Microsoft.ReportingServices.ReportProcessing.ObjectType objectType, string objectName)
 {
     context.SetupContext(ownerItem, romInstance);
     return(context.ReportRuntime.EvaluateParamValueOmitExpression(paramValue, objectType, objectName));
 }
Ejemplo n.º 27
0
 internal Filters(FilterTypes filterType, RuntimeParameterDataSet owner, List <Microsoft.ReportingServices.ReportIntermediateFormat.Filter> filters, Microsoft.ReportingServices.ReportProcessing.ObjectType objectType, string objectName, OnDemandProcessingContext processingContext, int scalabilityPriority)
     : this(filterType, filters, objectType, objectName, processingContext, scalabilityPriority)
 {
     m_ownerObj = owner;
 }
Ejemplo n.º 28
0
 internal Filters(FilterTypes filterType, IReference <Microsoft.ReportingServices.ReportProcessing.ReportProcessing.IFilterOwner> owner, List <Microsoft.ReportingServices.ReportIntermediateFormat.Filter> filters, Microsoft.ReportingServices.ReportProcessing.ObjectType objectType, string objectName, OnDemandProcessingContext processingContext, int scalabilityPriority)
     : this(filterType, filters, objectType, objectName, processingContext, scalabilityPriority)
 {
     m_owner = owner;
 }
 internal RuntimeChartCriObj(IReference <IScope> outerScope, Microsoft.ReportingServices.ReportIntermediateFormat.DataRegion dataRegionDef, ref DataActions dataAction, OnDemandProcessingContext odpContext, bool onePassProcess, Microsoft.ReportingServices.ReportProcessing.ObjectType objectType)
     : base(outerScope, dataRegionDef, ref dataAction, odpContext, onePassProcess, objectType)
 {
 }
Ejemplo n.º 30
0
 private void RegisterError(CompilerError error, ref int numErrors, ref int numWarnings, Microsoft.ReportingServices.ReportProcessing.ObjectType objectType, string objectName, string propertyName, ProcessingErrorCode errorCode)
 {
     if ((error.IsWarning ? numWarnings : numErrors) < 1)
     {
         bool     flag = false;
         Severity severity;
         if (error.IsWarning)
         {
             flag     = true;
             severity = Severity.Warning;
             numWarnings++;
         }
         else
         {
             flag     = true;
             severity = Severity.Error;
             numErrors++;
         }
         if (flag)
         {
             m_errorContext.Register(errorCode, severity, objectType, objectName, propertyName, FormatError(error), error.Line.ToString(CultureInfo.InvariantCulture));
         }
     }
 }