Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Refresh Crystal Reports without "Parameter Values" dialog

I am running Crystal Reports Basic for Visual Studio 2008.

I would like to dynamically refresh my report based on a parameter.

For instance, I'll have a customer contract and I want to switch between customers based on a VB.NET winform button click.

I was expecting the code below to work, but I keep getting the "Enter Parameter Values" dialog box, why isn't it using the parameter value that I just set it?

CustomerReport1.SetParameterValue("CustomerID", txtCustID.Text)
CrystalReportViewer1.RefreshReport()
like image 445
Nathan Koop Avatar asked Mar 20 '09 18:03

Nathan Koop


1 Answers

Resolved by removing the RefreshReport:

CustomerReport1.SetParameterValue("CustomerID", txtCustID.Text)
CrystalReportViewer1.ReportSource = CustomerReport1
like image 122
Nathan Koop Avatar answered Oct 01 '22 00:10

Nathan Koop