locked
how to write query in crystal reports?

    Question

  • hello guys,

    i've been working on crystal reports but it the first time that i want to create a query to read values from two different tables and want to show their data in the same report.  i don't how to do this.  because up to this level i've just worked on singled tables and displaying their values in singled reports

    please help

    thanx in advance


    regards,
    Naeem Akhtar

    Monday, July 07, 2008 7:58 AM

Answers

  • Hi Naeem

    You can add more than one table in the "Database Expert". Once you have included more than one table, a new tab appears at the top called "links". Clicking the links tab will display a page where you can join your tables together. Once you have joined the tables, you will be able to report from both of them (all of them if more than 2).

    Another way would be to write a "Stored Procedure" which returns a single dataset based on multiple tables and then base your report on the Stored Procedure.

    Hope this helps

    Jon Royales
    • Proposed as answer by neonprimetime Monday, July 07, 2008 8:31 PM
    • Marked as answer by jack 321 Thursday, July 10, 2008 6:03 AM
    Monday, July 07, 2008 10:32 AM

All replies

  • Hi Naeem

    You can add more than one table in the "Database Expert". Once you have included more than one table, a new tab appears at the top called "links". Clicking the links tab will display a page where you can join your tables together. Once you have joined the tables, you will be able to report from both of them (all of them if more than 2).

    Another way would be to write a "Stored Procedure" which returns a single dataset based on multiple tables and then base your report on the Stored Procedure.

    Hope this helps

    Jon Royales
    • Proposed as answer by neonprimetime Monday, July 07, 2008 8:31 PM
    • Marked as answer by jack 321 Thursday, July 10, 2008 6:03 AM
    Monday, July 07, 2008 10:32 AM
  • thanks jon



    your post was much helpfull


    may i know something more in detail about "Stored Procedure" i never worked on it.


    take care.



    regards,
    N Akhtar
    Thursday, July 17, 2008 8:05 AM