[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 494
  • Last Modified:

Show data from 2 separate tables on 1 Crystal report

Dear Experts,
I have sales data stored on 2 separate tables in MySQL database. 1 table is to store sales data between suppliers and the other table is to store sales data between supplier and customer. I would like all these data to be shown on 1 crystal report page. Can i do this? Or is there any other way to display all the sales report on 1 page? I want to print these data according to supplier parameter supplied by the user at VB runtime. Thank You experts...
0
Slythie
Asked:
Slythie
  • 4
  • 4
2 Solutions
 
peter57rCommented:
It's not clear from your Q whether the data is to be treated as one single table (so are the tables exactly the same field structure) or whether they are different and  you want a '2-part ' report - one to show records from the first table and the second part to show records from the second table.
0
 
SlythieAuthor Commented:
the 2 tables have similar structures, only different names... and yes i want to display it on 1 single report if its possible... i want to display the sales data between suppliers first and then the sales data between suppliers and customers on 1 single continuous report... any ideas?
0
 
peter57rCommented:
It sounds like you should use the Add Command option when selecting your data source and create a Union All query to add the two tables together.
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
SpykairCommented:
Or you could have your first table in your main report and then have a sub report that uses the 2nd table.

Spykair
0
 
SlythieAuthor Commented:
how am i suppose to get the add command option and how to insert the union sql command in crystal report? sorry to ask but im kinda new to crystal..
0
 
peter57rCommented:
The Add Command option is at the top of the list of objects when you have selected your database.
0
 
SlythieAuthor Commented:
how do u enter the Union SQL query? Can i just import it from my sql editor?
0
 
peter57rCommented:
I think it's a copy & paste job.
0
 
SlythieAuthor Commented:
i finally used stored procedure from mysql and then use that data to create my report. Thanks for the input experts... =)
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now