示例#1
0
 public override ReportProcessing.ProcessingContext ParametersInternalProcessingContext(ErrorContext errorContext, DateTime executionTimeStamp, bool isSnapshot)
 {
     return(new ReportProcessing.ReportProcessingContext(null, this.DataSources, base.RequestUserName, base.UserLanguage, base.ReportContext, errorContext, base.InteractiveExecution, executionTimeStamp, base.AllowUserProfileState, isSnapshot, this.CreateDataExtensionInstanceFunction, base.ReportRuntimeSetup, base.JobContext, base.ExtFactory, base.DataProtection));
 }
        private void ResolveAssemblylocations(StringList codeModules, CompilerParameters options, ErrorContext errorContext, AppDomain compilationTempAppDomain)
        {
            AssemblyLocationResolver assemblyLocationResolver = AssemblyLocationResolver.CreateResolver(compilationTempAppDomain);

            for (int num = codeModules.Count - 1; num >= 0; num--)
            {
                try
                {
                    options.ReferencedAssemblies.Add(assemblyLocationResolver.LoadAssemblyAndResolveLocation(codeModules[num]));
                }
                catch (Exception ex)
                {
                    ProcessingMessage processingMessage = errorContext.Register(ProcessingErrorCode.rsErrorLoadingCodeModule, Severity.Error, ObjectType.Report, null, null, codeModules[num], ex.Message);
                    if (Global.Tracer.TraceError && processingMessage != null)
                    {
                        Global.Tracer.Trace(TraceLevel.Error, processingMessage.Message + Environment.NewLine + ex.ToString());
                    }
                }
            }
        }
示例#3
0
        public override ReportProcessing.ProcessingContext CreateInternalProcessingContext(string chartName, Report report, ErrorContext errorContext, DateTime executionTime, UserProfileState allowUserProfileState, bool isHistorySnapshot, bool snapshotProcessing, bool processWithCachedData, ReportProcessing.GetReportChunk getChunkCallback, ReportProcessing.CreateReportChunk cacheDataCallback)
        {
            SubreportCallbackAdapter @object = new SubreportCallbackAdapter(base.OnDemandSubReportCallback, errorContext);

            return(new ReportProcessing.ReportProcessingContext(chartName, this.DataSources, base.RequestUserName, base.UserLanguage, @object.SubReportCallback, base.ReportContext, report, errorContext, base.CreateReportChunkCallback, base.GetResourceCallback, base.InteractiveExecution, executionTime, allowUserProfileState, isHistorySnapshot, snapshotProcessing, processWithCachedData, getChunkCallback, cacheDataCallback, this.CreateDataExtensionInstanceFunction, base.ReportRuntimeSetup, base.JobContext, base.ExtFactory, base.DataProtection));
        }
 public ReportCompileTime(ExpressionParser langParser, ErrorContext errorContext)
 {
     this.m_langParser   = langParser;
     this.m_errorContext = errorContext;
     this.m_builder      = new ExprHostBuilder();
 }
 public SubreportCallbackAdapter(ReportProcessing.OnDemandSubReportCallback subreportCallback, ErrorContext errorContext)
 {
     this.m_subreportCallback = subreportCallback;
     this.m_errorContext      = errorContext;
 }
        public void Populate(ErrorContext errorContext)
        {
            Global.Tracer.Assert(this.m_unpopulated);
            Global.Tracer.Assert(null != this.m_entries);
            Hashtable hashtable = new Hashtable();
            int       num       = -1;

            if (0 < this.m_entries.Count)
            {
                if (this.m_normal)
                {
                    this.m_entries.Sort();
                }
                this.m_nonComputedReportItems = new ReportItemList();
                this.m_computedReportItems    = new ReportItemList();
                this.m_sortedReportItemList   = new ReportItemIndexerList();
                for (int i = 0; i < this.m_entries.Count; i++)
                {
                    ReportItem reportItem = this.m_entries[i];
                    Global.Tracer.Assert(null != reportItem);
                    if (reportItem is DataRegion)
                    {
                        hashtable[reportItem.Name] = reportItem;
                    }
                    ReportItemIndexer reportItemIndexer = default(ReportItemIndexer);
                    if (reportItem.Computed)
                    {
                        reportItemIndexer.Index = this.m_computedReportItems.Add(reportItem);
                    }
                    else
                    {
                        reportItemIndexer.Index = this.m_nonComputedReportItems.Add(reportItem);
                    }
                    reportItemIndexer.IsComputed = reportItem.Computed;
                    this.m_sortedReportItemList.Add(reportItemIndexer);
                }
            }
            this.m_unpopulated = false;
            this.m_entries     = null;
            for (int j = 0; j < this.Count; j++)
            {
                ReportItem reportItem2 = this[j];
                Global.Tracer.Assert(null != reportItem2);
                if (reportItem2.RepeatWith != null)
                {
                    if (reportItem2 is DataRegion || reportItem2 is SubReport || (reportItem2 is Rectangle && ((Rectangle)reportItem2).ContainsDataRegionOrSubReport()))
                    {
                        errorContext.Register(ProcessingErrorCode.rsInvalidRepeatWith, Severity.Error, reportItem2.ObjectType, reportItem2.Name, "RepeatWith");
                    }
                    if (!this.m_normal || !hashtable.ContainsKey(reportItem2.RepeatWith))
                    {
                        errorContext.Register(ProcessingErrorCode.rsRepeatWithNotPeerDataRegion, Severity.Error, reportItem2.ObjectType, reportItem2.Name, "RepeatWith", reportItem2.RepeatWith);
                    }
                    DataRegion dataRegion = (DataRegion)hashtable[reportItem2.RepeatWith];
                    if (dataRegion != null)
                    {
                        if (dataRegion.RepeatSiblings == null)
                        {
                            dataRegion.RepeatSiblings = new IntList();
                        }
                        dataRegion.RepeatSiblings.Add(j);
                    }
                }
                if (this.m_linkToChildName != null && num < 0 && reportItem2.Name.Equals(this.m_linkToChildName, StringComparison.Ordinal))
                {
                    num = j;
                    ((Rectangle)reportItem2.Parent).LinkToChild = j;
                }
            }
        }
        private void RegisterOverlappingItems(InitializationContext context, int count, SortedReportItemIndexList sortedTop, bool isSortedVertically)
        {
            Hashtable hashtable = new Hashtable(count);

            for (int i = 0; i < count - 1; i++)
            {
                int    num  = sortedTop[i];
                double num2 = isSortedVertically ? this.m_entries[num].AbsoluteBottomValue : this.m_entries[num].AbsoluteRightValue;
                bool   flag = true;
                for (int j = i + 1; j < count; j++)
                {
                    if (!flag)
                    {
                        break;
                    }
                    int num3 = sortedTop[j];
                    Global.Tracer.Assert(num != num3, "(currentIndex != peerIndex)");
                    double num4 = isSortedVertically ? this.m_entries[num3].AbsoluteTopValue : this.m_entries[num3].AbsoluteLeftValue;
                    if (num2 > num4)
                    {
                        int     num5    = Math.Min(num, num3);
                        int     num6    = Math.Max(num, num3);
                        IntList intList = hashtable[num5] as IntList;
                        if (intList == null)
                        {
                            intList         = new IntList();
                            hashtable[num5] = intList;
                        }
                        intList.Add(num6);
                    }
                    else
                    {
                        flag = false;
                    }
                }
            }
            foreach (int key in hashtable.Keys)
            {
                IntList intList2 = hashtable[key] as IntList;
                double  num8     = isSortedVertically ? this.m_entries[key].AbsoluteLeftValue : this.m_entries[key].AbsoluteTopValue;
                double  num9     = isSortedVertically ? this.m_entries[key].AbsoluteRightValue : this.m_entries[key].AbsoluteBottomValue;
                for (int k = 0; k < intList2.Count; k++)
                {
                    int    index = intList2[k];
                    double num10 = isSortedVertically ? this.m_entries[index].AbsoluteLeftValue : this.m_entries[index].AbsoluteTopValue;
                    double num11 = isSortedVertically ? this.m_entries[index].AbsoluteRightValue : this.m_entries[index].AbsoluteBottomValue;
                    if (num10 > num8 && num10 < num9)
                    {
                        goto IL_023a;
                    }
                    if (num11 > num8 && num11 < num9)
                    {
                        goto IL_023a;
                    }
                    if (num10 <= num8 && num9 <= num11)
                    {
                        goto IL_023a;
                    }
                    if (num8 <= num10 && num11 <= num9)
                    {
                        goto IL_023a;
                    }
                    continue;
IL_023a:
                    context.ErrorContext.Register(ProcessingErrorCode.rsOverlappingReportItems, Severity.Warning, this.m_entries[key].ObjectType, this.m_entries[key].Name, null, ErrorContext.GetLocalizedObjectTypeString(this.m_entries[index].ObjectType), this.m_entries[index].Name);
                }
            }
        }
 public ExpressionParser(ErrorContext errorContext)
 {
     this.m_errorContext = errorContext;
 }