Developers / Create Designer and Viewer Applications / End User Report Designer in WinForms Application / Use End-User Report Designer API / Manage the Report Explorer
Manage the Report Explorer

Report Explorer is a component that displays the structure of the current report opened in the designer as a tree. It also allows you to change the report, add or remove entities from it, affects the selection.

Attach Report Explorer to the existing Designer instance

Use WinForms Designer

  1. From the ActiveReports 19 Toolbox, drag and drop the Designer component on the form.
  2. Drag and drop the ReportExplorer component onto the surface of your form or the Designer component.
  3. Select the ReportExplorer component and from properties pane, set the ReportDesigner property to the name of the designer component.

Use code

The code example below demonstrates how to attach Report Explorer to the Designer programmatically, using the ReportExplorerInternal.ReportDesigner property in GrapeCity.ActiveReports.Design.ReportExplorer namespace.

C#. Paste the code in Form.cs
Copy Code
using GrapeCity.ActiveReports.Design;
using GrapeCity.ActiveReports.Design.ReportExplorer;

class MyForm : Form
{
  MyForm()
  {
    var _designer = new Designer() { Dock = DockStyle.Fill };
    var reportExplorer = new ReportExplorer  {
        Dock = DockStyle.Left,
        //now the reportExplorer instance will reflect the state of the report opened
        //in the designer control represented by '_designer' variable.
        ReportDesigner = _designer
    };
    Controls.Add(_designer);
    Controls.Add(reportExplorer);
  }
}

Control the visibility of nodes in Report Explorer

All nodes in the Report Explorer are visible by default. However there are specific nodes that you can hide from the Report Explorer. These specific nodes are:

The code example below demonstrates how to make the Report Explorer display the two nodes: Data Sources (including DataSet node) and Parameters.

Nodes in the Report Explorer

C#
Copy Code
reportExplorer.VisibleNodes = ReportExplorerNodes.DataSourceAndFields | ReportExplorerNodes.Parameters;

Control the visibility of the Report Explorer content

All report changes are reflected in the Report Explorer, which may look unattractive in case of multiple operations.

With the ReportExplorerInternal.ContentsVisible property in GrapeCity.ActiveReports.Design.ReportExplorer namespace, you can hide the Report Explorer content for some time and then show it again as demonstrated in the code example below.

C#
Copy Code
reportExplorer.ContentsVisible = false;
BulkUpdate();//performs some bulk update operation
reportExplorer.ContentsVisible = true;

Set the Report Explorer enabled nodes

You can set enabled nodes to control actions to be performed to a report. For example, you can deprecate modifying the Parameters list from the ReportExplorer using the ReportExplorerInternal.EnabledNodes property in GrapeCity.ActiveReports.Design.ReportExplorer namespace. In this case, existing report parameters will be visible in the Report Explorer but a user will not be able to edit them.

C#
Copy Code
reportExplorer.EnabledNodes = ReportExplorerEnabledNodes.All ^ ReportExplorerEnabledNodes.Parameters;