Ejemplo n.º 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;
            }
        }
        private void SaveGeneratedReportItemInstance()
        {
            if (m_dynamicWidth != null || m_dynamicHeight != null)
            {
                return;
            }
            OnDemandProcessingContext odpContext = base.RenderingContext.OdpContext;

            Microsoft.ReportingServices.ReportIntermediateFormat.ReportSnapshot reportSnapshot = odpContext.OdpMetadata.ReportSnapshot;
            IChunkFactory chunkFactory = odpContext.ChunkFactory;

            if (CriDef.RepeatWith == null)
            {
                string text = CreateChunkName();
                using (Stream stream = chunkFactory.CreateChunk(text, Microsoft.ReportingServices.ReportProcessing.ReportProcessing.ReportChunkTypes.GeneratedReportItems, null))
                {
                    new IntermediateFormatWriter(stream, odpContext.GetActiveCompatibilityVersion()).Write(m_generatedReportItem.Instance);
                    stream.Flush();
                }
                reportSnapshot.AddGeneratedReportItemChunkName(GetGeneratedInstanceChunkKey(), text);
            }
            else
            {
                ImageInstance imageInstance = (ImageInstance)m_generatedReportItem.Instance;
                reportSnapshot.AddImageChunkName(name: imageInstance.StreamName = ImageHelper.StoreImageDataInChunk(Microsoft.ReportingServices.ReportProcessing.ReportProcessing.ReportChunkTypes.Image, imageInstance.ImageData, imageInstance.MIMEType, base.RenderingContext.OdpContext.OdpMetadata, base.RenderingContext.OdpContext.ChunkFactory), definitionKey: GetGeneratedInstanceChunkKey());
            }
        }
Ejemplo n.º 3
0
        internal override void CompleteCriGeneratedInstanceEvaluation()
        {
            Global.Tracer.Assert(base.CriGenerationPhase == CriGenerationPhases.Instance, "(CriGenerationPhase == CriGenerationPhases.Instance)");
            ImageInstance imageInstance = ImageInstance;

            Global.Tracer.Assert(imageInstance != null, "(instance != null)");
            if (imageInstance.ActionInfoWithDynamicImageMapAreas != null)
            {
                base.CriGenerationPhase = CriGenerationPhases.Definition;
                imageInstance.ActionInfoWithDynamicImageMapAreas.ConstructDefinitions();
                base.CriGenerationPhase = CriGenerationPhases.Instance;
            }
        }