PdcCalculation.CalculationNo
Jump to navigation
Jump to search
Declaration
CalculationNo as String
Description
Returns the calculationnumber
Notes
This property returns the calculation number of the calculation currently in the calculation object. Especially useful for reporting the progress and results of the script.
Code example
This code example reports the calculation number, the cost estimation and the total billed value for a set of calculations.
dim objCalc
dim tblORDER
dim strlstFile
dim strlstText
dim i
set tblORDER = pdc.Database.OpenTable(pdcConData, "DO_CALC", "DO_ORDNR")
set strlstFile = TStringList.Create
set strlstText = TStringList.Create
if IsValid(tblORDER) then
tblORDER.FirstRecord
for i = 0 to 10
set objCalc = pdc.OpenCalculation(tblORDER.GetField("DO_ORDNR"))
if IsValid(objCalc) then
strlstText.Clear
strlstText.Text = "Calculatie " & objCalc.CalculationNo & " | VoorCalc = " & objCalc.CostEstimation & " | Gefactureerd = " & objCalc.Billed
strlstFile.Add strlstText.Text
end if 'IsValid(objCalc)
tblORDER.NextRecord
next 'i
end if 'IsValid(tblORDER)
msgbox strlstFile.Text