Print Page | Close Window

1st sale and last sale value

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=17654
Printed Date: 17 May 2024 at 9:13pm


Topic: 1st sale and last sale value
Posted By: Kalliz50
Subject: 1st sale and last sale value
Date Posted: 28 Sep 2012 at 2:33am
I'm doing a cross tab with years and i want to see what the first sales price was and the last sales price (from orders throughout the year) was and then do a variance ... can anyone help me figure that out?

-------------
Karen



Replies:
Posted By: Sastry
Date Posted: 05 Oct 2012 at 12:54am
Hi
 
It is not possible to pull values from cross tab.  You need to place price and date fields on detail section.  Now find out minimum date and price i.e.
 
To find Minimum price.
Numbervar MinPrice;
If Minimum({table.date}) = {Table.date} Then {Table.Price}
MinPrice:={Table.Price}
 
To find latest price :
 
Numbervar MaxPrice;
If Maximum({table.date}) = {Table.date} Then {Table.Price}
MaxPrice:={Table.Price}
 
Now you can find the variance.
 
 


-------------
Thanks,
Sastry


Posted By: Kalliz50
Date Posted: 05 Oct 2012 at 6:53am
once i have that in the detail can i pull it into a column in a cross tab? 

-------------
Karen


Posted By: Sastry
Date Posted: 07 Oct 2012 at 7:27pm
No, you can't pull this values into your cross tab, because cross tab will always show the summaried values ie. aggregated values.

-------------
Thanks,
Sastry



Print Page | Close Window