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
Sharepoint Portal Services Restore failure
Dot Matrix printing from vb.net
Using an Access 2007 ADP does not support SQL Express 2008 for table design - Better to use an ACCDB?
System resource exceeded.
Need help creating a simple VBScript to change region settings in Vista
Word unable to print picture
Move Public folders from exchange 2003 to exchange 2007
Microsoft Access Unbound Field Problem
Windows 2008 R2 cluster on HP MSA 1000
Unable to copy detached files - even with "full control" permissions on remote server