Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

crystal report of data from multiple tables

Posted on 2010-09-03
9
Medium Priority
?
292 Views
Last Modified: 2012-08-13
I want to create a report that will show data from several related tables.

Say I have a table with a column named job card and I want to track what has happened to that jobcard on other tables.

Basically I wast to see a see a subset of data from other tables based on a column in one table.
0
Comment
Question by:NormanMaina
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
9 Comments
 
LVL 8

Expert Comment

by:kingjely
ID: 33594219

Hi Norman,

go to database Expert.
then click the links tab, here you can link your tables



0
 
LVL 12

Author Comment

by:NormanMaina
ID: 33594347
Hi  Kingjely,

i have linked the tables OK...that works.

What am not sure about is do i have to select all the columns that i want from all the tables in the fields to display section and then group them?

What i want to achieve is query a record in a column in one table and then have results grouped according to the tables they come from.
Say I have |Tables A,B,C.

These tables are related and linked in CR...there will be only quering of values from one column in Table A...lets call it Jobcard.

I want the results for jobcard 0001 for example to show table B values in one heading and then table C values in another heading.

How can I achieve that?
0
 
LVL 8

Expert Comment

by:kingjely
ID: 33594563
Hi,

Yea step through the creation wizard as best you can, you can always change fields, and groups links ect as you go.

So you have chosen your 3 tables, linked them,
Now choose your fields to display, have you done that?

So have you then grouped by Jobcard_id ?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 12

Author Comment

by:NormanMaina
ID: 33594657
kingjely,i know how to create reports...what i want is to view the results grouped by the table from where they originate.
0
 
LVL 12

Expert Comment

by:JayConverse
ID: 33594684
Use subreports.
0
 
LVL 77

Expert Comment

by:peter57r
ID: 33594717
Now that you have explained your required output, you need to use jayconverse's answer.

The alternative to this is to build a sql UNION query using the Add Command option.

Joins are of no use to you for this requirement.
0
 
LVL 12

Author Comment

by:NormanMaina
ID: 33594758
JayConverse,

Can you give me a brief overview of how it works...or point me to a good resource.

Trust me,have been googling and am not sure if I need to create a report first and then create sub reports from that...
0
 
LVL 12

Accepted Solution

by:
JayConverse earned 2000 total points
ID: 33594784
When you insert a new subreport, you have a choice of which formula/field to use as your link.  It can be a summary, a parameter, a field, or even a static formula.  Then inside the subreport, your record selection will use whatever is passed in for the link.  

Sometimes  you have to create the subreport without a link, edit it, create a new parameter inside it to use in your selection, then go back to  the main report and link to that parameter.
0
 
LVL 77

Expert Comment

by:peter57r
ID: 33595682
If you just want three lists based on 3 tables with the same fields then  the simplest approach with subreports is to design one report for the first table and then sinply copy and rename the rpt  file for each of the other lists.
You then need to change the table source for the other reports.
Open each one and  do that using the Database >Set DatasourceLocation menu option.

You then create a new blank report and just use insert>subreport to add the subreports to this main report.

You can then sort out the overall layout of the combined output.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question