I am creating a heading for my crystal report in my asp.net application, then passing it to the crystal report using the setparametervalue method of the report object. In crystal, there is a parameter called 'Report_Heading' which does not allow multiple values. There is also a formula which picks this parameter up and displays it in the heading.
This works fine the first time the report displays. But when I refresh my dataset with different data and re-display the report, the heading fails to update. The data in the report is different, but the new value for the parameter is not displayed.
The attached code is in a subroutine called from page_load.
I have tried using a report.load statement, and a report.refresh, and I'm out of ideas. Can anyone help?
Private Sub Refresh_Report(ByVal command_text As String)
' (code here to populate dataset1 using sql based on dropdownlists)
Dim headingString as string = "This Report Heading"
Dim thisreport As New CrystalReport1
' Report_Heading is the name of the parameter in the crystal report...
CrystalReportViewer1.ReportSource = thisreport