Print Page | Close Window

Report from Multiple Tables

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=7135
Printed Date: 18 May 2024 at 7:27pm


Topic: Report from Multiple Tables
Posted By: evant8950
Subject: Report from Multiple Tables
Date Posted: 23 Jul 2009 at 9:30am
I am new to crystal reports. I am trying to create a crystal report from my http://www.daniweb.com/forums/post927362.html# - database that is structured similar to this:

Company
JobNumber
Platform
Level
Area
Item
Component

I need to create a report from this hierarchy. Each table is linked by a foreign key. I need to be able to select the database based on the ID i pass to the report. What is the best way to create a report like this? Do I use a sub-report? Or is there a better way?



Replies:
Posted By: lockwelle
Date Posted: 24 Jul 2009 at 6:48am

are these the tables in the database or the databases?

If you want to use multiple databases, not tables, the only solution that comes to mind is a stored procedure, which will need to be in the database that the connection is pointing to.  In the stored proc, you can have the code select from the correct database.  Crystal can only 'see' 1 database at a time.
 
Also, unless this is being called from an app, you don't pass things to the report, the report selects based on inputs made to the report. If you are going to pass anything to the database (you are using an app) why not have the app collect the data and pass that to the report?
 
HTH



Print Page | Close Window