cancel
Showing results for 
Search instead for 
Did you mean: 

CR2011 - VS2010 Windows Forms - Data Not Refreshing

Former Member
0 Kudos

Hi,

I'm making a VB.net windows form app in Visual Studio 2010 with SQL Server v2008 R2.  I have a few embedded crystal reports (w/parameters) in the solution that I display using the CrystalReportViewer control.  My problem is that when I go to run a report, "stale" data seems to be showing up that is not in the table in which I am filling my report dataset with.  I've been looking around for a while now for help with this, however, the popular suggestions don't seem to help. I've already tried:

1) Refreshing the CrystalReportViewer after loading the report file path.  Here is an example of how I call my reports:

Dim cryRpt As New ReportDocument

        cryRpt.Load("ReportFilePath")

        CrystalReportViewer.Refresh()

        CrystalReportViewer.ReportSource = cryRpt

2)  Unchecking the option to "Save data in the report"

Any help with this would be GREATLY appreaciated.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I should've mentioned, when I'm feeding a parameter my code looks like this:

Dim cryRpt As New ReportDocument

cryRpt.Load("ReportFilePath")

cryRpt.SetParameterValue("@Parameter", DataTable.Rows(ComboBox.SelectedIndex)("Parameter_Column"))

CrystalReportViewer.ReportSource = cryRpt

CrystalReportViewer.Refresh()