Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: how to add values from group header to group foote Post Reply Post New Topic
Author Message
xtalnoobie
Newbie
Newbie


Joined: 10 Nov 2009
Location: Netherlands Antilles
Online Status: Offline
Posts: 5
Quote xtalnoobie Replybullet Topic: how to add values from group header to group foote
     Posted: 10 Nov 2009 at 11:53pm

i always encounter this problem in crystal reports. my problem is that i have different values from group header and group footer and i need to sum them up.

how can i sum them up? is it possible?
or how to avoid this type of error?
 
here is the scenario:
same posting date, same batch but different entries
 
example posting is 1/1/2001
batch is 0001
1st entry i have a value of 1000
2nd entry is 2000
 
when i place the totalamount in group header it only show the value of 1000, in group footer it shows 2000.
 
Please help me guys, thanks!
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 11 Nov 2009 at 6:17am
is totalamount a record field?  If so, CR is doing it the way it was designed, it is reading the value from the first record in the group header (first record it sees) and the last in the footer.  If you want the sum of the values use the Aggregate function SUM.  The easy way is to have CR create it using the sigma (the funny E) in the tool bar and then to copy it to the header.  This will sum up all the values in the group and display them.
 
If totalamount is from a formula, you will need to only display it in the footer or create a subreport to be able to display it in the header.
 
HTH
IP IP Logged
xtalnoobie
Newbie
Newbie


Joined: 10 Nov 2009
Location: Netherlands Antilles
Online Status: Offline
Posts: 5
Quote xtalnoobie Replybullet Posted: 11 Nov 2009 at 5:44pm
thanks for the reply i appreciate it. i've already tried it but it didnt work.

this what happens, when i run the report in the group header

it duplicates the record for example

GH5    company name      1/12/2000     1000
GH5    company name      1/12/2000     1000

why does this happen? it doubles the record while it only had one.

by the way i am using CRXI and an accounting software. i get the record from the accounting software to generate it to crystal.

i really need an answer to this, thanks
IP IP Logged
xtalnoobie
Newbie
Newbie


Joined: 10 Nov 2009
Location: Netherlands Antilles
Online Status: Offline
Posts: 5
Quote xtalnoobie Replybullet Posted: 11 Nov 2009 at 6:03pm
i also want to add, that i am making a report to show the tax rate, base tax and witholding tax of each company. that's why i group them and place them as a parameter . i am using accpac(an accounting software)

so i have 2 parameters, vendor name and date.

so my group header 5 is

gh5 (apibd.cntline) contains the field: @date,TXAUDD.TBASEAMT,@rate, TXAUDD.HCURNTAX

then i used running total to get the total of TBASEAMT AND HCURNTAX. but instead of getting the total i only get the first record.

and also what do i need to place to the section expert.
what do i need to add.

thanks



IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 12 Nov 2009 at 6:06am
I don't know running totals, that is DBlank's forte.  If you are resetting the running total, it won't show correctly in the header, it would need to be in a footer (I believe, DBlank would know better). 
 
Why is it doubling, odd, I don't know.  I would suspect that CR is seeing a different group, so really 2 groups, but it is only a guess.
IP IP Logged
xtalnoobie
Newbie
Newbie


Joined: 10 Nov 2009
Location: Netherlands Antilles
Online Status: Offline
Posts: 5
Quote xtalnoobie Replybullet Posted: 12 Nov 2009 at 5:31pm
hi, actually i somehow figure it out. i have checked and tested all the possible solutions and i ended up checking the links.

it works.. thanks for your time and effort. it simple shows that crystalreportsbook.com/forums is a place to go by I.T. Professionals who seeks help and also who share their knowledge to people.

thanks and best regards!
IP IP Logged
xtalnoobie
Newbie
Newbie


Joined: 10 Nov 2009
Location: Netherlands Antilles
Online Status: Offline
Posts: 5
Quote xtalnoobie Replybullet Posted: 12 Nov 2009 at 9:14pm
oh i almost forgot, what is the table and the field required to be able to show the tax rate in crytal report. i am using accpac as my accounting software.

because everytime i place the formula for tax rates then when i run the report, the other fields such as company name date, base amount disappear
thanks.


Edited by xtalnoobie - 12 Nov 2009 at 10:58pm
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum