Exemplo n.º 1
0
 internal void InternalRender(string format, bool allowInternalRenderers, string deviceInfo, PageCountMode pageCountMode, CreateAndRegisterStream createStreamCallback, out Warning[] warnings)
 {
     lock (m_syncObject)
     {
         if (createStreamCallback == null)
         {
             throw new ArgumentNullException("createStreamCallback");
         }
         if (!ValidateRenderingFormat(format))
         {
             throw new ArgumentOutOfRangeException("format");
         }
         EnsureExecutionSession();
         try
         {
             m_lastRenderingWarnings = m_processingHost.Render(format, deviceInfo, PageCountModeToProcessingPaginationMode(pageCountMode), allowInternalRenderers, m_dataSources, createStreamCallback.ToOuterType());
         }
         catch (Exception processingException)
         {
             throw WrapProcessingException(processingException);
         }
         warnings = Warning.FromProcessingMessageList(m_lastRenderingWarnings);
         WriteDebugResults(warnings);
     }
 }
Exemplo n.º 2
0
 public DataSetResult(ParameterInfoCollection finalParameters, ProcessingMessageList warnings, UserProfileState usedUserProfileState, bool successfulCompletion)
 {
     m_parameters           = finalParameters;
     m_warnings             = warnings;
     m_usedUserProfileState = usedUserProfileState;
     m_successfulCompletion = successfulCompletion;
 }
Exemplo n.º 3
0
 internal static Warning[] FromProcessingMessageList(ProcessingMessageList processingWarnings)
 {
     if (processingWarnings == null)
     {
         return(new Warning[0]);
     }
     Warning[] array = new Warning[processingWarnings.Count];
     for (int i = 0; i < processingWarnings.Count; i++)
     {
         array[i] = new Warning(processingWarnings[i].Code.ToString(), processingWarnings[i].Message, processingWarnings[i].ObjectName, processingWarnings[i].ObjectType.ToString(), processingWarnings[i].Severity.ToString());
     }
     return(array);
 }
        protected override void InitializeValue(InitializationContext context)
        {
            int messageCount = context.ErrorContext.MessageCount;

            base.InitializeValue(context);
            ProcessingMessageList messages = context.ErrorContext.Messages;
            int messageCount2 = context.ErrorContext.MessageCount;

            if (messageCount2 > messageCount)
            {
                for (int i = messageCount; i < messageCount2 - messageCount; i++)
                {
                    messages.RemoveAt(i);
                }
                context.ErrorContext.Register(ProcessingErrorCode.rsStateIndicatorInvalidAutoGenerateMinMaxExpression, Severity.Error, context.ObjectType, context.ObjectName, null, m_stateIndicatorName);
            }
        }
        internal override ProcessingMessage Register(ProcessingErrorCode code, Severity severity, ObjectType objectType, string objectName, string propertyName, ProcessingMessageList innerMessages, params string[] arguments)
        {
            if (m_suspendErrors)
            {
                return(null);
            }
            if (m_messages == null)
            {
                m_messages = new ProcessingMessageList();
            }
            ProcessingMessage processingMessage = null;

            if (m_messages.Count < 100 || (severity == Severity.Error && !m_hasError))
            {
                processingMessage = ErrorContext.CreateProcessingMessage(code, severity, objectType, objectName, propertyName, innerMessages, arguments);
                m_messages.Add(processingMessage);
            }
            if (severity == Severity.Error)
            {
                m_hasError = true;
            }
            return(processingMessage);
        }
        public void Deserialize(IntermediateFormatReader reader)
        {
            ParameterInfoCollection parameterInfoCollection  = null;
            ParameterInfoCollection parameterInfoCollection2 = null;

            reader.RegisterDeclaration(ReportSnapshot.m_Declaration);
            while (reader.NextMember())
            {
                switch (reader.CurrentMember.MemberName)
                {
                case MemberName.ExecutionTime:
                    this.m_executionTime = reader.ReadDateTime();
                    break;

                case MemberName.Report:
                    this.m_report = reader.ReadReference <Report>(this);
                    break;

                case MemberName.HasDocumentMap:
                    this.m_hasDocumentMap = reader.ReadBoolean();
                    break;

                case MemberName.HasShowHide:
                    this.m_hasShowHide = reader.ReadBoolean();
                    break;

                case MemberName.HasBookmarks:
                    this.m_hasBookmarks = reader.ReadBoolean();
                    break;

                case MemberName.RequestUserName:
                    this.m_requestUserName = reader.ReadString();
                    break;

                case MemberName.ReportServerUrl:
                    this.m_reportServerUrl = reader.ReadString();
                    break;

                case MemberName.ReportFolder:
                    this.m_reportFolder = reader.ReadString();
                    break;

                case MemberName.Language:
                    this.m_language = reader.ReadString();
                    break;

                case MemberName.ProcessingMessages:
                    this.m_processingMessages = reader.ReadListOfRIFObjects <ProcessingMessageList>();
                    break;

                case MemberName.Parameters:
                    parameterInfoCollection = new ParameterInfoCollection();
                    reader.ReadListOfRIFObjects(parameterInfoCollection);
                    break;

                case MemberName.ImageChunkNames:
                    this.m_cachedDatabaseImages = reader.ReadStringStringHashtable <Dictionary <string, string> >();
                    break;

                case MemberName.GeneratedReportItemChunkNames:
                    this.m_cachedGeneratedReportItems = reader.ReadStringStringHashtable <Dictionary <string, string> >();
                    break;

                case MemberName.HasUserSortFilter:
                    this.m_hasUserSortFilter = reader.ReadBoolean();
                    break;

                case MemberName.AggregateFieldReferences:
                    this.m_aggregateFieldReferences = reader.ReadStringListOfStringDictionary();
                    break;

                case MemberName.SnapshotParameters:
                    parameterInfoCollection2 = (ParameterInfoCollection)reader.ReadRIFObject();
                    break;

                case MemberName.DefinitionHasDocumentMap:
                {
                    object obj = reader.ReadVariant();
                    if (obj != null)
                    {
                        this.m_definitionHasDocumentMap = (bool)obj;
                    }
                    break;
                }

                case MemberName.DocumentMapRenderFormat:
                    this.m_documentMapRenderFormat = reader.ReadString();
                    break;

                default:
                    Global.Tracer.Assert(false);
                    break;
                }
            }
            this.m_parameters = parameterInfoCollection;
            if (parameterInfoCollection != null && parameterInfoCollection.Count != 0)
            {
                return;
            }
            if (parameterInfoCollection2 != null)
            {
                this.m_parameters = parameterInfoCollection2;
            }
        }