Solved

Calculate return based on the min and max dates in a list

Posted on 2014-03-04
3
308 Views
Last Modified: 2014-03-05
I have a report that has a list of dates and prices and I need to calculate the return from the min and max dates in such a formula:

(Max Date Price/Min Date Price )-1
0
Comment
Question by:wilpitz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 500 total points
ID: 39906401
I am assuming you have the report grouped on the item and then have it sorted by date.

In the report header add a formula
WhilePrintingRecords;
Global NumberVar MinDatePrice;
""

Open in new window


In the product group header
WhilePrintingRecords;
Global NumberVar MinDatePrice;
MinDatePrice := {ProductPriceFIeld};
""

Open in new window


In the group footer
WhilePrintingRecords;
Global NumberVar MinDatePrice;
({ProductPriceFIeld} / MinDatePrice) - 1

Open in new window


mlmcc
0
 

Author Closing Comment

by:wilpitz
ID: 39906965
That worked!!!!
0

Featured Post

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question