Hello everyone!
First of all, I'd like to thank for the help I've gotten from various collegues here; I really appreciate it.
I'm developing an app in Visual Basic 6.0 SP5 and CR 9 Adv.
In my code I display some reports, at first, they work fine, but when I try to display the same report with a different record of course, the report shows no record but just ther report it self, I may be overlooking some code but I cannot find it, here is the code I'm using to display two of my reports which have the same problem:
The user clicks a button and the report to be displayed is dependant of the option button selected.
If Option1.Value = True Then
With frmPrevRep1
.Top = 2500
.Left = 1400
.Show
With .CRViewer91
With CrystalReport5
.RecordSelectionFormula = "{TRANSACTIONS.RefNo}='" & txtRef.Text & _
"'" 'AND {TRANSACTIONS.SubD}='" & txtSub.Text & "'"
.ReportTitle = "Straight Bill of Lading"
End With
.ReportSource = CrystalReport5
.ViewReport
Exit Sub
End With
End With
End If
If Option2.Value = True Then
With frmPrevRep1
.Top = 2500
.Left = 1400
.Show
With .CRViewer91
With CrystalReport6
.RecordSelectionFormula = ""
.RecordSelectionFormula = "{TRANSACTIONS.RefNo}='" & txtRef.Text & _
"'" 'AND {TRANSACTIONS.SubD}='" & txtsub.text & "'"
.ReportTitle = "Straight Bill of Lading"
End With
.ReportSource = CrystalReport6
.ViewReport
Exit Sub
End With
End With
End If
Once again I thank you all and gratefully appreciate the help.
Max35
First of all, I'd like to thank for the help I've gotten from various collegues here; I really appreciate it.
I'm developing an app in Visual Basic 6.0 SP5 and CR 9 Adv.
In my code I display some reports, at first, they work fine, but when I try to display the same report with a different record of course, the report shows no record but just ther report it self, I may be overlooking some code but I cannot find it, here is the code I'm using to display two of my reports which have the same problem:
The user clicks a button and the report to be displayed is dependant of the option button selected.
If Option1.Value = True Then
With frmPrevRep1
.Top = 2500
.Left = 1400
.Show
With .CRViewer91
With CrystalReport5
.RecordSelectionFormula = "{TRANSACTIONS.RefNo}='" & txtRef.Text & _
"'" 'AND {TRANSACTIONS.SubD}='" & txtSub.Text & "'"
.ReportTitle = "Straight Bill of Lading"
End With
.ReportSource = CrystalReport5
.ViewReport
Exit Sub
End With
End With
End If
If Option2.Value = True Then
With frmPrevRep1
.Top = 2500
.Left = 1400
.Show
With .CRViewer91
With CrystalReport6
.RecordSelectionFormula = ""
.RecordSelectionFormula = "{TRANSACTIONS.RefNo}='" & txtRef.Text & _
"'" 'AND {TRANSACTIONS.SubD}='" & txtsub.text & "'"
.ReportTitle = "Straight Bill of Lading"
End With
.ReportSource = CrystalReport6
.ViewReport
Exit Sub
End With
End With
End If
Once again I thank you all and gratefully appreciate the help.
Max35