Results 1 to 3 of 3

Thread: simple report

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2008
    Posts
    29

    simple report

    hi to all.

    i have the following code calling a report created in crystal report using odbc connection.
    Code:
    cr.Connect = "ODBCDBName"
    cr.SQLQuery = "Select * TableName"
    cr.ReportFileName = App.path & "ReportFile.rpt" 
    cr.PrintReport
    but the problem is that the report does not show up. why is it?

    noister

  2. #2
    Frenzied Member
    Join Date
    May 2006
    Location
    some place in the cloud
    Posts
    1,886

    Re: simple report

    Probably because of missing \ in path :
    Code:
    cr.ReportFileName = App.path & "\ReportFile.rpt"

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jun 2008
    Posts
    29

    Re: simple report

    here's my current code now...
    Code:
    cr.Connect = strODBCDB
    cr.SelectionFormula = ""
    cr.ReportFileName = StrReportFile
    cr.WindowShowPrintSetupBtn = True
    cr.WindowShowRefreshBtn = True
    cr.WindowState = crptMaximized
    cr.Action = 1
    error: Run-time error '20599'
    Cannot Open SQL server.

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