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
273 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sql 2014,  lock limit 5 32
How to use three values with DATEDIFF 3 26
average of calculation (TSQL) 4 10
Sql query with where clause 2 17
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…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
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

831 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