Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting a single date from a record

Status
Not open for further replies.

bettaa

IS-IT--Management
Feb 28, 2006
20
0
0
US
I have two tables that I am drawing information from. A client table and an appointment table. I have the tables linked by unique client ID numbers. Basically what I need is to select the earliest date from the appointment table for the particular ID and have it appear with the rest of the client record.

 
Also I am using CR 5.0 :-\
 
Group by the ID.

In the Report->Selection Formulas->Group place:

{table.date} = minimum({table.date},{table.id})

-k
 
Unfortunatly this data is going to be put onto a filled out form. So using a seperate group isn't going to work. :-\.

What I have is, is a word document pasted into CR and I am basically having CR spit out data that is related to the form. One of the fields is "Date of First Appointment". So I am trying to figure out how to pull JUST the first date in the appointment table for the particular client number.
 
A group deson't preclude doing that, and if you intend to describe the layout of a report, try using technical terms, such as the sections used, etc.

Crystal doesn't have filled out forms, nor will it allow you to insert values into a Word document, so none of this shed any light on your dilema.

-k
 
here is an image of the report that i am working on.
The 6th line down is the line I am trying to populate. Basically the design of the 'report' so to speak is one giant detail box. I tried the formula you gave me, but it turned out as a boolean field.

199876064_d4f2fa516b_o.jpg
 
Perhaps you should have read the post, it stated:

In the Report->Selection Formulas->Group place:

{table.date} = minimum({table.date},{table.id})

Not to place it in the report.

-k
 
I think you can just create a formula:

minimum({table.date},{table.id})

Place this on the form where you want it. This assumes that you have a group on {table.id} as SV suggested. You can suppress the group header and footer though so it doesn't display.

-LB
 
thanks, that worked perfectly lbass!

the formula turned out as such

minimum({appointment.appointment date}, {appointment.patient number})

and as both of you suggested the suppressed group made everyting work just right :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top