Unanswered: My VB App - CrystalReport hangs 1st time in client pc, 2nd time shows data correctly
If this is not the appropriate place for this post, then sorry. I have a Serious issue. Without solving this scenario i can't implement my project. I am getting hanged because of this for a long time.
I will explain the problem here. Kindly view this issue and suggest me. The issue follows.
Here i attatched my Picture of Form and the Crystal Report 8.5 while it is in Design View , Runtime View, and the Report when hanging and the 8.5 Control pictures are attached with this post. Open it wiht Paint. its Bmp files. The database here is MsSql, I am only developing the front end in VB, I am using the Crystal Report 8.5 Control to show the Reports from vB
The Report Hangs for the first time it shows only the blank screen, then the user need to close the Application Manually (i.e) through EndTask program. Then after closing the Application when tries for the Second time the Report is shown with the Data's correctly. All our clients are using WinXP.
The Report shows for the Second time or third time and Further.
The project is compiled in the machine where it is devoloped [Advanced 2000 Server] and also tested by changing the project to WinNt Server and installed VB6 there and compile the porject from there. Win2000 AdvancedServer or WinNT both are servers. While runnging the VB it shows the Report without any interuption, where as when i am running from the client system it hangs for the First time, some times hangs for first 2 times (Usually I compile the project and run the Setup file in the Client machine and then create the Shortcut of the exe for them)
The Print Command Button in the Form contains the following Code.
Private Sub Printe_Click()
If optProduct.Value = True Then
ElseIf optItem.Value = True Then
ElseIf optInvoice.Value = True Then
ElseIf optSlsmanwise.Value = True Then
ElseIf optcsum.Value = True Then
ElseIf optPcustName.Value = True Then
ElseIf optCustdetail.Value = True Then
ElseIf optCust.Value = True Then
ElseIf optcsumvalue.Value = True Then
MsgBox "Choose Option !", vbExclamation, "Option - Missing"
If the User Clicks the Invoicewise Option Button and press PrintButton then the following code will fire the Function optInvoice() code will execute. that is shown below
Private Function optInvoice()
CrystalReport1.GroupSelectionFormula = ""
Dim i As Integer
Dim pfdt As Date
Dim ptdt As Date
Dim strsf As String
For i = 1 To 25
CrystalReport1.Formulas(i) = ""
pfdt = txtpfrom.Text
ptdt = txtpto.Text
As below in the FormLoad event I am connecting Crstal Report to Database
Private Sub Form_Load()
CrystalReport1.Connect = "DSN=scalaDB;UID=scala;PWD=scala"
I also check the Server Performance while the user clicks the Print Button to view the Report. The ODBC are properly configured in the Client machine and the Devoloped machine. Even the Report which has less Reports getting hanged sometimes.
The Server is not loaded. Eventhough the CPU usage is 0% its hanging. Kindly consider this issue as impartant and reply me.