Print Page | Close Window

Date Display

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22326
Printed Date: 02 May 2024 at 12:52pm


Topic: Date Display
Posted By: crystalsonic
Subject: Date Display
Date Posted: 06 Jun 2017 at 9:06am
Every accession can have Event 1 and 2. Event 2 can have several entries with different dates.
Accession123 Event 1     06/05/2017 09:00:00
Accession123 Event 2     06/06/2017 10:00:00
Accession123 Event 2     06/07/2017 11:00:00
Accession123 Event 2     06/08/2017 07:00:00     
Accession456 Event 1     06/05/2017 08:00:00
Accession456 Event 2     06/06/2017 09:30:00
I am using the whileprinting records to identify the event and display the data by column.
          Event1           Event2
Accession123 06/05/2017 09:00:00 06/08/2017 07:00:00
Accession456 06/05/2017 08:00:00 06/06/2017 09:30:00
This is the formula that I am using:
WhilePrintingRecords;
If {Tracking.Event} = "1"
THEN Global datetimeVar strcorrectiveaction2 := DateTime({Tracking.TrackDateTime});
The problem is that for Event 2 the Latest date is displayed.
Is there a way to display the Earliest date found for Event 2?
OR
If there a way to list out all of the dates (without knowing how many) for Event 2 on the same row?                         Event2
Accession123 06/06/2017 10:00:00 06/07/2017 11:00:00 and so on...

THANKS FOR YOUR HELP.



Replies:
Posted By: lockwelle
Date Posted: 23 Jun 2017 at 8:30am
you could do this as a grouping on the event1. then in the details you could concatenate event2 dates into string with crlf to separate them. then in the group footer show event1 and all the event2.

OR

again suppress the details, but check each event2 to see which is greatest and store that in a variable. in the group footer, display the variable.

HTH



Print Page | Close Window