Search code examples
c#activereports

How to hide Thumbnail view option in Active reports 6.0


I am working with a Windows application. In this application I have to show some reports. For showing the reports, I am using Active reports viewer 6.0.

Now, my problem is about the table of content area in Active report viewer. I want to hide the thumbnail view option and table of content tab below the content area of Active report viewer.

I am attaching an image for better understanding of my problem:

enter image description here


Solution

  • To customize the tableOfContent in Active Report viewer, firstly we have to get all control from viewer and then get the Tab Control and work on TabPage.

    var controls = viewer1.Controls.Cast(); foreach (Control control in controls)

    {
      // Check fot TableOfContents Control
      if (control.Name == "TableOfContents")
     {
                            // Getting the TabControl.
                            var contColletion = control.Controls;
                            Control tabCollection = contColletion[0];
                            TabControl tabControl = (TabControl)tabCollection;
                            tabControl.Appearance = TabAppearance.Normal;
                            // Remove the Thumbnail Tab from Control.
                            tabControl.TabPages.RemoveAt(1);
                        }
                    }