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
SQL 2005 - Create failed for database 'test'. (Microsoft.SqlServer.smo)
Client-only rules in Outlook 2003
Ask about install windows service
How to sendmessage to parent pretranslatemessage?
How do copy only active window to clipboard in Windows XP?
Installing 'Compatibility Files' in Vista and Windows 7
Attach txt file with sendmail
Windows7 in a 2003 domain
Excel macro to update cell information
Automatic backup for the folders on network