public static void RegisterHiddenItem(ReportItem reportItem, PageContext pageContext, bool useForPageHFEval, Interactivity interactivity)
 {
     if (reportItem != null)
     {
         bool flag  = false;
         bool flag2 = false;
         if (useForPageHFEval)
         {
             flag = HeaderFooterEval.AddToCurrentPage(reportItem);
         }
         if (interactivity != null && !interactivity.RegisterHiddenItem(reportItem, pageContext))
         {
             interactivity = null;
         }
         if (!flag && interactivity == null)
         {
             return;
         }
         if (reportItem is AspNetCore.ReportingServices.OnDemandReportRendering.TextBox)
         {
             if (flag)
             {
                 AspNetCore.ReportingServices.OnDemandReportRendering.TextBox textBox = reportItem as AspNetCore.ReportingServices.OnDemandReportRendering.TextBox;
                 if (textBox != null)
                 {
                     ((TextBoxInstance)textBox.Instance).AddToCurrentPage();
                 }
             }
         }
         else if (reportItem is AspNetCore.ReportingServices.OnDemandReportRendering.Rectangle)
         {
             RegisterItem.RegisterHiddenItem(((AspNetCore.ReportingServices.OnDemandReportRendering.Rectangle)reportItem).ReportItemCollection, pageContext, flag, interactivity);
         }
         else if (reportItem is AspNetCore.ReportingServices.OnDemandReportRendering.SubReport)
         {
             if (interactivity != null)
             {
                 AspNetCore.ReportingServices.OnDemandReportRendering.SubReport subReport = (AspNetCore.ReportingServices.OnDemandReportRendering.SubReport)reportItem;
                 SubReportInstance subReportInstance = (SubReportInstance)subReport.Instance;
                 if (!subReportInstance.ProcessedWithError && !subReportInstance.NoRows)
                 {
                     for (int i = 0; i < subReport.Report.ReportSections.Count; i++)
                     {
                         RegisterItem.RegisterHiddenItem(((ReportElementCollectionBase <AspNetCore.ReportingServices.OnDemandReportRendering.ReportSection>)subReport.Report.ReportSections)[i].Body.ReportItemCollection, pageContext, false, interactivity);
                     }
                 }
             }
         }
         else if (reportItem is AspNetCore.ReportingServices.OnDemandReportRendering.Tablix)
         {
             RegisterItem.RegisterHiddenItem((AspNetCore.ReportingServices.OnDemandReportRendering.Tablix)reportItem, pageContext, flag, interactivity);
         }
     }
 }
Пример #2
0
 public static void AddDetailCellToCurrentPage(AspNetCore.ReportingServices.OnDemandReportRendering.Tablix tablix, int colMemberIndexCell, int rowMemberIndexCell, PageContext context, bool useForPageHFEval, Interactivity interactivity)
 {
     if (rowMemberIndexCell >= 0)
     {
         TablixRowCollection rowCollection = tablix.Body.RowCollection;
         TablixCell          tablixCell    = ((ReportElementCollectionBase <TablixCell>)((ReportElementCollectionBase <TablixRow>)rowCollection)[rowMemberIndexCell])[colMemberIndexCell];
         if (tablixCell != null && tablixCell.CellContents != null)
         {
             RegisterItem.RegisterHiddenItem(tablixCell.CellContents.ReportItem, context, useForPageHFEval, interactivity);
         }
     }
 }
 private static void RegisterHiddenItem(ReportItemCollection collection, PageContext pageContext, bool useForPageHFEval, Interactivity interactivity)
 {
     if (collection != null && collection.Count != 0)
     {
         for (int i = 0; i < collection.Count; i++)
         {
             RegisterItem.RegisterHiddenItem(((ReportElementCollectionBase <ReportItem>)collection)[i], pageContext, useForPageHFEval, interactivity);
             if (!useForPageHFEval && interactivity.Done)
             {
                 break;
             }
         }
     }
 }
Пример #4
0
 private static void AddCornerToCurrentPage(TablixCorner corner, PageContext context, bool useForPageHFEval, Interactivity interactivity)
 {
     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)
                 {
                     RegisterItem.RegisterHiddenItem(((ReportElementCollectionBase <TablixCornerCell>)tablixCornerRow)[j].CellContents.ReportItem, context, useForPageHFEval, interactivity);
                 }
             }
         }
     }
 }
        public static void RegisterPageItem(PageItem pageItem, PageContext pageContext, bool useForPageHFEval, Interactivity interactivity)
        {
            if (!useForPageHFEval && interactivity == null)
            {
                return;
            }
            ReportItem source = pageItem.Source;
            bool       flag   = false;

            if (useForPageHFEval)
            {
                if (pageItem.ItemState == PageItem.State.OnPageHidden)
                {
                    if (source.Visibility.ToggleItem != null || !source.Visibility.Hidden.IsExpression)
                    {
                        flag = true;
                    }
                }
                else
                {
                    AspNetCore.ReportingServices.OnDemandReportRendering.TextBox textBox = source as AspNetCore.ReportingServices.OnDemandReportRendering.TextBox;
                    if (textBox != null)
                    {
                        ((TextBoxInstance)textBox.Instance).AddToCurrentPage();
                    }
                }
            }
            if (interactivity != null && pageItem.ItemState != PageItem.State.OnPageHidden)
            {
                interactivity = null;
            }
            if (!flag && interactivity == null)
            {
                return;
            }
            RegisterItem.RegisterHiddenItem(source, pageContext, flag, interactivity);
        }
Пример #6
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);
        }