Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: First an last record Post Reply Post New Topic
Author Message
ciberboy
Newbie
Newbie
Avatar

Joined: 27 Nov 2009
Location: Portugal
Online Status: Offline
Posts: 1
Quote ciberboy Replybullet Topic: First an last record
     Posted: 27 Nov 2009 at 4:26pm
Hello

Im am searching a way to get the value of the first and last record from a table, by a crystal reports 2008 formula. It cannot be using SQL or parameter.

The structure of the table is very simple:

Product: string
decription: string
price: money
date: date

I need to make calculation about profit and things like those, that are obtained by last(price) - first(price).

Lets imagine for this example that I only have one product with several prices and several dates. I can make the rest by myself.

But it seems that there are not those functions.

Any help?

Thanks in advance.

Edited by ciberboy - 27 Nov 2009 at 4:29pm
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 30 Nov 2009 at 6:34am
I would try making a group.  store the values that you want in the group header (the first record) then in the group footer perform the calculations as it will be on the last record.
 
You can suppress the group header and details if you need, it is just the setting of the variables that is important for the solution...the visibility of the records is up to you.
 
HTH
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