Beispiel #1
0
        public override Stream GetImage(ImageType type, out ActionInfoWithDynamicImageMapCollection actionImageMaps)
        {
            actionImageMaps = null;
            Stream stream      = null;
            bool   hasImageMap = false;

            if (m_reportElementDef.IsOldSnapshot)
            {
                Microsoft.ReportingServices.ReportRendering.Chart chart = (Microsoft.ReportingServices.ReportRendering.Chart)m_reportElementDef.RenderReportItem;
                stream = chart.GetImage((Microsoft.ReportingServices.ReportRendering.Chart.ImageType)type, out hasImageMap);
                if (hasImageMap)
                {
                    int dataPointSeriesCount   = chart.DataPointSeriesCount;
                    int dataPointCategoryCount = chart.DataPointCategoryCount;
                    actionImageMaps = new ActionInfoWithDynamicImageMapCollection();
                    for (int i = 0; i < dataPointSeriesCount; i++)
                    {
                        for (int j = 0; j < dataPointCategoryCount; j++)
                        {
                            Microsoft.ReportingServices.ReportRendering.ChartDataPoint chartDataPoint = chart.DataPointCollection[i, j];
                            Microsoft.ReportingServices.ReportRendering.ActionInfo     actionInfo     = chartDataPoint.ActionInfo;
                            if (actionInfo != null)
                            {
                                actionImageMaps.InternalList.Add(new ActionInfoWithDynamicImageMap(m_reportElementDef.RenderingContext, actionInfo, chartDataPoint.MapAreas));
                            }
                        }
                    }
                }
            }
            else
            {
                stream = base.GetImage(type, out actionImageMaps);
            }
            return(stream);
        }
Beispiel #2
0
 internal Chart(IDefinitionPath parentDefinitionPath, int indexIntoParentCollectionDef, bool inSubtotal, Microsoft.ReportingServices.ReportRendering.Chart renderChart, RenderingContext renderingContext)
     : base(parentDefinitionPath, indexIntoParentCollectionDef, inSubtotal, renderChart, renderingContext)
 {
     m_snapshotDataRegionType = Type.Chart;
 }