Results 1 to 2 of 2

Thread: cannot open sql server while displaying crystal report

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2006
    Posts
    73

    Arrow cannot open sql server while displaying crystal report

    Hi experts

    I am using Oracle database with crystalreport and visual basic 6.0

    oracle-database is on the server computer and I want to display report in the crystal report ver 8.0, report is comprise of data from 3-4 tables of the oracle-database using some where clauses or conditions in sql query.
    I have placed requred field from 3-4 tables in the crystal report then records are shown in the report preview.(without any error)
    But if I call this same report from visual basic program on the button click by passing required sql query it shows the error (cannot open Sql Server).

    I am using following codes:

    VB Code:
    1. [B]Private Sub Show_Click() [/B]
    2.  
    3. cr1.ReportFileName = "C:\form4compare\reports\test1.rpt"
    4.  
    5. cr1.SQLQuery = "Sql Query"
    6.  
    7. cr1.Action = 1
    8.  
    9. End Sub

    same report is displaying without passing sql query (i.e cr1.SQLQuery = "Sql Query") in the above code .But it is not useful for me becuase I want to filter data from where conditions in query.

    so plz help me
    Last edited by pandey_om; Jul 27th, 2006 at 11:46 AM.

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