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!

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.