PDA

View Full Version : جستجو توسط کریستال ریپورت10



leilast
چهارشنبه 16 دی 1388, 23:23 عصر
من طبق فایلهای آموزشی که از همین سایت پیدا کردم برای اینکه crystal report بتونه رکوردهای خاصی رو نمایش بده از کد زیر استفاده کردم , ولی وقتی اجراش میکنم هیچ رکوردی رو چاپ نمیکنه!


crrept.RecordSelectionFormula = "{family}" = " '" & text1.text & "'"
تمام کد هم اینه ,وقتی این شرط رو برمیدارم تمام رکوردها رو نشون میده ولی اگه بخوام جستجو کنه دیگه کار نمیکنه


Private Sub Button1_Click()
CrystalActiveXReportViewer1.Visible = True
Set crrept = crapp.OpenReport("C:\Documents and Settings\Desktop\UHF VB Samplef\report1.rpt")
crrept.RecordSelectionFormula = "{family}" = " '" & text1.text & "'"
CrystalActiveXReportViewer1.ReportSource = crrept
CrystalActiveXReportViewer1.EnableProgressControl = True
CrystalActiveXReportViewer1.EnableGroupTree = True
CrystalActiveXReportViewer1.ShowLastPage
CrystalActiveXReportViewer1.ViewReport
'CrystalActiveXReportViewer1.DiscardSavedData

End Sub
اشکالش چیه؟!