How to hide unnecessary items from 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.

20. November 2024

Lokalisierung und Ändern von Sprachen in FastReport VCL

FastReport VCL unterstützt 40 Sprachen für die Schnittstellenlokalisierung und ermöglicht es Ihnen, die Sprache im laufenden Betrieb über Menüs oder Code ohne Neukompilierung zu ändern.
1. November 2024

Neue Funktionen des FastReport VCL Berichtseditors

Wir betrachten die neuen Funktionen des Berichtseditors: Hilfslinien, Hervorhebung von sich schneidenden Objekten, aktualisierte Berichts- und Datenbäume.
30. Oktober 2024

Verwendung von Stilen beim Erstellen von Berichten in FastReport VCL

Dieser Artikel beschreibt eine der neuen Funktionen von FastReport VCL - die Verwendung von Stilen und Stilseiten.
Fast Reports
  • 800-985-8986 (Englisch, die USA)
  • +4930568373928 (Deutsch)
  • +55 19 98147-8148 (Portugiesisch)
  • info@fast-report.com
  • 66 Canal Center Plaza, Ste 505, Alexandria, VA 22314

© 1998-2024 Fast Reports Inc.