Print Page | Close Window

Adding quantity to a summary field...

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=21443
Printed Date: 19 May 2024 at 8:19am


Topic: Adding quantity to a summary field...
Posted By: Thad Tuck
Subject: Adding quantity to a summary field...
Date Posted: 21 Apr 2015 at 6:18am
This is my first time...
I am trying to create a formula that would add a quantity to a summary field based on a specific group header name and displaying the result...

-------------
Thaddeus



Replies:
Posted By: hilfy
Date Posted: 22 Apr 2015 at 6:58am
To do this, you'll create the summary in a formula. It will look something like this:

NumberVar numToAdd := 0;
If {group field} = 'Blah' then
numToAdd := 1
else if {group Field} = 'Blort' then
numToAdd := 2;
Sum({field to summarize}, {group field}) + numToAdd


-Dell

-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: Thad Tuck
Date Posted: 23 Apr 2015 at 7:41am
Hi Hilfy,
   It worked... Sweeettt... Thank you very much...
     Thad



-------------
Thaddeus



Print Page | Close Window