Joined: 03 Nov 2010
Location: South Africa
Online Status: Offline
Posts: 1
Topic: Formula to display data from database field Posted: 03 Nov 2010 at 5:36am
I am using VB6 and Chrystal reports 8. My program is used for the control and despatch of Dangerous Goods for transportation by air as per the UN and IATA regulations.
I use a formula to display information based on a Access database field:
This formula prints a message on the Airfreight Declaration Form if more then one dangerous goods item are packed together in one carton.
if {ControlHeada.Package} <> "OuterPack" then "" else if {ControlHeada.Package} = "OuterPack" then "Q = " & Sum({ControlDetailsA.QValue})
The sum for the total consignment is Q=1.02 and print it underneath all the items packed together in the same case. This works fine if only one mixed case is dispatched.
My problem is that if more than one case is dispatched it prints the same message and Q value underneath each case but the Q value is different for other cases.
Example case 1 have 2 items with a Q value of 1.02 AND case 2 have a Q value of .06 but the formula as it stands print Q=1.02 for each carton
I need help in changing the formula to reflect the correct value under each case and not the sum of the two together
in other words print for case 1 Q=1.02 and for case 2 Q=.06.
So it should realy get the value by case number
{ControlHeada.Package} = "OuterPack" then
"Q = " & Sum({ControlDetailsA.QValue}) by case number
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