Dear all .Netters,
In my report, I have 3 parametes(Par1,Par2,Par3)
In this case, I only want to give parameter only for Par1,Par2.
I set Par3 as interal and hidden parameter.
In my webform, I write these code :
ReportViewer1.ProcessingMode = ProcessingMode.Local
Dim rep As LocalReport = ReportViewer1.LocalReport
rep.ReportPath = "RptProductPhoto.rdlc"
Dim I As Byte
Dim GetParameter As String = ""
Dim TotalParameter As Byte
TotalParameter = rep.GetParameters.Count
Dim par(TotalParameter - 1) As Microsoft.Reporting.WebForms.ReportParameter
For I = 0 To rep.GetParameters.Count - 1
GetParameter = rep.GetParameters.Item(I).Name
Select Case LCase(GetParameter)
Case "par1"
par(I) = New Microsoft.Reporting.WebForms.ReportParameter(GetParameter, "Par1")
Case "par2"
par(I) = New Microsoft.Reporting.WebForms.ReportParameter(GetParameter, "Par2")
End Select
Next
rep.SetParameters(par)
The program yields an error.
"Value cannot be null." reffering to "rep.SetParameters(par)" line code.
So, what should I do to remove the error ?
Thanks,
Kusno