Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: First Record Only Post Reply Post New Topic
Author Message
Kitty1
Senior Member
Senior Member
Avatar

Joined: 14 Apr 2010
Online Status: Offline
Posts: 159
Quote Kitty1 Replybullet Topic: First Record Only
     Posted: 14 Apr 2010 at 11:23am
Hello I am very new to Crystal Reports, and what I've learned I've figured out on my own.   Confused  Anyway I just wrote a report which I'm pulling information from 3 tables, the main one being our Inventory file, and I want to pull information from the Open Order file, but since there are multiple open orders with the same Inventory part, I want to pull ONLY THE RECORD WITH THE EARLIEST DUE DATE.   I thought if I put the information in the Heading section of the Inventory Part group that it would work, which it did, but when I do that, I am getting repeats of a detail section below.  Any help would be greatly appreciated.  Thanks! Wink
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 15 Apr 2010 at 3:09am
depends on how you want to use it...if you only want to display the record associated with the earliest date, I would set a variable in the group header and then suppress all detail records that don't match...
 
in the header
global datevar earliest := {table.datefield};
""  //to hide the assignment (or don't use and place on the form where the date would be displayed)
 
in the Section Expert for the detail section:
global datevar earliest;
earliest <> {table.datefield}
 
Hope this points you a direction that'll work for you
IP IP Logged
Kitty1
Senior Member
Senior Member
Avatar

Joined: 14 Apr 2010
Online Status: Offline
Posts: 159
Quote Kitty1 Replybullet Posted: 15 Apr 2010 at 4:49am
Hi, thanks for the suggestion!  I want to just pull in the record with the earliest due date  from the open order file and use that date on my inventory record line at the group header level.   i have never worked with variables, but will do some reading on it and see how i make out.  Thanks again! 

Edited by Kitty1 - 15 Apr 2010 at 4:51am
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