Question : Telerik Reporting, Report Viewer

I am using Visual Studio 2008, VB, ASP.Net, with a 2008 SQL database.  I am using Telerik Reporting with a Telerik Report Viewer.  

The reports reside in a class library and the class library has been referenced to the web application.

I'd like to populate the viewer by catching an event from the .aspx page (such as a button-click.)  The report viewer shows the report with no problem if you place the report in the viewer's "REPORT" property in the properties box.  But I just cannot find the syntax to populate the viewer in the VB code-behind.

Here's the HTML:

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="RptStudentListing.aspx.vb" Inherits="SCO.RptStudentListing" %>

<%@ Register assembly="Telerik.ReportViewer.WebForms, Version=3.2.9.1211, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" namespace="Telerik.ReportViewer.WebForms" tagprefix="telerik" %>

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

http://www.w3.org/1999/xhtml" >

    Untitled Page
   
   


   
   

       
   

   
   
            Report="SCOReports.rptFeesDue, SCOReports, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
   

   



Now the vb code-behind:

Imports SCOReports
Imports System
Imports System.Web.UI
Imports Telerik.Reporting
Partial Public Class RptStudentListing
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        rvStudentListing.Visible = False
    End Sub

    Private Sub btnStudList_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnStudList.Click
        rvStudentListing.Visible = True

    End Sub


    Private Sub btnFeesDue_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnFeesDue.Click
        rvStudentListing.Visible = True

    End Sub


    Private Sub ChooseReport(ByVal name As String)
        rvStudentListing.Report = SCOReports.rptFeesDue
    End Sub
End Class

This seems so easy, but I've spent a lot of time on it with no success.  Any thoughts would be appreciated.

Answer : Telerik Reporting, Report Viewer

Random Solutions  
 
programming4us programming4us