I may seem dumb but this has had me going around in circles.
The report sits on the Report Server and requires ONE parameter “GROUPNAME”. my code gives me a cast error when I try to set the parameters.
Please help:
Imports Microsoft.Reporting.webforms
Partial Public Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim ReportParameter(0)
ReportViewerMain.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote
ReportViewerMain.ServerReport.ReportServerUrl = New Uri("http://localhost/ReportServer")
ReportViewerMain.ServerReport.ReportPath = "/RptTest/RptTestParm"
ReportViewerMain.ShowParameterPrompts = True
ReportViewerMain.ShowPrintButton = True
Dim rptParameters As New ReportParameter(1)
rptParameters = New ReportParameter("GROUPNAME", "Adm01")
ReportViewerMain.ServerReport.SetParameters(rptParameters)
ReportViewerMain.ZoomPercent = 100
ReportViewerMain.ServerReport.Refresh()
End Sub
End Class
This is my code so far.
Thanks
Mac
your problem lies in your code itself
you have not properly instantiated the reportparameter array
you have not instantiated the array for the report parameters properly
thanks