[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

average on crystal report with 3 groupings

Posted on 2009-12-22
5
Medium Priority
?
241 Views
Last Modified: 2012-05-08
Hi,

I have a Crystal Report with 2 groupings I want to to calculate the percentage.  I having difficulty with setting up the running total with avg.

The field is a formula.

So here is the organization of the report:

Operational
    acct-type Revenue
    deptid
    acct-type Expense
    deptid
    acct-type Captial
    deptid
Projects

     acct-type Revenu
     deptid
      acct-type Expense
     depid
      acct -type Capital
     deptid

 I would like the avg formula to calculate on the deptid
 avg formula is :  actuals/ytd amt
How do I set up the running total wizard?

Thanks,
Lucy

using crystal 9.0





0
Comment
Question by:Lucia
  • 3
5 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 26106159
Can you use the summary functions rather than a running total?
Right click the field
Click INSERT --> SUMMARY

You can set the running totals up to reset on change of a group

mlmcc
0
 
LVL 13

Accepted Solution

by:
PCIIain earned 2000 total points
ID: 26106420
Average in both summary and running total is an average of a single field.

I believe that what you want is a formula which reads.

if(sum({ytd amt},{deptid) <> 0)then
sum({actuals},{deptid})/sum({ytd amt},{deptid})
0
 

Author Comment

by:Lucia
ID: 26106557
So,

My formula reads:

Sum ({NC_BUDGET_SUM_LNS.NC_YTD_BUDG_YR_CUR}, {NC_BUDGET_SUM_LNS.DEPTID})<>0 THEN

Sum ({NC_BUDGET_SUM_LNS.NC_ACTL_DEC_BUDG}, {NC_BUDGET_SUM_LNS.DEPTID})/Sum ({NC_BUDGET_SUM_LNS.NC_YTD_BUDG_YR_CUR}, {NC_BUDGET_SUM_LNS.DEPTID})


But it is not caculating properly on the group dept:

example:

409,017/554,286   is not equal to 1.

I put the formula at the deptid footer.

Thank you,
Lucy




0
 

Author Comment

by:Lucia
ID: 26106569
ok I multiplied by 100 and now it is happy.  Please don't close yet I need to do it on the next grouping.

I am loosing my mind :-)
0
 

Author Closing Comment

by:Lucia
ID: 31669031
Thank you all for assisting.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

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…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

830 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