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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting summary field 1

Status
Not open for further replies.

BLKDAWG

Technical User
Aug 24, 2001
10
US
I'm using crystal 6 with Peoplesoft query and I am trying to summarize a field based on group criteria and field criteria.

My PS query pulls Deptid, Account, Period and Posted Revenue. Here's a small example:

Deptid Account Period Revenue
5800 4302 1 500.00
5800 4305 3 300.00
5800 5202 5 200.00
5800 5300 7 100.00

I'm trying to create a summary field in crystal that summarizes revenue based on deptid and the first character of the account. I've already created a Deptid group. I've tried using the following formulas in my field criteria, but it stills pull all 4000 series and 5000 series accounts and totals them. Here are a couple of different formulas I've tried.Ideas?

//if {FCC_REVEXP.ACCOUNT} startswith "4" then Sum({FCC_REVEXP.POSTED_TOTAL_AMT}, {FCC_REVEXP.DEPTID})

//if Mid ({FCC_REVEXP.ACCOUNT},1 ,1 ) = "4" then Sum ({FCC_REVEXP.POSTED_TOTAL_AMT}, {FCC_REVEXP.DEPTID})

Thanks!
 
Create a formula field to concatenate the 2 fields as follows:

totext({DeptID})&left(totext({Account}),1)

Then from the design window, right click the {FCC_REVEXP.POSTED_TOTAL_AMT} field, select insert, summary and choose your new formula field as created in step one above.


Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
Thanks! That worked perfectly. Only change I made was to replace the "&" with a "+" in the totext formula.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top