all groups > sql server reporting services > february 2007 >
You're in the

sql server reporting services

group:

rEGARDING REPORT PARAMETER



rEGARDING REPORT PARAMETER ankur
2/21/2007 6:28:07 AM
sql server reporting services: I AM TRYING TO SEND PARAMETER VALUE TO REPORT USING VB.NET CODE BUT
ITS NOT ASSIGNING THE VALUE TO THE REPORT PARAMETER. I USING THAT
CODE. iF ANY BODY KNOW PLEASE REPLY..

Imports System
Imports System.IO
Imports Microsoft.Reporting.WebForms
Imports System.Data.SqlClient

Partial Class KeyWordPerformance
Inherits System.Web.UI.Page
Dim myUri As Uri
Dim strServerPath As String
Dim strReportPath As String
Dim rptParam(1) As Microsoft.Reporting.WebForms.ReportParameter
Protected Sub btnGenerateReport_Click(ByVal sender As Object,
ByVal e As System.EventArgs) Handles btnGenerateReport.Click

Try
'FromDate = Format(CType(FromDate, Date), "yyyy-MM-dd")
'ToDate = Format(CType(ToDate, Date), "yyyy-MM-dd")

txtRepoFromDate.Text = Format(CType("2006-10-01", Date),
"yyyy-MM-dd")
txtRepoToDate.Text = Format(CType("2006-10-11", Date),
"yyyy-MM-dd")
strServerPath = "http://harishjagannath/ReportServer"
strReportPath = "/RS_P2Reports/RS_P2_KeyPerfsrpt"



rptParam(0) = New
Microsoft.Reporting.WebForms.ReportParameter("FromDimTimeTheDate",
CType(Me.txtRepoFromDate.Text, Date))
rptParam(1) = New
Microsoft.Reporting.WebForms.ReportParameter("ToDimTimeTheDate",
CType(txtRepoToDate.Text, Date))
' rptViewer.ServerReport.SetParameters(New
Microsoft.Reporting.WebForms.ReportParameter() {paramIDDisco})
With Me.rptViewer
.ProcessingMode =
Microsoft.Reporting.WebForms.ProcessingMode.Remote
With .ServerReport
.ReportServerUrl = New Uri(strServerPath)
.ReportPath = strReportPath

.SetParameters(New
Microsoft.Reporting.WebForms.ReportParameter() {rptParam(0)})
.SetParameters(New
Microsoft.Reporting.WebForms.ReportParameter() {rptParam(1)})


End With
.ShowParameterPrompts = False
.ShowPromptAreaButton = False
.ServerReport.Refresh()

End With
Catch ex As Exception

End Try

End Sub
End Class
RE: rEGARDING REPORT PARAMETER Amarnath
2/22/2007 2:30:40 AM
I think you need to use an empty array and then fill with parameter.
Just search in the BOL and in the search type "Render Method" and see the
example there is a VB.net code there.

Amarnath


[quoted text, click to view]
AddThis Social Bookmark Button