New to Telerik Reporting? Download free 30-day trial

Developing VB.NET Reporting Applications

Microsoft provides different programming languages for its most popular .NET and .NET Framework environments. Visual Basic (VB or VB.NET) is an advanced programming language fully supported by Telerik Reporting.

This article elaborates on developing Telerik Reporting report definitions with VB, and integrating Telerik Reporting into VB Desktop and Web Reporting applications.

Developing VB.NET Report Definitions

The VB Type report definitions are VB Types inheriting the Telerik Reporting base Report type.

The easiest and recommended approach for creating such a report in the .NET Framework is with the Visual Studio Report Designer. The designer offers also a converter from declarative (TRDP and TRDX files) to VB type report definitions as explained in the article Importing Reports Created with the Standalone or Web Report Designer.

VB reports are supported also in .NET. The Visual Studio Report Designer is not yet available for .NET and the recommended approach for developing such reports is described in the KB article How to use Visual Studio Report Designer to edit CS Reports in .NET Projects.

VB.NET Desktop Reporting Applications

Displaying Reports in VB Desktop Reporting Applications

The Telerik Reporting product provides the following Desktop Report Viewers:

Implementation

The Desktop Report Viewers may be embedded in .NET Framework and .NET Visual Basic projects. The steps for the corresponding viewers and environments are described in the following sections:

Implementing in VB projects targeting .NET Framework 4.6.2 and above

Here are the Desktop Report Viewers that may be embedded in VB desktop projects targeting the .NET Framework through the Visual Studio templates we provide, or manually:

Implementing in VB projects targeting .NET 6.0 and above

The following Desktop Report Viewers may be configured manually in VB desktop projects targeting .NET. There are no Visual Studio Reporting templates available for Visual Basic projects targeting .NET:

  • Adding the Windows Forms Report Viewer Control to a Windows Forms .NET Project

    The following code adds the Windows Forms Report Viewer control to the form named 'Form1' in its 'Load' event handler. The viewer displays the TRDP report named 'SampleReport.trdp' from the application subfolder 'Reports'. The viewer is with the default Embedded Reporting Engine:

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Dim reportSource1 As UriReportSource = New UriReportSource()
        reportSource1.Uri = "Reports\SampleReport.trdp"
        reportSource1.Parameters.Add("Parameter1_Name", "Parameter1_Value")
        reportSource1.Parameters.Add("Parameter2_Name", "Parameter2_Value")
    
        Dim reportViewer = New Telerik.ReportViewer.WinForms.ReportViewer()
        reportViewer.ReportSource = reportSource1
        reportViewer.Dock = System.Windows.Forms.DockStyle.Fill
        reportViewer.Name = "reportViewer1"
        reportViewer.TabIndex = 1
        reportViewer.RefreshReport()
    
        Me.Controls.Add(reportViewer)
    End Sub

    Sample Windows Forms project may be downloaded from the Telerik GitHub Reporting Samples repository: VB Reporting-WinFormsViewerNet8.

  • Integrating the WPF Report Viewer in .NET

    The WPF Viewer may be configured entirely with XAML which may be found in the above article and used in VB projects.

    Sample WPF project may be downloaded from the Telerik GitHub Reporting Samples repository: VB Reporting-WPFViewerNet8.

  • Integrating the WinUI Report Viewer in .NET 6

    Microsoft doesn't provide VB templates for WinUI - Create your first WinUI 3 (Windows App SDK) project. Technically, it should be possible to use also VB for WinUI projects, however, this may be much more complicated without using the Visual Studio templates.

Generating Reports in VB Desktop Reporting Applications

The VB Desktop Report Viewers may use an Embedded Reporting Engine, a Telerik Reporting REST Services, or a Telerik Report Server. The Connection String to Report Engine determines the engine type used by the viewer.

The Embedded Reporting Engine is integrated within the viewer of the VB Reporting project.

The Reporting REST Service may also deliver reports to the Desktop Viewers.

The Report Server is a separate application exposing a Web API that may be used by the viewers in VB.NET Reporting applications to request reports.

VB.NET Web Reporting Applications in .NET Framework

Designing Reports in .NET Framework VB Web Reporting Applications

The Web Report Designer is an HTML/CSS/JS client-side jQuery widget that lets developers embed a report designer into their VB Web Reporting applications. It is ready for embedding in the VB ASP.NET Reporting Applications to allow the users to create, edit, and preview their Telerik Reports directly from the browser.

VB Web Report Designer Requirements in .NET Framework

The VB Web Report Designer requires a Report Designer REST service, whose fully functional implementation resides in the Telerik.WebReportDesigner.Services assembly/package as explained in the next section.

VB Web Report Designer Implementation in .NET Framework

The tutorial Configuring the Web Report Designer in ASP.NET Framework application elaborates on implementing the web designer jQuery widget and its REST Service in ASP.NET Web Reporting projects.

A sample project may be found in the Telerik GitHub Reporting Samples repository - VB Reporting-WebDesignerNetFramework.

Generating Reports in VB Web Reporting Applications in .NET Framework

The Telerik Reporting REST Services provide an Application Programming Interface (API) over HTTP to the Reporting Engine that processes and renders Telerik Reports. The fully functional implementation of the service is available in the Telerik.Reporting.Services.WebApi assembly/package. It may be embedded in any VB ASP.NET Reporting Application and exposed in a custom controller (for example, ReportsController) inheriting the basic ReportsControllerBase class. The ReportsController may be used as a source of Report documents by VB Web Reporting, VB Desktop Reporting, and other third-party client applications.

Implementation in .NET Framework

The article Telerik Reporting REST Service ASP.NET Web API Implementation elaborates on the requirements, implementation, and hosting of the REST Service.

Displaying Reports in .NET Framework VB Web Reporting Applications

The HTML5 Report Viewer is an HTML/CSS/JS client-side widget suitable for any web application that works with JavaScript. This makes it the perfect widget for displaying Telerik Reporting Reports in all VB Web Reporting Applications.

Telerik Reporting provides also dedicated wrappers of the pure HTML5 Report Viewer for the most popular ASP.NET MVC and Web Forms frameworks:

Implementation in .NET Framework

The article Using the HTML5 Report Viewer with REST Service is a step-by-step tutorial on embedding the HTML5 Report Viewer in ASP.NET Web Reporting projects.

The steps for integrating the viewers in ASP.NET MVC and Web Forms projects are as follows:

VB.NET Web Reporting Applications in .NET 6.0 and above

Microsoft doesn't have plans to provide Visual Studio templates for ASP.NET Core in Visual Basic as explained in the post Can VB be used for a net core api project? Therefore, we don't provide examples or steps for implementing such applications in Visual Basic, as it may require significantly more efforts than with Visual Studio templates.

Web Report Designer in .NET 6.0+

As a pure HTML/CSS/JS client-side jQuery widget the Web Report Designer can be used in any web reporting application, including those coded in Visual Basic.

The Web Report Designer requires a Report Designer REST service, whose fully functional implementation resides in the Telerik.WebReportDesigner.Services assembly/package.

Displaying Reports in .NET 6.0+ VB Web Reporting Applications

The HTML5 Report Viewer is an HTML/CSS/JS client-side widget suitable for any web application that works with JavaScript. This makes it the perfect widget for displaying Telerik Reporting Reports in all Web Reporting Applications, including those implemented in Visual Basic.

The HTML5 Report Viewer requires a Reporting REST service, whose fully functional implementation is available in the Telerik.Reporting.Services.AspNetCore assembly/package. It may be embedded in any ASP.NET Core Reporting Application and exposed in a custom controller (for example, ReportsController).