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!
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!