Results 1 to 3 of 3

Thread: About Data in crystal report

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2002
    Posts
    94

    About Data in crystal report

    Hello Everybody!

    I am again have one problem. I never used crystal report viewer control to view. rather i was using crystal report activex control to display a report. But now i want to use crystal report viewer to display my report. for that I've added crystal report in my project and then i wrote following code in the load event of the form which contains the crystal report viewer. But when it is not displaying anything in the crystal report viewer control. I have used two forms :

    1. First form accepts parameter for the reports. it accepts two dates :
    start date and end date. In the click event of preview button i've opened form which contains crystal report viewer control. and in the load event of that form i've written following code :

    VB Code:
    1. Private Sub Form_Load()
    2.     Dim rsHoliday As New ADODB.Recordset
    3.     Dim ssql As String
    4.     Dim Report As CRAXDDRT.Report
    5.     Dim dStartDate As Date
    6.     Dim dEndDate As Date
    7.    
    8.     dStartDate = frmHolidayListReport.dtpFrom.Value   'frmHolidayListReport is a from which takes parameter for the report
    9.     dEndDate = frmHolidayListReport.dtpTo.Value
    10.    
    11.     'Dim report As New CRAXDDRT.report
    12.     ssql = "select * from tblHolidaySchedule"
    13.    
    14.     rsHoliday.CursorLocation = adUseClient
    15.     rsHoliday.Open ssql, cn
    16.    
    17.     Set Report = New rptHolidaySchedule
    18.    
    19.     With Report
    20.         .DiscardSavedData
    21.         .RecordSelectionFormula = "{tblHolidaySchedule.StartDate}>=#" & dStartDate & "# and {tblHolidaySchedule.StartDate}<=#" & dEndDate & "#"
    22.         .EnableParameterPrompting = False
    23.         .ParameterFields(1).AddCurrentValue dStartDate
    24.         .ParameterFields(2).AddCurrentValue dEndDate
    25.         .Database.SetDataSource rsHoliday
    26.     End With
    27.     crHolidays.ReportSource = Report
    28. '    Do While crSummary.IsBusy
    29. '        DoEvents
    30. '    Loop
    31.     crHolidays.Zoom 100
    32.  
    33. End Sub

    plz help me wht is the problem with this. I've still lots of reports to do. so plz help me ASAP.

    thanks a lot for ur kind help.

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Apr 2002
    Posts
    94

    Re: About Data in crystal report

    Sorry I forgot to mention that I am using VB6,Access2003 and crystal report 8.5

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Apr 2002
    Posts
    94

    Re: About Data in crystal report

    is there anybody to help plz!!!!!!!!!!!!!!!
    Last edited by damini_dd; Mar 24th, 2006 at 07:45 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