Results 1 to 5 of 5

Thread: [RESOLVED] Missing something on Crystal Report....why is that happening??

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2004
    Posts
    484

    Resolved [RESOLVED] Missing something on Crystal Report....why is that happening??

    I am trying to set the datasource for my crystal report....
    but somehow....
    I used this code

    VB Code:
    1. Private crPendingReport As New PendingRequestReport
    2.  
    3.     Private Sub PendingRequestReport_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    4.         daRequest.Fill(DsPendingRequest1)
    5.         daClient.Fill(DsPendingRequest1)
    6. crPendingReport. ?????     '<---I want to set my datasource, what did I do wrong?
    7.  
    8.     End Sub

    Can anyone assist me???

  2. #2
    Lively Member
    Join Date
    Nov 2002
    Location
    Cranston, RI
    Posts
    110

    Re: Missing something on Crystal Report....why is that happening??

    Check out this thread.
    Maybe it'll help a little?

    http://www.vbforums.com/showthread.php?t=363891

  3. #3
    Frenzied Member maged's Avatar
    Join Date
    Nov 2002
    Location
    Egypt
    Posts
    1,040

    Re: Missing something on Crystal Report....why is that happening??

    you should do this code

    VB Code:
    1. dim rep as new report1 ' assuming that your report is called report1
    2. dim dax as datatable   ' this is hte datasource, dataset or datatables are ok
    3. rep.SetDataSource(dax)
    4. rep.refresh

    then you should assing the rep to a crystalviewer to show it on screen

    rgds

  4. #4
    Lively Member
    Join Date
    Nov 2002
    Location
    Cranston, RI
    Posts
    110

    Re: Missing something on Crystal Report....why is that happening??

    Quote Originally Posted by maged
    you should do this code

    VB Code:
    1. dim rep as new report1 ' assuming that your report is called report1
    2. dim dax as datatable   ' this is hte datasource, dataset or datatables are ok
    3. rep.SetDataSource(dax)
    4. rep.refresh

    then you should assing the rep to a crystalviewer to show it on screen

    rgds
    Almost exactly what I was pointing to in my previous post.
    VB Code:
    1. Dim oDoc As New ReportDocument
    2.  
    3.         oDoc.Load("c:\crystal reports\AccountsPayable\APCheck.rpt")
    4.         oDoc.SetDataSource(New Check().GetChecksForPayment(dtCashReq.Text))
    5.  
    6. crv1.ReportSource = oDoc

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2004
    Posts
    484

    Re: Missing something on Crystal Report....why is that happening??

    ok....I solved it....Thanks

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