private void GenerateSimpleReportItemDocumentMap(AspNetCore.ReportingServices.OnDemandReportRendering.ReportItem item)
 {
     if (this.m_generateDocMap)
     {
         string documentMapLabel = item.Instance.DocumentMapLabel;
         if (documentMapLabel != null)
         {
             this.WriteDocumentMapNode(documentMapLabel, item.Instance.UniqueName);
         }
     }
 }
Example #2
0
        private static int AddMapArea(MapAreaInfo mapAreaInfo, ActionInfoWithDynamicImageMapCollection actions, ReportItem reportItem)
        {
            if (mapAreaInfo.Tag == null)
            {
                return(-1);
            }
            int num = (int)mapAreaInfo.Tag;
            ActionInfoWithDynamicImageMap actionInfoWithDynamicImageMap = actions.InternalList[num];

            if (actionInfoWithDynamicImageMap.Actions.Count <= 0 && string.IsNullOrEmpty(mapAreaInfo.ToolTip))
            {
                return(-1);
            }
            actionInfoWithDynamicImageMap.CreateImageMapAreaInstance(mapAreaInfo.MapAreaShape, mapAreaInfo.Coordinates, mapAreaInfo.ToolTip);
            return(num);
        }
Example #3
0
        public static ActionInfoWithDynamicImageMapCollection GetImageMaps(IEnumerable <MapAreaInfo> mapAreaInfoList, ActionInfoWithDynamicImageMapCollection actions, ReportItem reportItem)
        {
            List <ActionInfoWithDynamicImageMap> list = new List <ActionInfoWithDynamicImageMap>();

            bool[] array = new bool[actions.Count];
            foreach (MapAreaInfo mapAreaInfo in mapAreaInfoList)
            {
                MapAreaInfo current = mapAreaInfo;
                int         num     = MappingHelper.AddMapArea(current, actions, reportItem);
                if (num > -1 && !array[num])
                {
                    list.Add(((ReportElementCollectionBase <ActionInfoWithDynamicImageMap>)actions)[num]);
                    array[num] = true;
                }
                else if (!string.IsNullOrEmpty(current.ToolTip))
                {
                    string text = default(string);
                    ActionInfoWithDynamicImageMap actionInfoWithDynamicImageMap = MappingHelper.CreateActionInfoDynamic(reportItem, (ActionInfo)null, current.ToolTip, out text);
                    if (actionInfoWithDynamicImageMap != null)
                    {
                        actionInfoWithDynamicImageMap.CreateImageMapAreaInstance(current.MapAreaShape, current.Coordinates, current.ToolTip);
                        list.Add(actionInfoWithDynamicImageMap);
                    }
                }
            }
            actions.InternalList.Clear();
            actions.InternalList.AddRange(list);
            if (actions.Count == 0)
            {
                return(null);
            }
            return(actions);
        }
Example #4
0
 public static ActionInfoWithDynamicImageMap CreateActionInfoDynamic(ReportItem reportItem, ActionInfo actionInfo, string toolTip, out string href)
 {
     return(MappingHelper.CreateActionInfoDynamic(reportItem, actionInfo, toolTip, out href, true));
 }
Example #5
0
 public ReportItemVisibilityInstance(ReportItem reportitem)
     : base(reportitem.ReportScope)
 {
     this.m_reportItem = reportitem;
 }
 private void Visit(AspNetCore.ReportingServices.OnDemandReportRendering.ReportItem item)
 {
     if (item != null && item.Instance != null)
     {
         bool generateDocMap = this.m_generateDocMap;
         if (this.ProcessVisibilityAndContinue(item.Visibility, item.Instance.Visibility, null))
         {
             if (item is AspNetCore.ReportingServices.OnDemandReportRendering.Line || item is AspNetCore.ReportingServices.OnDemandReportRendering.Chart || item is AspNetCore.ReportingServices.OnDemandReportRendering.GaugePanel || item is AspNetCore.ReportingServices.OnDemandReportRendering.Map)
             {
                 this.GenerateSimpleReportItemDocumentMap(item);
             }
             else if (item is AspNetCore.ReportingServices.OnDemandReportRendering.TextBox)
             {
                 this.GenerateSimpleReportItemDocumentMap(item);
                 this.VisitStyle(item.Style);
             }
             else if (item is AspNetCore.ReportingServices.OnDemandReportRendering.Image)
             {
                 this.GenerateSimpleReportItemDocumentMap(item);
                 AspNetCore.ReportingServices.OnDemandReportRendering.Image            image  = item as AspNetCore.ReportingServices.OnDemandReportRendering.Image;
                 AspNetCore.ReportingServices.OnDemandReportRendering.Image.SourceType source = image.Source;
                 if (this.m_createSnapshot && (source == AspNetCore.ReportingServices.OnDemandReportRendering.Image.SourceType.External || source == AspNetCore.ReportingServices.OnDemandReportRendering.Image.SourceType.Database))
                 {
                     AspNetCore.ReportingServices.OnDemandReportRendering.ImageInstance imageInstance = image.Instance as AspNetCore.ReportingServices.OnDemandReportRendering.ImageInstance;
                     if (imageInstance != null)
                     {
                         byte[] imageDatum = imageInstance.ImageData;
                     }
                 }
             }
             else if (item is AspNetCore.ReportingServices.OnDemandReportRendering.Rectangle)
             {
                 this.VisitRectangle(item as AspNetCore.ReportingServices.OnDemandReportRendering.Rectangle);
                 this.VisitStyle(item.Style);
             }
             else if (!(item is AspNetCore.ReportingServices.OnDemandReportRendering.CustomReportItem))
             {
                 bool flag = false;
                 if (this.m_generateDocMap)
                 {
                     string documentMapLabel = item.Instance.DocumentMapLabel;
                     if (documentMapLabel != null)
                     {
                         flag = true;
                         this.WriteDocumentMapBeginContainer(documentMapLabel, item.Instance.UniqueName);
                     }
                 }
                 if (item is AspNetCore.ReportingServices.OnDemandReportRendering.Tablix)
                 {
                     this.VisitTablix(item as AspNetCore.ReportingServices.OnDemandReportRendering.Tablix);
                     this.VisitStyle(item.Style);
                 }
                 else if (item is AspNetCore.ReportingServices.OnDemandReportRendering.SubReport)
                 {
                     this.VisitSubReport(item as AspNetCore.ReportingServices.OnDemandReportRendering.SubReport);
                 }
                 else
                 {
                     Global.Tracer.Assert(false);
                 }
                 if (flag)
                 {
                     this.WriteDocumentMapEndContainer();
                 }
             }
             this.m_generateDocMap = generateDocMap;
         }
     }
 }
        private void VisitRectangle(AspNetCore.ReportingServices.OnDemandReportRendering.Rectangle rectangleDef)
        {
            bool flag = false;

            if (this.m_generateDocMap)
            {
                string documentMapLabel = rectangleDef.Instance.DocumentMapLabel;
                if (documentMapLabel != null)
                {
                    flag = true;
                    string text        = null;
                    int    linkToChild = rectangleDef.LinkToChild;
                    if (linkToChild >= 0)
                    {
                        AspNetCore.ReportingServices.OnDemandReportRendering.ReportItem reportItem = ((ReportElementCollectionBase <AspNetCore.ReportingServices.OnDemandReportRendering.ReportItem>)rectangleDef.ReportItemCollection)[linkToChild];
                        text = reportItem.Instance.UniqueName;
                    }
                    else
                    {
                        text = rectangleDef.Instance.UniqueName;
                    }
                    this.WriteDocumentMapBeginContainer(documentMapLabel, text);
                }
            }
            this.Visit(rectangleDef.ReportItemCollection);
            if (flag)
            {
                this.WriteDocumentMapEndContainer();
            }
        }
Example #8
0
        public override void Deserialize(IntermediateFormatReader reader)
        {
            base.Deserialize(reader);
            reader.RegisterDeclaration(ReportItemInstance.m_Declaration);
            ReportItem    reportItem           = (ReportItem)base.ReportElementDef;
            List <string> customPropertyNames  = null;
            List <object> customPropertyValues = null;

            while (reader.NextMember())
            {
                switch (reader.CurrentMember.MemberName)
                {
                case MemberName.ToolTip:
                {
                    string text2 = reader.ReadString();
                    if (reportItem.ToolTip.IsExpression)
                    {
                        this.m_toolTip = text2;
                    }
                    else
                    {
                        Global.Tracer.Assert(text2 == null, "(toolTip == null)");
                    }
                    break;
                }

                case MemberName.Bookmark:
                {
                    string text3 = reader.ReadString();
                    if (reportItem.Bookmark.IsExpression)
                    {
                        this.m_bookmark = text3;
                    }
                    else
                    {
                        Global.Tracer.Assert(text3 == null, "(bookmark == null)");
                    }
                    break;
                }

                case MemberName.Label:
                {
                    string text = reader.ReadString();
                    if (reportItem.DocumentMapLabel.IsExpression)
                    {
                        this.m_documentMapLabel = text;
                    }
                    else
                    {
                        Global.Tracer.Assert(text == null, "(documentMapLabel == null)");
                    }
                    break;
                }

                case MemberName.CustomPropertyNames:
                    customPropertyNames = reader.ReadListOfPrimitives <string>();
                    break;

                case MemberName.CustomPropertyValues:
                    customPropertyValues = reader.ReadListOfPrimitives <object>();
                    break;

                default:
                    Global.Tracer.Assert(false);
                    break;
                }
            }
            reportItem.CustomProperties.SetDynamicValues(customPropertyNames, customPropertyValues);
        }
Example #9
0
 public ReportItemInstance(ReportItem reportItemDef)
     : base(reportItemDef)
 {
 }