Solved

# Crystal Reports Formula Help

Posted on 2011-02-18
971 Views
I have a formula field I am trying to get a total but due to being a novice I need some help with the syntax.  I have a field called {GLTBDetail.FiscalPerOB}  I need to add up all the values and then subtract some of the records based on certain criteria.

I can add it easy enough     Sum  ({GLTBDetail.FiscalPerOB})

Can get the subtract part   "Select the records that are equal to the field above where {GLAccount.SegValue3} = "990" and sum them

So here is what I have and looking for the ?    Sum  ({GLTBDetail.FiscalPerOB}) - ?
0
Question by:tthayer
• 4
• 2
• 2

LVL 100

Accepted Solution

mlmcc earned 500 total points
ID: 34931556
How about a formula like this

If {GLAccount.SegValue3} = "990" then
0
Else
{GLTBDetail.FiscalPerOB}

Yoou can then do a summary on that formula and get the result you need.

mlmcc
0

LVL 3

Author Comment

ID: 34931569
Trying that now.
0

LVL 3

Author Comment

ID: 34931590
Ok I called the field  PeriodOB_990  then in the formula field I was using I put in Sum ( PeriodOB_990) and it worked.    Not sure I understand what it does but does the formula you gave  exclude the "990" because it is set to 0 and then all the others fall into  {GLTBDetail.FiscalPerOB}

0

Expert Comment

ID: 34931612
if you can create a group on some field you wish to seprate your records you may use SUM function as
sum({field}, {groupField})
0

LVL 3

Author Comment

ID: 34931616
OK what you game me works so I will just go with that.  Thanks very much!!!
0

LVL 3

Author Closing Comment

ID: 34931618
Thanks to the Experts and fast too!!!
0

Expert Comment

ID: 34931636
is this works fine, if so accept the answer and rank my points up
0

LVL 100

Expert Comment

ID: 34931650
Yes that is exactly what it does.

If you didn't need the 990 records for other purposes you could have used a selection formula to not select them for the report.

mlmcc
0

## Featured Post

Question has a verified solution.

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

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…
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…