Tabs in WebReport

2013-10-21

We can use tabs to view multiple reports in WebReport  in version FastReport.NET 2013.4 and newer.

WebReport with Tabs

Tabs can be useful for viewing many reports with additional information. Each report in tab has own navigation and may be attached to any data source. Saving in different formats is performed for each tab.

We have plans to implement FastReport.NET for open the detailed report in a separate tab by clicking on the object page. Also we will add the ability to close unnecessary tabs.

Tabs can be added directly in the application code, for example:

WebReport webReport = new WebReport();
webReport.Report.RegisterData(dataSet, "NorthWind");
webReport.Report.Load(report_path + "Simple List.frx");
webReport.CurrentTab.Name = "Simple List";
// tab 2
Report report2 = new Report();
report2.RegisterData(dataSet, "NorthWind");
report2.Load(report_path + "Labels.frx");
webReport.AddTab(report2, "Labels");
// tab 3
Report report3 = new Report();
report3.RegisterData(dataSet, "NorthWind");
report3.Load(report_path + "Master-Detail.frx");
webReport.AddTab(report3, "Master-Detail");
 

A property “webReport.CurrentTab” needs for access to the current tab, for example: “webReport.CurrentTab.Report”. By default, the first tab is available. In each of the tabs we have next available properties: “Report” – report object, “Name” – tab name. The name of the tab will be taken from the properties of report or report file name if the “Name” property is not specified.

The collection of tabs "webReport.Tabs" is also available. These can be used to refer to the tab by its index, for example: webReport.Tabs [0]. Name.

WebReport.AddTab method adds a new tab. We can use any declaration from next:

// an adding of report object
public ReportTab AddTab(Report report);
// an adding of report object with its name
public ReportTab AddTab(Report report, string name);
// an adding of prepared report object with its name (reportDone = true)
public ReportTab AddTab(Report report, string name, bool reportDone);
 

Last call declaration can add any prepared report.

An example of adding some prepared reports:

webReport.Tabs.Clear();
string s = this.Server.MapPath("~/App_Data/Prepared.fpx");
// first
Report firstReport = new Report();
firstReport.LoadPrepared(s);
webReport.AddTab(firstReport, "First tab", true);
// second
Report secondReport = new Report();
secondReport.LoadPrepared(s);
webReport.AddTab(secondReport, "Second tab", true);
 

In the near future we will add the display settings for tabs and an implementation of interactive reports.

LIVE DEMO

Thank you for attention!

12. August 2024

Erstellen und Installieren des Postgres-Plugins in FastReport .NET

In diesem Artikel wird beschrieben, wie Sie mit dem FastReport .NET-Plugin für den Berichtsdesigner aus Visual Studio über den NuGet-Server eine Verbindung zur Datenbank herstellen.
8. August 2024

Installation von FastReport .NET und ihren Komponenten unter Windows

Schritt für Schritt Anleitung zur Online- und manuellen Installation über den Registrierungscode FastReport .NET und seine Komponenten in Windows.
26. Juli 2024

Aktualisierung von HTMLObject als Plugin für FastReport .NET

Ausführliche Anleitung zur Verwendung des neuen HTMLObject-Plugins, das die Aufteilung des HTML-Doms in FastReport-Berichtsobjekte verwendet.
Fast Reports
  • 800-985-8986 (Englisch, die USA)
  • +4930568373928 (Deutsch)
  • +55 19 98147-8148 (Portugiesisch)
  • info@fast-report.com
  • 901 N Pitt Str #325 Alexandria VA 22314

© 1998-2024 Fast Reports Inc.