Chart on reportviewer does not load unless i click view report button when combolist parameters are passed.
All the selected parameters are passed correctly and report loads only after clicking 'view report' button on the report viewer. I have this report viewer on an ASP.NET page and my parameters are passed using session variables created from another ASP.NET page which has my parameters form from where the user enters and selects input parameters.
I have dates(date picker) and company names (multiselect combo list with check boxes) as input parameters.
Report works absolutely fine unless the report parameters come from multiselect combo list.
Here is my code I used for establishing report parameters as session variables.
Session("labname") = Nothing
Session("fractionid") = FractionDropDownList.SelectedValue
For intloopindex As Integer = 0 To LabNamesCheckBoxList.Items.Count - 1
If LabNamesCheckBoxList.Items(intloopindex).Selected Then
Session("labname") &= LabNamesCheckBoxList.Items(intloopindex).Text & ControlChars.CrLf
End If
Next
Session("sdate") = sdate.text
Session("edate") = edate.text
Here is my code for passing these session variables as parameters to reportviewer control.
If Not IsPostBack Then
Dim fractionparam As String
Dim sdateparam As String
Dim edateparam As String
Dim regionparam As String
Dim labnameparam As String
regionparam = Session("regionid")
fractionparam = Session("fractionid")
labnameparam = Session("labname")
sdateparam = Session("sdate")
edateparam = Session("edate")
Dim rp(3) As Microsoft.Reporting.WebForms.ReportParameter
'rp(0) = New Microsoft.Reporting.WebForms.ReportParameter("regionid", regionparam)
rp(0) = New Microsoft.Reporting.WebForms.ReportParameter("fractionid", fractionparam)
rp(1) = New Microsoft.Reporting.WebForms.ReportParameter("labname", labnameparam)
rp(2) = New Microsoft.Reporting.WebForms.ReportParameter("sdate", sdateparam)
rp(3) = New Microsoft.Reporting.WebForms.ReportParameter("edate", edateparam)
Me.ReportViewer1.ServerReport.SetParameters(rp)
End If