Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Crystal Report 9 Advanced!

Status
Not open for further replies.

Maximus37

Technical User
Dec 7, 2002
21
0
0
US
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
 
You need to add CrxReport.DiscardSavedData Changed the CRXReport to the name you are using.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top