I've got some code that I've been using for quite a bit of time, to generate a report from VoIP Call Detail Records. Recently, I decided that I needed to make some changes to the code and now I have a problem that I just can't figure out. And this is a simple problem.
Here the part of the code that isn't working properly. This code is in a Sub program. All of the variables, including the Type variables are all Global.
I inserted some MSGBOXs to look at the values of the variables to try to see what's happening. I took those MSGBOXs to show the code here.
As an example, when this program runs, Temp11# will show as a value of 49.xxxxxxxxxxxx (I don't remember the exact number). Temp12# will show as a value of 12.94xxxxxxxxxxx.
Temp13# will show as 0.
These values are correct, based on the data that has been put into the program, earlier in the code.
But, Temp14#, which should be the sum of the three above values (around 22.37xxxxxxxxx or thereabouts), shows a value of 0. The three values are not being added together.
FederalUSFRate# shows a value of .318 (which is correct). And Temp15# also shows 0, which of course would be correct since Temp14# is 0.
I have tried several different things, include changing data types (SINGLE to DOUBLE). And I've tried using the Type variables instead of the Temp variables. Nothing works.
Any ideas?
John Rayfield, Jr.
SUB ProgramName
Temp11# = 0
Temp12# = 0
Temp13# = 0
Temp14# = 0
Temp15# = 0
FOR CustomerCounter& = 1 TO MaxCustomer&
Temp11# = (CustomerData(CustomerCounter&).TotalInterstateCost)
Temp12# = (CustomerData(CustomerCounter&).TotalDIDRecurring * CustomerData(CustomerCounter&).ORIGInterRevenuePercent)
Temp13# = (CustomerData(CustomerCounter&).TotalDID800Recurring * CustomerData(CustomerCounter&).Orig800InterRevenuePercent)
Temp14# = Temp11# + Temp12# + Temp13#
Temp15# = Temp14# * FederalUSFRate#
CustomerData(CustomerCounter&).FederalUSF = Temp15#
TotalFederalUSF# = TotalFederalUSF# + CustomerData(CustomerCounter&).FederalUSF
NEXT CustomerCounter&
END SUB
Here the part of the code that isn't working properly. This code is in a Sub program. All of the variables, including the Type variables are all Global.
I inserted some MSGBOXs to look at the values of the variables to try to see what's happening. I took those MSGBOXs to show the code here.
As an example, when this program runs, Temp11# will show as a value of 49.xxxxxxxxxxxx (I don't remember the exact number). Temp12# will show as a value of 12.94xxxxxxxxxxx.
Temp13# will show as 0.
These values are correct, based on the data that has been put into the program, earlier in the code.
But, Temp14#, which should be the sum of the three above values (around 22.37xxxxxxxxx or thereabouts), shows a value of 0. The three values are not being added together.
FederalUSFRate# shows a value of .318 (which is correct). And Temp15# also shows 0, which of course would be correct since Temp14# is 0.
I have tried several different things, include changing data types (SINGLE to DOUBLE). And I've tried using the Type variables instead of the Temp variables. Nothing works.
Any ideas?
John Rayfield, Jr.
SUB ProgramName
Temp11# = 0
Temp12# = 0
Temp13# = 0
Temp14# = 0
Temp15# = 0
FOR CustomerCounter& = 1 TO MaxCustomer&
Temp11# = (CustomerData(CustomerCounter&).TotalInterstateCost)
Temp12# = (CustomerData(CustomerCounter&).TotalDIDRecurring * CustomerData(CustomerCounter&).ORIGInterRevenuePercent)
Temp13# = (CustomerData(CustomerCounter&).TotalDID800Recurring * CustomerData(CustomerCounter&).Orig800InterRevenuePercent)
Temp14# = Temp11# + Temp12# + Temp13#
Temp15# = Temp14# * FederalUSFRate#
CustomerData(CustomerCounter&).FederalUSF = Temp15#
TotalFederalUSF# = TotalFederalUSF# + CustomerData(CustomerCounter&).FederalUSF
NEXT CustomerCounter&
END SUB
Comment