Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Display children of a parameter - Crystal reports Post Reply Post New Topic
Author Message
dbuser1234321
Newbie
Newbie


Joined: 04 Jan 2013
Location: United States
Online Status: Offline
Posts: 2
Quote dbuser1234321 Replybullet Topic: Display children of a parameter - Crystal reports
     Posted: 07 Jan 2013 at 9:46am
I want add logic so that when a user enters a parameter, the reports returns all records equal to that parameter as well as all the children of the parameter. For example, if the user enters the word Hammer, the reports returns all hammer records as well as nails and boards assuming these are already defined as children in the DB table. How can I do this?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Jan 2013 at 4:23am
depends on how they are identified in the DB
if their is a parent and child field then it would be something like
{?Param}= {table.parent_field} or {?Param}={table.child_field}
IP IP Logged
dbuser1234321
Newbie
Newbie


Joined: 04 Jan 2013
Location: United States
Online Status: Offline
Posts: 2
Quote dbuser1234321 Replybullet Posted: 08 Jan 2013 at 9:50am
There is table.parent_field and a table.child_field defined in the database however the part I am having trouble with is getting the Crystal logic to select the parent field as well as any children field (multiple parameters) IF a child field or fields exist for the parent field. Some of the parents do not have children. Any thought for this?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Jan 2013 at 9:51am
you have to outer join the parent to the child and use the select statment on the parent record only
IP IP Logged
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