Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need help trying to select the sum of something

Status
Not open for further replies.

RobbOrt

Programmer
May 27, 2010
16
US
I am using Crystal Reports XI and am having trouble totaling part of a table column.
My parameters are:
{?Calendar_Year} and {?Calendar_Qtr}
My Record Selection Crteria is:
{FEE_STATUS} = "PAID" and
{FEE_TYPE} in ["TS", "PL", "ME", "FS", "FM", "EL", "BM", "BU"]

I am trying to get the:

SUM({FEE__DUE_AMT})
WHERE {FEE_TYPE} in ("TS","PL","ME","FM","EL","BM","BU")

Notice that is all but one of the items in my Record Selection Criteria, but no mater what I write in my formulas using the SUM ({FEE_DUE_AMT}) it still gives me the SUM including "FS" FEE_TYPE.

I can not figure out how I can not get the same information using Crystal as I can writing a plwn SQL statement.

Can someone please help? Thanks.

 
If I'm not mistaken, you can create a Running Total Field. Select the Field to summarize as the {FEE_DUE_AMT} field, the Type of summary as Sum, set Reset to Never (or select a group if you are using groups), and Evalute using the formula {FEE_TYPE} IN ["TS", "PL", etc.].
 
Or you can write a formula like this:

if {FEE_TYPE} <> "FS" then
{FEE__DUE_AMT}

Place this formula in the detail section and insert a sum on it at a group and/or report level.

-LB
 
LB-

Thanks, I had tried that and end up with $0.00, but I realized I was trying to do - if {FEE_TYPE} <> "FS" then
sum({FEE__DUE_AMT}). Thats where my mistake was. So now I sum the new VAR from that formula and it works great.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top