Results 1 to 5 of 5

Thread: Any Example Code on Crystal Reports

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Location
    Wellington NZ
    Posts
    153

    Red face

    I wana use an SQL statement on a report but dont know how to do it, it is really ticking me off, if you know any good sites or have any examples please, please please could you give me a shout. I need all the help i can get.

    If you have any ideas how to create nice looking reports give me a shout.

    Rohan...

    Thank you

  2. #2
    New Member
    Join Date
    Sep 1999
    Location
    Australia
    Posts
    14
    What reporting program are you using ?

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Location
    Wellington NZ
    Posts
    153

    Arrow Crystal Reports

    I am using Crystal Reports, it comes with Visual Basic, I am just not sure how to use it, i need to execute SQL statements that will update the records displayed on the report.

    If there are any other methods then i would love to know how to use them.

    Rohan

  4. #4
    Member
    Join Date
    May 2000
    Posts
    45
    What version of crystal/VB have you got? In most cases it's simply a matter of selecting the SP and using it. Crystal has some satanic quirks though, like not displaying stored procedures by default. To see them in V8, you have to right click the database fields, click options then tick 'Show stored procedures'. Hope this helps!
    K

    ----------------------------------
    VB6 Ent SP4 Win2K Pro Platform SDK

  5. #5
    New Member
    Join Date
    Sep 1999
    Location
    Australia
    Posts
    14
    This is the code I use to open a report which has been constructed in VB.

    Private Sub mnureport_Click()
    Form1.Data1.Refresh
    Form1.Data1.Recordset.MoveFirst
    Form1.Report1.DataFiles(0) = " path to Access database "
    Form1.Report1.ReportFileName = " path to report "
    Form1.Report1.PrintFileName = " path to report "
    Form1.Report1.Action = 1
    End Sub

    If you wish to report on a selected field(s) I add this line of code after PrintFileName line.

    Form1.Report1.SelectionFormula = '"{Table1.Field} = '" _
    & Form1.Text1.Text & "'"

    This is for Text and if you are selection on number , leave out the '

    Hope this is what you are after.
    Trevor
    [email protected]

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