Hello to All,
I am using crystal report 8 and vb 6. I am passing query and selection formula to subreport. query working fine but selection formula not effecting on report.
If I use link subreport from MainReport.rpt & Subreport.rpt from crystal report then subreport shows data fine. but when I use selection formula from vb6 It duplicate records in subreport.
Any help with advance thanks
I am using crystal report 8 and vb 6. I am passing query and selection formula to subreport. query working fine but selection formula not effecting on report.
If I use link subreport from MainReport.rpt & Subreport.rpt from crystal report then subreport shows data fine. but when I use selection formula from vb6 It duplicate records in subreport.
Code:
With CrystalReport
.Connect = "Connection string"
.ReportFileName="Mainreport.rpt"
.SQLQuery = "select * from table"
.SubreportToChange = "SubReport"
.SQLQuery = "Select * from table"
.ReplaceSelectionFormula ("{tb.EMPNO} = {?Pm-tb.EMPNO}")
.Action = True
End With
Any help with advance thanks