Results 1 to 4 of 4

Thread: How to use CrystalReport object?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2001
    Location
    Philippines
    Posts
    136

    How to use CrystalReport object?

    Hello there,

    I wanted to created a CrystalReport object during runtime.
    Just like creating an ADO object.
    it looks like this but this one doesnt run.

    dim rptObj as CrystalReport

    With rptObj
    .Connect = "DSN=TEST;UID=sa;PWD=test;DSQ=Employee
    .ReportFileName = App.Path & "\rptTST1.rpt"
    .Formulas(0) = "ReportTitle="Test Report"
    .SQLQuery = "SELECT * FROM Employee"
    .PrintReport
    End With

    it generates an error variable is not set
    pls help. thanks...
    elbimbo

  2. #2
    Lively Member Joffies's Avatar
    Join Date
    Aug 2002
    Location
    London
    Posts
    119

    Try this....

    Add the following code...

    set rptObj = New CrystalReport
    Do, or do not. There is no 'try'.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Oct 2001
    Location
    Philippines
    Posts
    136
    error says "invalid use of NEW keyword"
    elbimbo

  4. #4
    Lively Member Joffies's Avatar
    Join Date
    Aug 2002
    Location
    London
    Posts
    119

    What version of....

    What version of crystal reports are u using and what references do you use in your project ....?
    Do, or do not. There is no 'try'.

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