Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Sum by Group formula

Posted on 2014-11-11
2
Medium Priority
?
249 Views
Last Modified: 2014-11-11
Gurus,

I have a subreport passing out a variable to my container report in the detail area called:

TotalPremiumValue

WhilePrintingRecords;
Shared NumberVar TotalPremiumValue;
TotalPremiumValue


I'm having trouble summing this variable for each group.  (I need to do a simple math total there).  TotalPremium / # of Events


2013
    Event 1 - Total Premium Value = $100,000 (Got this variable)
    Event 2 - Total Premium Value = $200,000

    Total Premium Value for 2013 = $300,000 - - - - I can't get this
    Total Premium per Event = $150,000


I'm really bad at Crystal variables so any help would be great!  Thanks!!!

Steve
0
Comment
Question by:SStroz
[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 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 40435844
In the year group header add a formula
WhilePrintingRecords;
Shared NumberVar TotalPremiumValue;
Global NumberVar YearTotal;
 TotalPremiumValue := 0;
YearTotal := 0;
''

Open in new window


You need a formula in a section AFTER the subreport to do the totals.(perhaps the display formula)
WhilePrintingRecords;
Shared NumberVar TotalPremiumValue;
Global NumberVar YearTotal;
YearTotal := YearTotal + TotalPremiumValue;
TotalPremiumValue

Open in new window


In the YEAR group footer Add a formula to display the year total
WhilePrintingRecords;
Shared NumberVar TotalPremiumValue;
Global NumberVar YearTotal;
YearTotal

Open in new window


mlmcc
0
 
LVL 7

Author Closing Comment

by:SStroz
ID: 40436114
Perfect Michael - worked like a charm!!!

Thanks a million!


Steve
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Problem Statement In an SAP BI BO Integration project when a BO universe is built on a BEx query, there can be an issue of unit & formatted value objects not getting generated in a BO universe for some key figures. This results in an issue whereb…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

715 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