views:

1360

answers:

2

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()
+2  A: 

Resolved by removing the RefreshReport:

CustomerReport1.SetParameterValue("CustomerID", txtCustID.Text)
CrystalReportViewer1.ReportSource = CustomerReport1
Nathan Koop
A: 

thank you 4 code...

frunnze