Results 1 to 5 of 5

Thread: How to create crystal report using SQL query in access

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2006
    Posts
    3

    How to create crystal report using SQL query in access

    Hello,

    I'm using VB6 + Microsoft access and crystal report 8.5. I am able to create a report using "Add database" from crystal report. However, this way I only can create a report for master table (inventory, employee, etc..)

    The problem is how can I create a report if I must query 2 or more table from the database and then using this query result as my report ?

    In this query, I also need input from user. example : create a sales report.
    In my VB form, I have date time picker control. User should select the sales report date. Using this date (inputted by user) then I query tables in database.
    My sales report is based on this query result.

    How could I solve this ?

    Hopefully, someone could help me.

    Thank you
    -Budianto-

  2. #2
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Thumbs up Re: How to create crystal report using SQL query in access

    Welocme oN the Forums
    Read the article Crystal report In Vb at my signature

  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 2006
    Posts
    3

    Re: How to create crystal report using SQL query in access

    Thank you very much for your response.
    The tutorial help me a lot.

    I have one more question regarding my first issue.
    I tried to query like this :
    "Select * from sales Where salesDate >='" & DTPicker1.Value & "' and salesDate <= '" & DTPicker2.Value & "'

    I believe my query is right, however I always get this error :
    "error detected by database DLL"

    The error is in : .action = 1 ( I follow shakti5385 crystal report tutorial using sql query)

    I also tried to query like this :
    "Select * from sales Where salesDate >='1/1/2006' and salesDate <= '31/12/2006'

    I also get the same error.

    Do anyone know why I get this error ? I'm using Access as my database. It is because access does not support ">=" ? and how should I solve this issue ? I really need to solve this issue a.s.a.p.

    Thank you

  4. #4
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Thumbs up Re: How to create crystal report using SQL query in access

    Check that the crystal report is at the current location or not. Also register the crystal component at you PC.

  5. #5

    Thread Starter
    New Member
    Join Date
    Dec 2006
    Posts
    3

    Re: How to create crystal report using SQL query in access

    Check that the crystal report is at the current location or not. Also register the crystal component at you PC.

    hmm... I believe my crystal report location already in the same folder as project folder.
    Because of the deadline time, I have changed my report to be viewed by month and year.

    Another question, how to pass VB's control text or value to crystal report ?
    eg. I have a textbox and I want to pass this textbox value directly to my report.

    Thank you for your response.

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