Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Date Range Formula Post Reply Post New Topic
Author Message
hoopthang35
Newbie
Newbie
Avatar

Joined: 21 May 2012
Location: United States
Online Status: Offline
Posts: 4
Quote hoopthang35 Replybullet Topic: Date Range Formula
     Posted: 21 May 2012 at 8:40am
On the transcripts I am creating I need two specific dates on the top of the paper. Student Start Date, and then Student Graduation/Leave date. My problem is the report is putting the date ranges OF THAT PAGE, not of their entire term in our college.

I am unable to wrap my brain around the formula that will have the date range in it's entirety not just of the data on the page.

???
College Reporter
IP IP Logged
rkrowland
Senior Member
Senior Member
Avatar

Joined: 20 Dec 2011
Location: England
Online Status: Offline
Posts: 259
Quote rkrowland Replybullet Posted: 21 May 2012 at 10:31pm
Not enough information.
 
What fields do you have in your database? What fields do you have in your report? What fields do you want to calculate on? What is your current method? What's your current result? What's your desired result? What are the groupings in the report?
 
Example data? Example of what you want to see?
 
Thanks,
Ryan.
IP IP Logged
hoopthang35
Newbie
Newbie
Avatar

Joined: 21 May 2012
Location: United States
Online Status: Offline
Posts: 4
Quote hoopthang35 Replybullet Posted: 22 May 2012 at 6:15am
Hey Ryan!

I put two specific dates into the page header. One date was the day the student started with the school while the other was when the student graduates, or up to the current term they are enrolled. 

I pulled the Field name from the database field section. Every time I switch pages the date changes. This should not happen! This is a set date. What I think is happening is the start date is changes in relation to when they started the class listed on the page, and the end date is listed for the last class on that sheet in relation to the class listed.

I have no method. I have been trying to write a formula so that it will pull the first "entry" date and it will not change,  even when going from page to page. Also, I tried to write a formula for the end date to be permanent and the same from one page of the transcript to the next.

The grouping in the report are by last name, and the term. There are around three terms on a page. When I click to the next page the dates change in relation to those classes.

The outcome I want is basic, two dates to stay permanent on ever page of the specific student's transcripts. If they started on 05/16/2008 I want that field to stay 05/16/2008 throughout. 

Example: I put in the field and on one page the start date is 05/16/2008, next page it turns to 07/10/2008, next page it changes again. Like wise with the end date as well.

My concern is, when I open this data in excel, there is one date for each category,  a START DATE and an END DATE, not everything in between.

Does this help clarify? Thanks for the help!
College Reporter
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 22 May 2012 at 7:31am
when you drag a field into a page header it only shows you the value for the first row on the page.
You can group on the student and use maximum() and minimum() functions with the group condition.
I you have more than 1 student on the page you it will only show for the first student listed.
maximum(date,student)
minimum(date,student)
 
IP IP Logged
hoopthang35
Newbie
Newbie
Avatar

Joined: 21 May 2012
Location: United States
Online Status: Offline
Posts: 4
Quote hoopthang35 Replybullet Posted: 22 May 2012 at 12:10pm
I understand what you are saying, however I attempted this today and I was unable to make it work. What it is doing is picking the minimum date of 2000 sets of data, and a maximum date of 2000 sets of data, when I want it per student. 

So I go to the grouping button, pick minimum and maximum and start date and end date, where do I add the student? ex. Minimum(date,student) ???

I also attempted writing a formula for this as well in the formula editor and it says that my information is not part of the formula...


College Reporter
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 23 May 2012 at 4:26am
Go to groupoing buttion anad add a group on the student field (like the student id to avoid grouping on same last names)
go to insert summary (sigma sign)
the formula is
Maximum({table.datefield},{table.student})
 
Minimum({table.datefield},{table.student})
 
You have to replace the blue with the table and field name from your data set. The date field is the field you want maximum and minimum of and the student field is field you gropuped on (like the student ID)
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