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!

Adding Sub accts amount due together to represent on the Main Acct 1

Status
Not open for further replies.

ihcc2uni

Technical User
Mar 26, 2007
70
US
I have created an Accounts Receivable report but now I am trying to make it where my Sub-Accounts all add together along with the main account to total that line on the Main Account. My main account numbers are four digts 1001 and if there is a sub account associated with the main account it get additional dash and 3 more digits assigned to it (first sub account would be 1001-002 with the main account becoming 1001-001) I'm needing help with making it recognize the first four digits are the same and then adding the total of ****-001 through ****-00* together to get the total owed.

Any help would be great.
Thanks!
 
Have you tried adding a group on the main account and doing a sum in the group footer?

Kchaudhry
 
Tried that, but I just need it to only give the total for those that have the sub accounts. Not even sure if it can be done
 
Ok, then try something like this. Create a formula and place it in your group footer.

@sub
if not isnull({table.sub})
then
sum({table.account},{table.group})
else
0

Kchaudhry
 
Try inserting a group on this formula:

left({table.subaccount},4)

Then insert a sum on your amount field at the group level.

-LB
 
I must still be missing something obvious. I keep getting errors in my formula now. My account numbers are all stored in the CUST table under C_ID_ALPHA so its CUST.C_ID_ALPHA

Then the sub accounts just have the additional -001 numbers on them in the same CUST.C_ID_ALPHA field

I'm not a complete newbie to Crystal but not extremely familiar either.
 
You should group on this formula:

left({CUST.C_ID_ALPHA},4)

What error message are you getting, and where is the cursor when you get it?

-LB
 
I apologize for being so slow, but now I'm not even sure if I am doing the whole inserting a group correctly. Currently all information is in the details sections. I have moved that to a group section but am unsure where to insert that formula at. Thanks for all your help.
 
Create the formula by going to the field explorer->formula->new. Then go to insert->group-> and choose the formula for your group. You can then right click on the detail field you want to summarize at the group level and insert a summary.

-LB
 
It works! It's not the prettiest thing, lol but its the information I needed. Thanks for all your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top