Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Linked Tables Post Reply Post New Topic
Author Message
kenh426
Newbie
Newbie
Avatar

Joined: 08 Oct 2007
Location: United States
Online Status: Offline
Posts: 7
Quote kenh426 Replybullet Topic: Linked Tables
    Posted: 09 Nov 2007 at 10:02am
I know this is a dumb question but I have two tables linked together by timesheetItemID. One table has all of the hours a person worked and the other table has all of the comments associated with the hours.
 
My problem is I want to show all of the hours even if those hours do not have a comment attached.
 
I tried using this formula but it only shows hours with a comment
 
if {VP_TOTALS.TIMESHEETID} <> {VP_COMMENTS.TIMESHEETID} then "No Comment"
else {VP_COMMENTS.TIMESHEETID}
 
Any help would be appreciated
Ken Hamilton
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 09 Nov 2007 at 11:13am
On the Links tab, set the relationship to show all records from VP_TOTALS (a left outer join). Then in your formula, test if the Comment field is null and if so, show "No Comment", else display the comment field.
If IsNull({VP_Comments.Comment}) Then
    "No Comment"
Else
    {VP_COmments.Comment};

Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
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.