Print Page | Close Window

Arithmatic Operations based on rows

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=8840
Printed Date: 02 May 2024 at 2:30pm


Topic: Arithmatic Operations based on rows
Posted By: kirandb
Subject: Arithmatic Operations based on rows
Date Posted: 08 Jan 2010 at 7:58am

My Data is something like

ID     NAME        MONTH              QTR              YEAR               YTD 
---    --------       ----------           ----------          --------           ---------   
1       TEXAS       13,546            40,564            154,546        16,764
2       OHIO         5,675             23,567             101,453        7,685
3       CALI          -5,778           -25,764            4,678            -6,878
 
Row 4 could be any arithmatic operation such as (Row1 + Row3 ) / Row2.
 
How do i implement in crystal reports 2008 ?
 
Thanks,
Kiran


-------------
share your knowledge



Replies:
Posted By: lockwelle
Date Posted: 11 Jan 2010 at 5:47am
the short answer is create a formula using shared variables.
 
you would need to know what you want row 4 to do (or the range of options) then you would need to keep track of the values you want row to act on.  If it is always just 3 rows, you could name variables, but if the number of rows is indeterminate at the time of design, you would probably need to use an array of shared variables.
 
HTH



Print Page | Close Window