Hello,
In 2006, I created a Vb.Net (version 2005 Professional) windows form application that accesses a back-end MS Access database. All reports utilize the Crystal Reports that is bundled with Vb.Net.
For some reason, the below call to the SetParameterValue does not work any more. The MsgBox in the Try/Catch never appears. I've verified that the ReportStats4 is valid and the parameter is in string format. Clicking on the "report preview" tab of the report produces a good report. However, when I build and install the exe on another computer, the application fails on the SetParameterValue line. I've looked at the task manager and see the CPU usage increase. After about 60 seconds the entire application terminates and does disappears from the task manager.
Also, if I run the application from within Visual Studio developer, it works. The issue occurs when I compile and install on another CPU.
What reason would this stop working and what do I have to do to fix it?
Thanks,
Brian
Try
Dim myReport As New ReportStats4
Dim dteStartDate As DateTime
Dim dteEndDate As DateTime
dteStartDate = DateTime.Parse("7/1/2010 00:01:01")
dteEndDate = DateTime.Parse("7/15/2010 23:59:59")
myReport.SetParameterValue("FromTo", "7/1/2010 & 7/15/2010")
CrystalReportViewer1.ReportSource = myReport
CrystalReportViewer1.AutoSize = True
CrystalReportViewer1.DisplayGroupTree = False
CrystalReportViewer1.SelectionFormula = "{AuditTrail.TimeStamp} in (#" & dteStartDate & "#) to (#" & dteEndDate & "#)"
Catch ex As Exception
MsgBox("Error while trying access Crystal Reports modules: " & ex.Message)
End Try
The Crystal Reports references are shown below:
C:\Program Files\Common Files\Business Objects\2.7\Managed\CrystalDecisions.CrystalReports.Engine.dll
C:\WINDOWS\assembly\GAC\CrystalDecisions.Enterprise.InfoStore\10.2.3600.0__692fbea5521e1304\CrystalDecisions.Enterprise.InfoStore.dll
C:\WINDOWS\assembly\GAC\CrystalDecisions.Enterprise.Framework\10.2.3600.0__692fbea5521e1304\CrystalDecisions.Enterprise.Framework.dll
C:\Program Files\Common Files\Business Objects\2.7\Managed\CrystalDecisions.ReportSource.dll
C:\Program Files\Common Files\Business Objects\2.7\Managed\CrystalDecisions.Shared.dll
C:\Program Files\Common Files\Business Objects\2.7\Managed\CrystalDecisions.Windows.Forms.dll
In 2006, I created a Vb.Net (version 2005 Professional) windows form application that accesses a back-end MS Access database. All reports utilize the Crystal Reports that is bundled with Vb.Net.
For some reason, the below call to the SetParameterValue does not work any more. The MsgBox in the Try/Catch never appears. I've verified that the ReportStats4 is valid and the parameter is in string format. Clicking on the "report preview" tab of the report produces a good report. However, when I build and install the exe on another computer, the application fails on the SetParameterValue line. I've looked at the task manager and see the CPU usage increase. After about 60 seconds the entire application terminates and does disappears from the task manager.
Also, if I run the application from within Visual Studio developer, it works. The issue occurs when I compile and install on another CPU.
What reason would this stop working and what do I have to do to fix it?
Thanks,
Brian
Try
Dim myReport As New ReportStats4
Dim dteStartDate As DateTime
Dim dteEndDate As DateTime
dteStartDate = DateTime.Parse("7/1/2010 00:01:01")
dteEndDate = DateTime.Parse("7/15/2010 23:59:59")
myReport.SetParameterValue("FromTo", "7/1/2010 & 7/15/2010")
CrystalReportViewer1.ReportSource = myReport
CrystalReportViewer1.AutoSize = True
CrystalReportViewer1.DisplayGroupTree = False
CrystalReportViewer1.SelectionFormula = "{AuditTrail.TimeStamp} in (#" & dteStartDate & "#) to (#" & dteEndDate & "#)"
Catch ex As Exception
MsgBox("Error while trying access Crystal Reports modules: " & ex.Message)
End Try
The Crystal Reports references are shown below:
C:\Program Files\Common Files\Business Objects\2.7\Managed\CrystalDecisions.CrystalReports.Engine.dll
C:\WINDOWS\assembly\GAC\CrystalDecisions.Enterprise.InfoStore\10.2.3600.0__692fbea5521e1304\CrystalDecisions.Enterprise.InfoStore.dll
C:\WINDOWS\assembly\GAC\CrystalDecisions.Enterprise.Framework\10.2.3600.0__692fbea5521e1304\CrystalDecisions.Enterprise.Framework.dll
C:\Program Files\Common Files\Business Objects\2.7\Managed\CrystalDecisions.ReportSource.dll
C:\Program Files\Common Files\Business Objects\2.7\Managed\CrystalDecisions.Shared.dll
C:\Program Files\Common Files\Business Objects\2.7\Managed\CrystalDecisions.Windows.Forms.dll
Last edited by a moderator: