Hi Friends,
I've used following code to display report
VB Code:
Dim rs As New ADODB.Recordset Dim crystal As CRAXDDRT.Application Dim Report As CRAXDDRT.Report 'CRViewer1.DisplayBorder = False 'CRViewer1.DisplayTabs = False CRViewer1.EnableDrillDown = False Set crystal = New CRAXDDRT.Application Set Report = crystal.OpenReport("d:\damini\school\reports\BankLetter.rpt") 'Report.fo ' Report.FormulaFields(0) = "Mr. XXX" rs.CursorLocation = adUseClient rs.Open "select * from tblStudent where studentid='S15'", cn Report.DiscardSavedData Report.EnableParameterPrompting = False Report.ParameterFields(1).AddCurrentValue "Mr. XXX" Report.Database.SetDataSource rs ' Report.foru CRViewer1.ReportSource = Report CRViewer1.ViewReport Do While CRViewer1.IsBusy DoEvents Loop CRViewer1.Zoom 100
But instead of showing report of only that student whose id is S15, it is showing for all the records in the table. plz help me how to solve it. Early help is appreciated
plz reply soon




Reply With Quote