Thanks for your help on this - I've been away on holiday and am back in trying to sort this problem again! I think I must be missing something though!
I've added in the additional shared variable - so that the jet fuel formula now looks like this:
shared numbervar totalJetFuel;
shared numbervar GroupJetFuel;
local numbervar thisJet;
if {CPARTY.CODE} = "CHAS GP" then thisJet := -34.1 else
if {CPARTY.CODE} = "MSLN" then thisJet := -28.1 else
if {CPARTY.CODE} = "GSIL GP" then thisJet := -46.1 else
if {CPARTY.CODE} = "BARC GP" then thisJet := -4.6 else
if {CPARTY.CODE} = "CALY GP" then thisJet := -1.6 else
if {CPARTY.CODE} = "SCBL" then thisJet := -1.5 else
if {CPARTY.CODE} = "BNPA GP" then thisJet := -0.9;
totalJetFuel := totalJetFuel + thisJet;
GroupJetFuel:= totaljetfuel + thisJet;
I have added a formula to the group footer that has the following in it:
shared numbervar GroupJetFuel;
I have changed the totaljetfuel reset formula in the group header to reference GroupJetFuel as follows:
shared numbervar GroupJetFuel := 0;
""
(NB there is now no reset for totalJetFuel)
The number that is returned in the group footer for the sharednumbervar GroupJetFuel isn't correct.
Against {CPARTY.CODE} = "BARC GP" then thisJet := -4.6 - this is the first counterparty alphabetically that has jet fuel - so I would expect the sharednumbervar GroupJetFuel to = -4.6 - it equals -1,504.2 and I can't figure out where this has come from!
Also if if I want to actually show the jetfuel total for each counterparty in the group footer I thought all I would need to do is add a formula with the following:
local numbervar thisJet;
However when I do this I just get a 0.00 value returned against all counterparties. I thought I might need to make the variable a shared one in the jetfuel formula to pick it up - but this didn't work either - do I need to explicitly state that I want the thisjet bit of the jetfuel formula? and if so how do I do this?!
thanks for continued help on this!