Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Need to display every row in 3 related tables Post Reply Post New Topic
Author Message
steppinthrax
Newbie
Newbie


Joined: 20 Jan 2010
Online Status: Offline
Posts: 1
Quote steppinthrax Replybullet Topic: Need to display every row in 3 related tables
    Posted: 20 Jan 2010 at 11:59am
Here's the deal
 
I have a recipe database that is broken up into 3 tables that are related with a common ID.  I have a recipe table, ingredient table and directions table.  The recipe table contains a single recipe rows.  One row for each recipe and a generated ID. 
 
The ingredient table contains multiple rows (one row for each ingredient in a given recipe) and a ID linking these ingredients to the recipe table.
 
The direction rows contain multiple rows (one row for each direction in a given recipe) and a ID linking these directions to the recipe table.
 
I want to use crystal reports to create a recipe book.  That is each page should contain the recipe, all ingredients for the given recipe ID and all directions for the given recipe ID. 
 
I've tried importing all tables or importing a stored procedure.  However, Crystal keeps repeating data or making a cartesean product.  I don't want to do subreports because they are not related with each other....
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 25 Jan 2010 at 6:10am
Given the data, I was going to suggest subreports.  Pass in the recipe ID get a list of ingredients, then a second subreport for directions.
 
Pretty much any other solution will produce duplicated information and formatting issues.
 
I don't usually recommend them, but I think the subreport is the way to go.
 
I don't understand "because they are not related with each other".  Each subreport would be linked to the recipe ID, and so would be related. In addition, you could place subreport in a separate detail section for formatting/suppression.
 
HTH
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.