Hi all,
I am making an application on crystal reports.Now what I want is,I want to search my reports in a given criteria.Let's say I have two textboxes.in one textbox i will enter my starting record and in another I will enter my ending record.The moment i click on search,all the records between these entered records should be displayed.
Please give me the solution.It's very urgent
Regards
Vineet
Loading
Ankur GuptaPosted May 31, 2010, 5:26 AM
create two parameters Paran1 and Param2 in crystal report.
Select Crystal Report Menu then select Report->SelectionFormula->Record
then write {FieldName} > Param1 and {FieldName} < Param2
and at run time you can set values in these .
Dim rptDoc As New CrystalDecisions.CrystalReports.Engine.ReportDocument()
rptDoc.Load("ReportName with full path", OpenReportMethod.OpenReportByTempCopy)
rptDoc.SetParameterValue(0, "A")
rptDoc.SetParameterValue(1, "B")
Where A & B is the range of your data in Text Boxes.
rptViewer.ReportSource = rptDoc