Solved

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

Posted on 2014-03-04
3
302 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
3 Comments
 
LVL 2

Expert Comment

by:sarvjita
ID: 39905979
0
 
LVL 100

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now