Пример #1
0
        private static void DumpTablix(AspNetCore.ReportingServices.ReportIntermediateFormat.Tablix tablix, StreamWriter stream)
        {
            stream.Write("Name: ");
            stream.WriteLine(tablix.Name);
            stream.WriteLine("<BR>");
            stream.Write("Width: ");
            stream.WriteLine(tablix.Width);
            stream.WriteLine("<BR>");
            stream.Write("Height: ");
            stream.WriteLine(tablix.Height);
            stream.WriteLine("<BR>");
            if (tablix.InScopeTextBoxes != null)
            {
                stream.WriteLine("<font color=\"darkgreen\"><b>TextBoxesInScope:</b></font> <BR>");
                foreach (AspNetCore.ReportingServices.ReportIntermediateFormat.TextBox inScopeTextBox in tablix.InScopeTextBoxes)
                {
                    stream.WriteLine("<font color=\"darkgreen\"><b>" + inScopeTextBox.Name + "</b></font> <BR>");
                }
            }
            stream.Write("<div style='border:solid darkblue 1px;width:");
            stream.Write(tablix.Width);
            stream.Write(";height:");
            stream.Write(tablix.Height);
            stream.WriteLine(";'>");
            stream.WriteLine("<Table cellpadding='0' cellspacing='0' rules='all' border='1'>");
            if (tablix.Corner != null)
            {
                stream.Write("<tr><td colspan='");
                stream.Write(tablix.RowHeaderColumnCount.ToString(CultureInfo.InvariantCulture));
                stream.Write("' rowspan='");
                stream.Write(tablix.ColumnHeaderRowCount.ToString(CultureInfo.InvariantCulture));
                stream.Write("'>Corner</td>");
            }
            Queue <TablixMember> queue = new Queue <TablixMember>();

            if (tablix.TablixColumnMembers != null)
            {
                foreach (TablixMember tablixColumnMember in tablix.TablixColumnMembers)
                {
                    queue.Enqueue(tablixColumnMember);
                }
                SupportabilityRIFVisualizer.DumpTablixMembers(tablix.TablixColumns, queue, stream, 0, 0);
            }
            Global.Tracer.Assert(queue.Count == 0, "(members.Count == 0)");
            int num = 0;

            if (tablix.TablixRowMembers != null)
            {
                foreach (TablixMember tablixRowMember in tablix.TablixRowMembers)
                {
                    SupportabilityRIFVisualizer.DumpTablixMembers(tablix.TablixRows, tablixRowMember, stream, -1, ref num);
                }
            }
            stream.WriteLine("</table>");
            stream.WriteLine("</div>");
        }
Пример #2
0
 private static void DumpTablixMembers(List <TablixColumn> tablixColumns, Queue <TablixMember> members, StreamWriter stream, int lastLevel, int index)
 {
     if (members.Count == 0)
     {
         stream.Write("</tr>");
     }
     else
     {
         TablixMember tablixMember = members.Dequeue();
         if (tablixMember.HeaderLevel > lastLevel)
         {
             stream.Write("</tr><tr>");
             lastLevel = tablixMember.HeaderLevel;
         }
         if (tablixMember.ID > -1)
         {
             SupportabilityRIFVisualizer.DumpTablixMember(tablixMember, stream);
         }
         if (tablixMember.SubMembers != null)
         {
             if (tablixMember.RowSpan > 1)
             {
                 if (tablixMember.ID > -1)
                 {
                     TablixMember tablixMember2 = new TablixMember();
                     tablixMember2.SubMembers  = new TablixMemberList();
                     tablixMember2.RowSpan     = tablixMember.RowSpan - 1;
                     tablixMember2.ID          = -1;
                     tablixMember2.HeaderLevel = tablixMember.HeaderLevel + 1;
                     members.Enqueue(tablixMember2);
                     foreach (TablixMember subMember in tablixMember.SubMembers)
                     {
                         tablixMember2.SubMembers.Add(subMember);
                     }
                 }
                 else
                 {
                     tablixMember.RowSpan--;
                     members.Enqueue(tablixMember);
                 }
             }
             else
             {
                 foreach (TablixMember subMember2 in tablixMember.SubMembers)
                 {
                     members.Enqueue(subMember2);
                 }
             }
         }
         SupportabilityRIFVisualizer.DumpTablixMembers(tablixColumns, members, stream, lastLevel, index);
     }
 }
Пример #3
0
 private static void DumpTablixMembers(TablixRowList tablixRows, TablixMember member, StreamWriter stream, int lastLevel, ref int index)
 {
     if (index > lastLevel)
     {
         stream.Write("<tr style='border:solid darkred 1px;height:" + tablixRows[index].Height + ";'>");
         lastLevel = index;
     }
     if (member.ID > -1)
     {
         SupportabilityRIFVisualizer.DumpTablixMember(member, stream);
     }
     if (member.SubMembers != null)
     {
         if (member.ColSpan > 1)
         {
             if (member.ID > -1)
             {
                 TablixMember tablixMember = new TablixMember();
                 tablixMember.SubMembers  = new TablixMemberList();
                 tablixMember.ColSpan     = member.ColSpan - 1;
                 tablixMember.ID          = -1;
                 tablixMember.HeaderLevel = member.HeaderLevel + 1;
                 foreach (TablixMember subMember in member.SubMembers)
                 {
                     tablixMember.SubMembers.Add(subMember);
                 }
                 member = tablixMember;
             }
             else
             {
                 member.ColSpan--;
             }
             SupportabilityRIFVisualizer.DumpTablixMembers(tablixRows, member, stream, lastLevel, ref index);
         }
         else
         {
             foreach (TablixMember subMember2 in member.SubMembers)
             {
                 SupportabilityRIFVisualizer.DumpTablixMembers(tablixRows, subMember2, stream, lastLevel, ref index);
             }
         }
     }
     else
     {
         foreach (TablixCell tablixCell in tablixRows[index].TablixCells)
         {
             if (tablixCell.ColSpan > 0)
             {
                 stream.Write("<td colspan='");
                 stream.Write(tablixCell.ColSpan);
                 stream.Write("'>");
                 if (tablixCell.CellContents != null)
                 {
                     stream.Write("<div style='overflow:auto;border:solid blue 1px;width:");
                     stream.Write(tablixCell.CellContents.Width);
                     stream.Write(";height:");
                     stream.Write(tablixCell.CellContents.Height);
                     stream.WriteLine(";'>");
                     stream.Write("CellContents Type: ");
                     stream.WriteLine(tablixCell.CellContents.ObjectType.ToString());
                     stream.Write("<BR>Name: <font color=\"darkgreen\"><b>");
                     stream.WriteLine(tablixCell.CellContents.Name);
                     stream.Write(" </b></font><BR>Width: ");
                     stream.WriteLine(tablixCell.CellContents.Width);
                     stream.Write(" <BR>Height: ");
                     stream.WriteLine(tablixCell.CellContents.Height);
                     if (tablixCell.CellContents.ObjectType == ObjectType.Textbox)
                     {
                         stream.WriteLine("<b>");
                         stream.WriteLine("</b><BR>");
                     }
                     else if (tablixCell.CellContents.ObjectType == ObjectType.Tablix)
                     {
                         SupportabilityRIFVisualizer.DumpTablix((AspNetCore.ReportingServices.ReportIntermediateFormat.Tablix)tablixCell.CellContents, stream);
                     }
                     stream.Write("</div>");
                 }
                 stream.Write("</td>");
             }
         }
         index++;
         stream.Write("</tr>");
     }
 }