Results 1 to 2 of 2

Thread: Problem with data selection in Crystal Report (Very Very Urgent)

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2002
    Posts
    94

    Problem with data selection in Crystal Report (Very Very Urgent)

    Hi Friends,

    I've used following code to display report

    VB Code:
    1. Dim rs As New ADODB.Recordset
    2.     Dim crystal As CRAXDDRT.Application
    3.     Dim Report As CRAXDDRT.Report
    4.     'CRViewer1.DisplayBorder = False
    5.     'CRViewer1.DisplayTabs = False
    6.     CRViewer1.EnableDrillDown = False
    7.     Set crystal = New CRAXDDRT.Application
    8.     Set Report = crystal.OpenReport("d:\damini\school\reports\BankLetter.rpt")
    9.     'Report.fo
    10. '    Report.FormulaFields(0) = "Mr. XXX"
    11.     rs.CursorLocation = adUseClient
    12.     rs.Open "select * from tblStudent where studentid='S15'", cn
    13.     Report.DiscardSavedData
    14.     Report.EnableParameterPrompting = False
    15.     Report.ParameterFields(1).AddCurrentValue "Mr. XXX"
    16.     Report.Database.SetDataSource rs
    17. '    Report.foru
    18.     CRViewer1.ReportSource = Report
    19.     CRViewer1.ViewReport
    20.     Do While CRViewer1.IsBusy
    21.         DoEvents
    22.     Loop
    23.     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
    Last edited by damini_dd; Mar 22nd, 2006 at 10:53 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width