Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Date Display Post Reply Post New Topic
Author Message
crystalsonic
Groupie
Groupie


Joined: 26 Jan 2012
Online Status: Offline
Posts: 46
Quote crystalsonic Replybullet Topic: Date Display
    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.

Edited by crystalsonic - 06 Jun 2017 at 9:15am
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet 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
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.016 seconds.