Results 1 to 2 of 2

Thread: Controlling Crystal Rpt output thru VB

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2000
    Location
    TN
    Posts
    1

    Question

    I am able to display a sorted table but my SQLQuery statement is being ignored. What's wrong with the code below? Am I missing some DLLs or components connection in my Form?

    Private Sub Command1_Click()
    Dim strDbName As String

    'Get the xtreme.mdb database location
    strDbName = "c:\Program Files\Seagate Crystal Reports\Xtreme.mdb"

    With crptPublishers
    'Assign the data file location for report
    .DataFiles(0) = strDbName

    'Assign the report file name
    '.ReportFilename = App.Path & "\maillabl.rpt"

    'Set up the report control
    .SortFields(0) = "+{Customer.country}"
    .SQLQuery = "SELECT DISTINCT Customer.country FROM Customer"
    .Action = 1
    End With
    End Sub

  2. #2
    New Member
    Join Date
    Jul 2000
    Posts
    5
    have you selected the crystal report reference from VB 6? Try that.

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