?
Solved

How do I use a percent that uses a running total in a line chart for Crystal Reports?

Posted on 2014-11-20
4
Medium Priority
?
299 Views
Last Modified: 2014-11-21
Using the following formula for a running percentage:
@newPercent:
If Sum ({Command.Principal}, {Command.ActualLoanDate}, "annually") = 0
then 0
else
{#Amount} / Sum ({Command.Principal}, {Command.ActualLoanDate}, "annually")

#Amount is a running total with description attached as a word document below



Cannot use
0
Comment
Question by:plainwrapname
[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 101

Assisted Solution

by:mlmcc
mlmcc earned 1332 total points
ID: 40455742
As you found out you can't use running totals inn charts.

Crystal uses a multiple-pass process to render the report.  Charts are created in I believe pass 2 while running totals are calculated in pass 3 (last pass through the report)

Therefore the values of a running total are not known when the chart is created.

What are you trying to show using the running total?

mlmcc
0
 

Author Comment

by:plainwrapname
ID: 40455821
I am trying to calculate an accumulated percentage based on a running total for each period.
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 1332 total points
ID: 40455952
You then want to graph the results?

The easy way may be to write a stored procedure that can return the data summarized as you desire.

There are some tricks that can allow a subreport to build the chart but they depend on the data you have so it may not be very easy to get it setup.

mlmcc
0
 
LVL 35

Assisted Solution

by:James0628
James0628 earned 668 total points
ID: 40457017
FWIW, I don't see anything attached to your first post.  If we could see how the running total is set up, we might be able to suggest a different way to get that figure, which could be used in a chart.  From what you've said, I rather doubt it, but we won't know until we see it.

 Other than that, since you're apparently already using a CR Command, maybe you could modify that query to calculate the running total, so that CR won't have to do it.

 James
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

762 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