Joined: 27 Nov 2009
Location: Portugal
Online Status: Offline
Posts: 1
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.
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
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.
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