Solved

Alternative for Runningsum

Posted on 2011-02-14
4
468 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 500 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 100

Expert Comment

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

mlmcc
0
 
LVL 100

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
I recently went through setting up a JasperReports Server using the AWS EC2 instance, and this article will cover some basic administration tasks I had to perform.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

734 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