private static void RegisterHiddenItem(AspNetCore.ReportingServices.OnDemandReportRendering.Tablix tablix, PageContext pageContext, bool useForPageHFEval, Interactivity interactivity)
 {
     if (tablix != null)
     {
         bool flag = false;
         if (useForPageHFEval)
         {
             flag = HeaderFooterEval.AddToCurrentPage(tablix);
         }
         if (!flag && interactivity == null)
         {
             return;
         }
         TablixInstance tablixInstance = (TablixInstance)tablix.Instance;
         WalkTablix.AddMembersToCurrentPage(tablix, null, -1, WalkTablix.State.ColMembers, false, tablixInstance.NoRows, pageContext, flag, interactivity);
         WalkTablix.AddMembersToCurrentPage(tablix, null, 0, WalkTablix.State.RowMembers, true, tablixInstance.NoRows, pageContext, flag, interactivity);
     }
 }
예제 #2
0
        public static int AddMembersToCurrentPage(AspNetCore.ReportingServices.OnDemandReportRendering.Tablix tablix, TablixMember memberParent, int rowMemberIndexCell, State state, bool createDetail, bool noRows, PageContext context, bool useForPageHFEval, Interactivity interactivity)
        {
            TablixMemberCollection tablixMemberCollection = null;

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

                case State.ColMembers:
                    WalkTablix.AddCornerToCurrentPage(tablix.Corner, context, useForPageHFEval, interactivity);
                    goto default;

                default:
                    tablixMemberCollection = tablix.ColumnHierarchy.MemberCollection;
                    break;
                }
            }
            else
            {
                tablixMemberCollection = memberParent.Children;
            }
            if (tablixMemberCollection == null)
            {
                if (state == State.RowMembers)
                {
                    WalkTablix.AddMembersToCurrentPage(tablix, null, memberParent.MemberCellIndex, State.DetailRows, createDetail, noRows, context, useForPageHFEval, interactivity);
                }
                else if (createDetail)
                {
                    WalkTablix.AddDetailCellToCurrentPage(tablix, memberParent.MemberCellIndex, rowMemberIndexCell, context, useForPageHFEval, interactivity);
                }
                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)
                {
                    if (interactivity == null)
                    {
                        continue;
                    }
                    useForPageHFEval2 = false;
                }
                flag = true;
                tablixMemberInstance = tablixMember.Instance;
                if (tablixMember.IsStatic)
                {
                    flag2 = WalkTablix.WalkTablixMember(tablixMember, ref useForPageHFEval2, interactivity);
                }
                else
                {
                    tablixDynamicMemberInstance = (TablixDynamicMemberInstance)tablixMemberInstance;
                    tablixDynamicMemberInstance.ResetContext();
                    flag = tablixDynamicMemberInstance.MoveNext();
                    if (flag)
                    {
                        flag2 = WalkTablix.WalkTablixMember(tablixMember, ref useForPageHFEval2, interactivity);
                    }
                }
                while (flag)
                {
                    if (flag2)
                    {
                        int num2 = WalkTablix.AddMembersToCurrentPage(tablix, tablixMember, rowMemberIndexCell, state, createDetail, noRows, context, useForPageHFEval2, interactivity);
                        if (state != State.DetailRows)
                        {
                            if (interactivity != null)
                            {
                                interactivity.RegisterGroupLabel(tablixMember.Group, context);
                            }
                            if (tablixMember.TablixHeader != null)
                            {
                                if (num2 > 0)
                                {
                                    RegisterItem.RegisterHiddenItem(tablixMember.TablixHeader.CellContents.ReportItem, context, useForPageHFEval2, interactivity);
                                    num++;
                                }
                                else if (interactivity != null)
                                {
                                    RegisterItem.RegisterHiddenItem(tablixMember.TablixHeader.CellContents.ReportItem, context, false, interactivity);
                                }
                            }
                        }
                    }
                    if (tablixMember.IsStatic)
                    {
                        flag = false;
                    }
                    else
                    {
                        flag = tablixDynamicMemberInstance.MoveNext();
                        if (flag)
                        {
                            useForPageHFEval2 = useForPageHFEval;
                            flag2             = WalkTablix.WalkTablixMember(tablixMember, ref useForPageHFEval2, interactivity);
                        }
                    }
                }
                tablixMemberInstance = null;
            }
            return(num);
        }