Home > Archive > Visual Basic Crystal Reports > January 2006 > parameter box appearing when you refresh
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
parameter box appearing when you refresh
|
|
| cabell 2006-01-26, 11:20 am |
| Hope someone can help.
I am tying to use the crystal report viewer in VB.net VS 2003 for the first time. With a bit of searching and reading up I have worked out how to load a report into a windows app, setup the connection info and set the report parameters (report is based in SQL stored procedure).
The report loads fine. My problem comes when I try to refresh the report. The parameter prompt box comes up again.
I haven’t been able to find an option to stop this, so have tried using the same code, as earlier, to set the parameter value again but it makes no difference.
code:
Private Sub CrystalReportViewer1_ReportRefresh(ByVal
source As Object, ByVal e As CrystalDecisions.Windows.Forms.ViewerEventArgs) Handles CrystalReportViewer1.ReportRefresh
crReportDocument.SetParameterValue("@TeamID", TeamParm)
End Sub
TeamParm is a integer declared at the start of the class.
Any help/ suggestions much appreciated.
Chris. | |
| cabell 2006-01-27, 4:52 am |
| I have an answer to this now and thought i would share in case anyone else is having the same problem. The code should be self explanatory.
chris.
code:
Private Sub CrystalReportViewer1_ReportRefresh(ByVal
source As Object, ByVal e As CrystalDecisions.Windows.Forms.ViewerEventArgs) Handles CrystalReportViewer1.ReportRefresh
crReportDocument.Refresh()
crReportDocument.SetParameterValue("@TeamID", TeamParm)
CrystalReportViewer1.ReportSource = crReportDocument
e.Handled = True
End Sub
|
|
|
|
|