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
282 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
  • 2
4 Comments
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 333 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 100

Accepted Solution

by:
mlmcc earned 333 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 34

Assisted Solution

by:James0628
James0628 earned 167 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

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.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

829 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