How to hide unnecessary items in the Web Report toolbar

2020-06-03

Most advanced report generators let us generate reports for web applications. When displaying reports to users, consider the ability to navigate on their web pages, send to print, export to any format, and other functions. This is usually a special toolbar in the report output window.

Quite often, the question on the forums reporting tools developers is “how to remove the toolbar from unwanted items, or how to disable printing the report”.

And the truth is not always the toolbar appears appropriate, report such a panel can not fit into the web application design. Although it is possible to customize the icons on the panel, and even its color, still would like to be able to hide it at all, or remove unnecessary controls for a cleaner look.

Let's see how to hide the controls or the entire toolbar entirely in FastReport.Net. So, web FastReport.Net report object has a toolbar on top of which we spoke above. Creating a report in a Web application, you just need to adjust some of its properties. Consider the properties that are responsible for the appearance of the toolbar:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
WebReport report = new WebReport();
 report.Width = 800;
 report.Height = 800;
 report.Report.Load(Server.MapPath("App_Data/Master-Detail.frx")); 
 report.ShowPrevButton = false; //Hide previous page button
 report.ShowNextButton = false; // Hide next page button
 report.ShowBottomToolbar = true; //Show the toolbar at the bottom
 report.ShowFirstButton = false; //Hide first page button
 report.ShowLastButton = false; // Hide last page button
 report.ShowExports = false; //Hide export display button
 report.ShowMhtExport = false; //Hide export to MHT
 report.ShowOdsExport = false; // Hide export to ODS
 report.ShowOdtExport = false; // Hide export to ODT
 report.ShowPdfExport = false; // Hide export to PDF
 report.ShowPowerPoint2007Export = false; // Hide export to PwerPoint
 report.ShowRtfExport = false; // Hide export to RTF
 report.ShowTextExport = false; // Hide export to Text
 report.ShowWord2007Export = false; // Hide export to Wors=d
 report.ShowXmlExcelExport = false; //С Hide export to Excel
 report.ShowXpsExport = false; // Hide export to XPS 
 report.ShowDbfExport = false; // Hide export to DBF
 report.ShowCsvExport = false; // Hide export to CSV
 report.ShowOutline = false; //Hide report plan display
 report.ShowPageNumber = false; //Hide the current number of the page
 report.ToolbarBackgroundStyle = ToolbarBackgroundStyle.Dark; //Select the theme of toolbar
 report.ToolbarColor = Color.Aqua; //Select colour of toolbar
 report.ToolbarIconsStyle = ToolbarIconsStyle.Blue; //Hide export to format from the toolbar
 report.ShowRefreshButton = false; //Hide the report update button
 report.ShowZoomButton = false; //Hide the scaling button
 report.ShowToolbar = false; //Hide the toolbar
 report.ShowPrint = false; //Hide print button

 As you can see, the number of settings is quite large. It is possible to customize the appearance of the panel - customize the color, panel style and icons. For example, the background style of the Medium panel, and the icons - Red:

WebReport tollbar

Separately, it is worth noting that it is possible to exclude certain types of exports of the report from the list. But if you don't need an export in principle, you can just remove the button. For example, if you remove all the buttons from the panel except print, it will look like this:

 Print button on toolbar only

For those who are not happy with the toolbar at the top, there is an option of displaying it in the bottom (ShowBottomToolbar = true):

 Bottom web report toolbar

And those who do not need toolbar at all, there is an option to entirely hide it:

 Web report without tollbar

Thus, using the selection of necessary properties you can easily customise your toolbar according to your personal needs.

August 12, 2024

How to build and install the Postgres plugin in FastReport .NET

This article describes how to connect to the database using the FastReport .NET plugin for the report designer from Visual Studio via the NuGet server.
August 08, 2024

How to install FastReport .NET and its components on Windows

Step-by-step instructions for online and manual installation via the FastReport registration code.NET and its components in Windows.
July 26, 2024

Updating HTMLObject as a plugin for FastReport .NET

Detailed instructions for using the new HTMLObject plugin, which uses splitting DOM HTML into FastReport report objects.
Fast Reports
  • 800-985-8986 (English, US)
  • +4930568373928 (German)
  • +55 19 98147-8148 (Portuguese)
  • info@fast-report.com
  • 901 N Pitt Str #325 Alexandria VA 22314

© 1998-2024 Fast Reports Inc.