Solved

Is it possible in Crystal Reports XI to Graph Formulas that use a running total or variable?

Posted on 2009-05-08
4
612 Views
Last Modified: 2013-11-15
I need to graph a formula that I has a running total or vaiable in it.  Is this possible?

I have the following database fields and running totals.

Database Fields:
Costcode, Tran_Date , Total_Theory
I have these grouped by date and have created a running total on Total Theory.  However my graph needs to show by Week, the value of (RUnning Total) / database field Budget.  Can't seem to graph this.

Hope this makes since and will be very appreciative of suggestions.
0
Comment
Question by:Gar_za
[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
  • 2
4 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 24340121
Yes through a trick.  Charts cannot use running totals since they are calculated after the charts are built.  HOwever since subreports are run at during the last pass through the report you can build arrays with the data and pass the data to the subreport.

Check this link
 https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40e7130d-aa1e-2b10-ce9f-eee2a54ff4cd

mlmcc
0
 

Author Closing Comment

by:Gar_za
ID: 31579603
I feel like I just won the lottery with this information.  Thank you.  This is exactly what I needed to get my graphs to work!
0
 

Author Comment

by:Gar_za
ID: 24341335
Ok, so got this to work when the On change is a text field.  How do I do it if the OnChange is a date field?

My On change Of  Variable has the following formula in the main report:
whileprintingrecords;
stringvar strOnChangeOf;
strOnChangeOf := strOnChangeOf + totext({cstcddtl.TRAN_DATE})+"," +"^";

When I go to the selection formula to Select CSTCDDDTL.Tran_Date base on Onchange i have the following:
{cstcddtl.TRAN_DATE} in Cdate(Split({?Pm-@OnChangeOf}, "^") [RecordNumber])

When I do this I get an error stating that "A date range is required here".
How do I make this a date range so that the selection formula will work?

Thanks
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 24341468
I believe you can only use the trick through string fields because the JOIN only works on string arrays

In the main report when you add it to the array change the date to a string as
   CStr({DateField},'yyyy/mm/dd')

When you need them in the subreport convert them back
    Date(YourArray[i])

mlmcc
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

Hi, I am very much excited today since I'm going to share something very exciting Tool used for Analytical Reporting and that's nothing but MICROSTRATEGY. Actually there are lot of other tools available in the market for Reporting Such as Co…
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.
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

749 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