?
Solved

Alternative for Runningsum

Posted on 2011-02-14
4
Medium Priority
?
470 Views
Last Modified: 2013-11-16
Hi All,

I would like to is there any alternative menthod for runningsum instead of using running sum function?

Thanks,
0
Comment
Question by:Subash2023
[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
  • 2
4 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 2000 total points
ID: 34888434
I am assuming you are using Crystal Reports.

Yes you can do your own running sum instead of using a running totals field.

Basically you have 3 formula fields.

Report header...initialise the variable

whileprintingrecords;
numbervar myrunningsum:=0;
""


Detail line...accumulate the sum

whileprintingrecords;
numbervar myrunningsum;
if <somecondition is true> then
myrunningsum:=myrunningsum + {table.field};
""

In the report foooter..print the value

whileprintingrecords;
numbervar myrunningsum;
myrunningsum


If you have a grouped structure you might want to modify this pattern to use group header and footer instead of report header and footer.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 34888816
What are you trying to accomplish?

mlmcc
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 35163507
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

Hi, In my previous Article  (http://www.experts-exchange.com/Database/Reporting/A_15199-Introduction-to-Microstrategy.html)I discussed some basic understanding of Microstrategy that how we can get in Intro of Microstrategy (MSTR). Now it's tim…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month10 days, 21 hours left to enroll

770 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