I have got an issue i really need help with as it is driving me, and my customer mad
I have a VB.net 2010 application that uses crystal to produce reports and it has been working very well on site for nearly 18 months now. I had a problem on my development machine so i changed it. I reinstalled the same copy of VB.net 2010, the same copy of SAP Crystal Reports version for VB 2010 and the same 64 bit runtime engine for .netframework 4.
When i debug/run my application in the VB IDE it runs perfectly but as soon as i compile and run the .exe the application crashes when calling a report. The same code has run for months but since the reinstall it is crashing with no error message
The code to call a report is as follows
If DGstockgrid.SelectedRows.Count = 0 Then
MessageBox.Show("Please select an item to re-print", "Re-Print Selection", MessageBoxButtons.OK, MessageBoxIcon.Information)
Dim STRUID As String = DGstockgrid.SelectedRows(0).Cells(0).Value
Dim ds As New DataSet
Dim cnn As SqlConnection
Dim connectionString As String
Dim sql As String
Dim cryRpt As New ReportDocument
connectionString = strCompCon
cnn =New SqlConnection(connectionString)
sql = "select * from stock where uid = '" & STRUID & "'"
Dim dscmd As New SqlDataAdapter(sql, cnn)
Dim INTrowcount As Integer = (ds.Tables("ReportSelect").Rows.Count)
If INTrowcount = 0 Then
MessageBox.Show("There is no data avaliable to print for this report. Please check and try again", "Data Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
THIS IS WHERE IT CRASHES
FrmCryrep.CrystalReportViewer1.ReportSource = cryRpt
The target CPU is set for any and the framwork is set for .net 4.
The application doesnt error at runtime it just crashes with the application not responding and all you can do is close
Hope someone has some ideas