Hello,
I'm using VB 5 with Crystal Reports 4.16. I'm a newbie with this
I got a problem to select the right information from 4 tabels, linked by the same fieldname.
e.g.
Table 1 - Defect
Defect_ID
Defect_Name
Description
...
Table 2 - DefectHistory
Date
Defect_ID
...
Table 3 - Keywords
Keywords
Defect_ID
...
Table 4 - Symptoms
Symptom
Defect_ID
First I want to select the right defect from tabel 1 by defect_name. With this defect_name there's a unique Defect_ID. With this defect_ID I want to select data from the other 3 tables.
At this moment my VB-code looks like this and nothing happens...
Y = frmSQASFR.cboFoutNummer.ListIndex
If optCurrent.Value = True Then
If optFull.Value = True Then
CrystalReport1.ReportFileName = App.Path & "\full.rpt"
strSFR = frmSQASFR.cboFoutNummer.List(Y)
CrystalReport1.SelectionFormula
= "{Defect.Defect_Name} = " & strSFR & " and
{Dfcthist.Defect_ID} = {Defect.Defect_ID} and
{Dfctkeys.Defect_ID} = {Defect.Defect_ID} and
{Dfctsymp.Defect_ID} = {Defect.Defect_ID}"
CrystalReport1.PrintReport
ElseIf optOverview.Value = True Then
CrystalReport1.ReportFileName = App.Path & "\overview.rpt"
strSFR = frmSQASFR.cboFoutNummer.List(Y)
CrystalReport1.SelectionFormula = "{Defect.Defect_Name} =" & strSFR & ""
CrystalReport1.PrintReport
End If
As you can see, the formula is long and something tells me it's not right, but I don't knwo what to do.
So, who can help me with this????!!!!
Greetz,
Sjors
I'm using VB 5 with Crystal Reports 4.16. I'm a newbie with this
I got a problem to select the right information from 4 tabels, linked by the same fieldname.
e.g.
Table 1 - Defect
Defect_ID
Defect_Name
Description
...
Table 2 - DefectHistory
Date
Defect_ID
...
Table 3 - Keywords
Keywords
Defect_ID
...
Table 4 - Symptoms
Symptom
Defect_ID
First I want to select the right defect from tabel 1 by defect_name. With this defect_name there's a unique Defect_ID. With this defect_ID I want to select data from the other 3 tables.
At this moment my VB-code looks like this and nothing happens...
Y = frmSQASFR.cboFoutNummer.ListIndex
If optCurrent.Value = True Then
If optFull.Value = True Then
CrystalReport1.ReportFileName = App.Path & "\full.rpt"
strSFR = frmSQASFR.cboFoutNummer.List(Y)
CrystalReport1.SelectionFormula
= "{Defect.Defect_Name} = " & strSFR & " and
{Dfcthist.Defect_ID} = {Defect.Defect_ID} and
{Dfctkeys.Defect_ID} = {Defect.Defect_ID} and
{Dfctsymp.Defect_ID} = {Defect.Defect_ID}"
CrystalReport1.PrintReport
ElseIf optOverview.Value = True Then
CrystalReport1.ReportFileName = App.Path & "\overview.rpt"
strSFR = frmSQASFR.cboFoutNummer.List(Y)
CrystalReport1.SelectionFormula = "{Defect.Defect_Name} =" & strSFR & ""
CrystalReport1.PrintReport
End If
As you can see, the formula is long and something tells me it's not right, but I don't knwo what to do.
So, who can help me with this????!!!!
Greetz,
Sjors