Example #1
0
        public HiddenPageItem(ReportItem source, PageContext pageContext, bool checkHiddenState)
            : base(source)
        {
            base.m_itemPageSizes        = new ItemSizes(source);
            base.KeepTogetherHorizontal = false;
            base.KeepTogetherVertical   = false;
            bool unresolvedKTV = base.UnresolvedKTH = false;

            base.UnresolvedKTV = unresolvedKTV;
            if (pageContext.EvaluatePageHeaderFooter)
            {
                if (base.m_source.Visibility != null && base.m_source.Visibility.ToggleItem == null && base.m_source.Visibility.Hidden.IsExpression)
                {
                    if (!checkHiddenState)
                    {
                        return;
                    }
                    if (base.m_source.Instance.Visibility.CurrentlyHidden)
                    {
                        return;
                    }
                }
                this.m_textBoxValues = new Dictionary <string, List <object> >();
                HeaderFooterEval.CollectTextBoxes(base.m_source, pageContext, true, this.m_textBoxValues);
            }
        }
 public static void CollectTextBoxes(ReportItem reportItem, PageContext pageContext, bool useForPageHFEval, Dictionary <string, List <object> > textBoxes)
 {
     if (reportItem != null && useForPageHFEval && HeaderFooterEval.ShouldBeCollected(reportItem))
     {
         if (reportItem is AspNetCore.ReportingServices.OnDemandReportRendering.TextBox)
         {
             AspNetCore.ReportingServices.OnDemandReportRendering.TextBox textBox = (AspNetCore.ReportingServices.OnDemandReportRendering.TextBox)reportItem;
             List <object> list = null;
             if (!textBoxes.ContainsKey(textBox.Name))
             {
                 list = new List <object>();
                 textBoxes[textBox.Name] = list;
             }
             else
             {
                 list = textBoxes[textBox.Name];
             }
             list.Add(((TextBoxInstance)textBox.Instance).OriginalValue);
         }
         else if (reportItem is AspNetCore.ReportingServices.OnDemandReportRendering.Rectangle)
         {
             HeaderFooterEval.CollectTextBoxes(((AspNetCore.ReportingServices.OnDemandReportRendering.Rectangle)reportItem).ReportItemCollection, pageContext, true, textBoxes);
         }
         else if (!(reportItem is AspNetCore.ReportingServices.OnDemandReportRendering.SubReport) && reportItem is AspNetCore.ReportingServices.OnDemandReportRendering.Tablix)
         {
             HeaderFooterEval.CollectTextBoxes((AspNetCore.ReportingServices.OnDemandReportRendering.Tablix)reportItem, pageContext, true, textBoxes);
         }
     }
 }
 private static void CollectTextBoxes(ReportItemCollection collection, PageContext pageContext, bool useForPageHFEval, Dictionary <string, List <object> > textBoxes)
 {
     if (collection != null && collection.Count != 0)
     {
         for (int i = 0; i < collection.Count; i++)
         {
             HeaderFooterEval.CollectTextBoxes(((ReportElementCollectionBase <ReportItem>)collection)[i], pageContext, useForPageHFEval, textBoxes);
         }
     }
 }
 private static void CollectDetailCellContents(AspNetCore.ReportingServices.OnDemandReportRendering.Tablix tablix, int colMemberIndexCell, int rowMemberIndexCell, PageContext context, bool useForPageHFEval, Dictionary <string, List <object> > textBoxes)
 {
     if (rowMemberIndexCell >= 0)
     {
         TablixRowCollection rowCollection = tablix.Body.RowCollection;
         TablixCell          tablixCell    = ((ReportElementCollectionBase <TablixCell>)((ReportElementCollectionBase <TablixRow>)rowCollection)[rowMemberIndexCell])[colMemberIndexCell];
         if (tablixCell != null && tablixCell.CellContents != null)
         {
             HeaderFooterEval.CollectTextBoxes(tablixCell.CellContents.ReportItem, context, useForPageHFEval, textBoxes);
         }
     }
 }
 private static void CollectTablixCornerContents(TablixCorner corner, PageContext context, bool useForPageHFEval, Dictionary <string, List <object> > textBoxes)
 {
     if (corner != null)
     {
         TablixCornerRowCollection rowCollection   = corner.RowCollection;
         TablixCornerRow           tablixCornerRow = null;
         for (int i = 0; i < rowCollection.Count; i++)
         {
             tablixCornerRow = ((ReportElementCollectionBase <TablixCornerRow>)rowCollection)[i];
             for (int j = 0; j < tablixCornerRow.Count; j++)
             {
                 if (((ReportElementCollectionBase <TablixCornerCell>)tablixCornerRow)[j] != null && ((ReportElementCollectionBase <TablixCornerCell>)tablixCornerRow)[j].CellContents != null)
                 {
                     HeaderFooterEval.CollectTextBoxes(((ReportElementCollectionBase <TablixCornerCell>)tablixCornerRow)[j].CellContents.ReportItem, context, useForPageHFEval, textBoxes);
                 }
             }
         }
     }
 }
        private static int CollectTablixMembersContents(AspNetCore.ReportingServices.OnDemandReportRendering.Tablix tablix, TablixMember memberParent, int rowMemberIndexCell, TablixState state, bool noRows, PageContext context, bool useForPageHFEval, Dictionary <string, List <object> > textBoxes)
        {
            TablixMemberCollection tablixMemberCollection = null;

            if (memberParent == null)
            {
                switch (state)
                {
                case TablixState.RowMembers:
                    tablixMemberCollection = tablix.RowHierarchy.MemberCollection;
                    break;

                case TablixState.ColMembers:
                    HeaderFooterEval.CollectTablixCornerContents(tablix.Corner, context, useForPageHFEval, textBoxes);
                    goto default;

                default:
                    tablixMemberCollection = tablix.ColumnHierarchy.MemberCollection;
                    break;
                }
            }
            else
            {
                tablixMemberCollection = memberParent.Children;
            }
            if (tablixMemberCollection == null)
            {
                if (state == TablixState.RowMembers)
                {
                    HeaderFooterEval.CollectTablixMembersContents(tablix, null, memberParent.MemberCellIndex, TablixState.DetailRows, noRows, context, useForPageHFEval, textBoxes);
                }
                else
                {
                    HeaderFooterEval.CollectDetailCellContents(tablix, memberParent.MemberCellIndex, rowMemberIndexCell, context, useForPageHFEval, textBoxes);
                }
                if (!useForPageHFEval)
                {
                    return(0);
                }
                return(1);
            }
            bool                        flag                        = true;
            bool                        flag2                       = true;
            TablixMember                tablixMember                = null;
            TablixMemberInstance        tablixMemberInstance        = null;
            TablixDynamicMemberInstance tablixDynamicMemberInstance = null;
            int  num = 0;
            bool useForPageHFEval2 = useForPageHFEval;

            for (int i = 0; i < tablixMemberCollection.Count; i++)
            {
                useForPageHFEval2 = useForPageHFEval;
                tablixMember      = ((ReportElementCollectionBase <TablixMember>)tablixMemberCollection)[i];
                if (!noRows || !tablixMember.HideIfNoRows)
                {
                    flag = true;
                    tablixMemberInstance = tablixMember.Instance;
                    if (tablixMember.IsStatic)
                    {
                        flag2 = HeaderFooterEval.ShouldBeCollected(tablixMember, ref useForPageHFEval2);
                    }
                    else
                    {
                        tablixDynamicMemberInstance = (TablixDynamicMemberInstance)tablixMemberInstance;
                        tablixDynamicMemberInstance.ResetContext();
                        flag = tablixDynamicMemberInstance.MoveNext();
                        if (flag)
                        {
                            flag2 = HeaderFooterEval.ShouldBeCollected(tablixMember, ref useForPageHFEval2);
                        }
                    }
                    while (flag)
                    {
                        if (flag2)
                        {
                            int num2 = HeaderFooterEval.CollectTablixMembersContents(tablix, tablixMember, rowMemberIndexCell, state, noRows, context, useForPageHFEval2, textBoxes);
                            if (state != TablixState.DetailRows && tablixMember.TablixHeader != null && num2 > 0)
                            {
                                HeaderFooterEval.CollectTextBoxes(tablixMember.TablixHeader.CellContents.ReportItem, context, useForPageHFEval2, textBoxes);
                                num++;
                            }
                        }
                        if (tablixMember.IsStatic)
                        {
                            flag = false;
                        }
                        else
                        {
                            flag = tablixDynamicMemberInstance.MoveNext();
                            if (flag)
                            {
                                useForPageHFEval2 = useForPageHFEval;
                                flag2             = HeaderFooterEval.ShouldBeCollected(tablixMember, ref useForPageHFEval2);
                            }
                        }
                    }
                    tablixMemberInstance = null;
                }
            }
            return(num);
        }