Microsoft
Software
Hardware
Network
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="RptStudentList
ing.aspx.v
b" Inherits="SCO.RptStudentLi
sting" %>
<%@ Register assembly="Telerik.ReportVi
ewer.WebFo
rms, Version=3.2.9.1211, Culture=neutral, PublicKeyToken=a9d7983dfcc
261be" namespace="Telerik.ReportV
iewer.WebF
orms" tagprefix="telerik" %>
http://www.w3.org/TR/xhtm
l1/DTD/xht
ml1-transi
tional.dtd
">
http://www.w3.org/1
999/xhtml"
>
Untitled Page
Report="SCOReports.rptFees
Due, 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
I found the solution myself, finally. I did not have the proper "Imports" on the page.
Me.ReportViewer1.Report = New ReportLibrary.Report1()
Random Solutions
Your user accounts are unexpectedly locked and event ID 12294 is logged in Windows Server 2003?
access 2007 frontend sql server 2008
UPDATE OPENQUERY (LINKEDSERVER, 'SELECT...) SET FIELD = #
Sync .pst calendar with Exchange calendar
Outlook 2007 Calendars Updating Shared Calendar only updates Personal Calendar
Help with excel formula
exchange 2003 dropping mail with invalid from field
Vista Boot Error
Reading XML in to an ADO Recordset
msaccess 2003 and turning on a new menu toolbar from module code and turning off the main menu from the same place