Imports System Imports System.Data
Imports System.Data.SqlClient
Imports System.Configuration
Imports System.Collections
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports Microsoft.applicationblocks.data
Imports Microsoft.Reporting.WebForms
Imports System.IO


Partial Class _DefaultClass _Default
   
Inherits System.Web.UI.Page

   
Protected Sub Btn_Preview_Click()Sub Btn_Preview_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Btn_Preview.Click
       
Set ReportViwer
        ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote
        ReportViewer1.ServerReport.ReportServerUrl
= New System.Uri(http://localhost/ReportServer)
        ReportViewer1.ServerReport.ReportPath
= /Report Project1/Report2


       
Set SetParameter to Report *****
        Dim rptProdCode As New ReportParameter(ProdCode, Me.Txt_ProdCode.Text.Trim)
       
Dim rptPram() As ReportParameter = {rptProdCode}
        ReportViewer1.ServerReport.SetParameters(rptPram)
        ReportViewer1.ShowParameterPrompts
= False
        ReportViewer1.ServerReport.Refresh()
   
End Sub

End Class