Knowledgebase: RadarBI
Viewing and embedding RadarBI Reports in the Web
Posted by Vladimir Lyutetsky on 27 June 2011 02:54 PM

Viewing RadarBI Reports in the Web

Interactive reports created in RadarBI may be viewed in a Web browser. This option is provided by a user Web control implemented into your business application. The Web browser mode supports the same functionality of processing reports as the RadarBI designer mode. Since only the data that meets the filters, applied to the related elements of the current report, are loaded from the server to the client computer, fulfilling a query will take so little time, that you may get the impression that all work is done in the desktop application itself.

RadarBI Web control has been designed with the use of the most up-to-date technologies and software products. Thus, we’ve used the Silverlight technology to present to you an attractive and convenient interface with its rich graphics and animations. AJAX helps us speed up processing queries to the server and drawing elements on your Web page. DevArt providers are responsible for connecting to different databases, while Entity Framework is used for working with data.

RadarReportViewer Control

RadarReportViewer is a freely distributed ASP.NET application able to give you an effective business analysis of data in your Web application.

The table below presents the basic properties of RadarReportViewer user control:           

Properties

Type

Description

Source

String

Assigns the way to a RadarBI report file.

FilterParameters

ParameterCollection

 

Contains the collection of parameters for queries to your data base.

Width, Height

Pixels or percent

Defines the width and height of the control’s display area.

ShowMainMenu

Boolean

Defines if the Main Menu is visible.

ShowToolbar

Boolean

Defines if the Toolbar is visible.

ShowReportList

Boolean

Defines if the Report List pane is visible.

IsOpenEnabled, ShowOpenButton

 

Boolean

Defines if a report can be opened locally, and if the Open button is visible in the Toolbar.

IsSaveLocallyEnabled, ShowSaveLocallyButton

 

Boolean

Defines if a report can be saved locally, and if the Save Locally button is visible in the Toolbar.

IsSaveOnServerEnabled, ShowSaveOnServerButton

 

Boolean

Defines if a report can be saved on the server, and if the Save on the Server button is visible in the Toolbar.

IsExportJpegEnabled, ShowExportJpegButton

 

Boolean

Defines if a report can be exported to the JPEG format, and if the Export to JPEG button is visible in the Toolbar.

IsPrintEnabled, ShowPrintButton

 

 

Boolean

Defines if a report can be printed out, and if the Print button is visible in the Toolbar.

IsUploadEnabled, ShowUploadButton

 

Boolean

Defines if files can be uploaded, and if the Upload button is visible in the Toolbar.

IsReportListEnabled

 

Boolean

Defines if the Report List option is available in the View Menu.

IsRefreshEnabled, ShowRefreshButton

 

Boolean

Defines if the Web page can be refreshed and if the Refresh button is visible in the Toolbar.

IsExitEnabled, ShowExitButton

 

Boolean

Defines if the Web page can be closed and if the Exit button is visible in the Toolbar.

RadarReportViewer Features

Open Report 

If you want your report to be displayed upon loading the Web page, you need to assign the report file from your site to the Source property. Another way is to open a report from your application. In this case your file may be loaded either to a local computer or to your corporate network.

Save and Upload Report

The currently viewed report can be saved either to a local computer or to your corporate network, as well as uploaded to the server.

To upload a report, handle the Upload event.

Here is and example of an event handler that implements uploading a report to the Temp folder in the site’s root folder.

protected void RadarReportViewer1_Upload(object sender, UploadEventArgs e)
{
 string uploadDirectory = ((System.Web.UI.Page)this).MapPath("~/Temp/");
 if (Directory.Exists(uploadDirectory) == false)
 Directory.CreateDirectory(uploadDirectory);

 string uploadFile = uploadDirectory + "PreviewReport.rbi";

 if (string.IsNullOrEmpty(e.ReportData) == false) ((RadarReportViewer)sender).SaveReport(uploadFile, e.ReportData);
}
 

Viewing Modes. Print and Export

A report may be viewed either in the single-page or the multi-page mode. 

The single-page mode has been designed for interactive analysis of report data. The multi-page mode is for making the presentation of your report print-friendly – you’ll be able to divide your report into pages according to your print settings.

Both printing and export are fulfilled for the current viewing mode of your report. 

There is the option of customizable export to the following formats: pdf, docx, xls, jpg, png, bmp, tiff, gif.

User Interface of the RadarReportViewer Control

RadarReportViewer user interface consists of:
  1. Main menu.
  2. Toolbar.
  3. Report Viewer.

 

RadarReportViewer user interface

Main Menu and Toolbar

Web viewer offers you a number of functions to work with reports. You can access them through the main menu that consists of two sections: File and View.

File Menu:

  • Open – opens a report both from an local computer or from corporate network;
  • Save Locally – saves the report on the local computer or in the corporate network;
  • Upload – uploads the report to the server;
  • Printprints the report;
  • Export – exports the report;
  • Exit – closes the page. 

View Menu:

  • Report List – defines the visibility of the report list pane;
  • Refresh – reloads the page.

Almost all the main menu elements are also buttons on the toolbar. You can manage the visibility and availability of buttons through the properties of the web viewer’s control. 

Report Viewer

Report viewer includes the Report List pane and the Document Host with panes with reports. It has a drag-and-drop support including the docking compass and the docking hints for visual feedback. You are free to drag the panes anywhere in the report viewer to create customized layouts. 

When you start dragging a pane or a group of panes, it moves to floating window. The hints for visual feedback show the user where the object will be placed. Panes of the report viewer can be pinned, unpinned or hidden.

Document Host 

Document Host displays the reports as tabbed documents. It allows you to view reports by splitting them into multiple panes.

Tabbed documents of the Document Host are tabs with the reports. The tab’s header displays the name of the report it contains. When you open a workbench, the Document Host will have those tabs, whose reports have their IsOpen property set to True. 

The first one to be displayed is the report, whose IsSelected property is set to True.

Report List 

The Report List contains the list of report names and helps you manage tabbed documents. Selecting an element from the list opens it in the Document Host. Double-clicking an element in the list makes the same name tab in the Document Host invisible. To cancel that, double-click the element again. The same thing can be done through the context menu of the tab or the element in the list.

Managing Viewing RadarBI Reports in the Web

Let’s create a site for viewing RadarBI reports step by step:

1) Create an empty site with Visual Studio 2010.

2) Add the RadarReportViewer component to the Visual Studio’s toolbox: in the General section call the context menu and select Choose Items. In the window that will open press the Browse button and select the RadarSoft.Report.Web.dll assembly file from the %RadarBI installation folder%\Bin\Release\Web\Bin and press Ok.

3) Drag the component to the page.

4) Copy all the lacking files and folders from the %RadarBI installation folder%\Bin\Release\Web\Bin directory to the bin folder of your site.

5) Copy the Temp and the ClientBin folders from the %RadarBI installation folder%\Bin\Release\Web directory to the root folder of your site.

6) Add the following text to the configuration file of your site Web.config to the <configuration> descriptor:

 <system.data>
 <DbProviderFactories>
 <add name="dotConnect for Oracle" invariant="Devart.Data.Oracle" description="Devart dotConnect for Oracle" type="Devart.Data.Oracle.OracleProviderFactory, Devart.Data.Oracle, Version=6.30.160.0, Culture=neutral, PublicKeyToken=09af7300eec23701"/>
 <add name="dotConnect for MySQL" invariant="Devart.Data.MySql" description="Devart dotConnect for MySQL" type="Devart.Data.MySql.MySqlProviderFactory, Devart.Data.MySql, Version=6.30.160.0, Culture=neutral, PublicKeyToken=09af7300eec23701"/>
 </DbProviderFactories>
 </system.data>

7) Add the ScriptManager control to your page.

8) Define the size of the RadarReportViewer control. For example: width=100%, height = 100%. If you’re going to view it in IE, add the following style:

 html, body
 {
 margin: 0;
 height: 100%;
    }
       

 form
  {
 height: 100%;
 }
 

After opening your site, you’ll be able to view reports you’ve created in RadarBI Designer.

(183 vote(s))
This article was helpful
This article was not helpful

Help Desk Software by Kayako Resolve