i have a date field and i want to create a calculation field which will show the maximum date of all the dates in a found set. is that possible
Are used in a report after a find and sort. Place the field in the footer or a sub-summary part, for example.
You can use the 'Maximum' type & select the field to summarize (your date field).
IF you have related data ('found set' in a portal), then the aggregate functions can be used:
please which field should i place in the footer? The date field?
The Summary field would be in the footer.
Do you need something else to do with the value?
Beverley this is what i really want to do. I have a report of inventory from a particular date to another date. The report only shows items and quantities on hand. I wanted to display either on the header or footer the date from which the inventories shown starts from and the date it ends. so i was thinking if i could get the maximum of all dates in the date field for the found set that would be the end date for the inventory report and the minimum of all dates in the date field would be the start date for the inventory. If i could get these two then I'll display it on the report on which I'll print.
can you please help me out.
Thanks. After reading the links. I've been able to do it. Thanks
She has helped you.
If you put the recommended summary field into the header, it will show the maximum date over all dates in the found set.
If your records are sorted by date in ascending order, you can just put the date field into the header and it will show the first date. If not, you can define a second summary field to show the minimum date.
I can also offer another option. It isn't necessarily any better than what is already suggested, but might be an approach that you prefer (or not) as there's a subtle difference in what dates are displayed.
I have reports where the user creates the report first by specifying a start and end date in a pair of global fields. A script uses the dates entered to perform a find in order to produce the report. Since I have those dates in global fields, I just put them into the header to show first and last dates.
But now to point out the subtle difference:
Those globals specify the criteria used, not the dates in the records found. Most of the time, there is no difference and when there is, it often doesn't matter, but there can be a difference. The earliest date in your report might be later than the specified start date and the latest date might not match the specified end date if there are no records with those dates to be found.
Wow that’s a nice approach as well. I’ll set up another layout and use this when a user wants to enter the start and end date before performing the find. Thank you.
Retrieving data ...