5. August 2018 17:30
6. August 2018 07:43
simon.sprenger hat geschrieben:ich habe bereits mehrere Jahre erfolgreich im Classic Client mit NAV 5 programmiert und entwickelt.
Jetzt soll ich einen Report in NAV 16 erstellen.
Kann mir jemand hilfreiche Tipps und Seiten empfehlen wie man sich dort am besten einarbeiten kann?
6. August 2018 09:31
Public Function GetArrayStr(ByVal What as String, ByVal Field as object) as String
return (What & "|" & iif(isnothing(Field),"",Replace(Field.tostring,"|","<|>"))) & "|"
End Function
Public Function GetRealVal(ByVal Value as String) as String
if (Value <> "") then
return Replace(Value,"<|>","|")
else
return Value
end if
End Function
Public Shared DataActPars As New System.Collections.Hashtable
Public Function SetDataValueArray(byval Data as object) as String
dim StrArray() as string
AfterTotal = false
if isnothing(Data) or (Cstr(Data) ="") then
return" "
end if
DataActPars.clear
if not isnothing(Data) then
StrArray = split(Cstr(Data),"|")
For index as integer = 0 To StrArray.GetUpperBound(0) Step 2
if StrArray(index)<>"" then
DataActPars(Strarray(index)) = GetRealVal(StrArray(index+1))
end if
next index
end if
Return " "
End Function
Public Function GetDataValue(ByVal What as string) as Object
if isnothing(DataActPars(What)) then
return("*XxXxXxXxXxXxX*")
' return(What)
else
return DataActPars(What)
end if
end Function
=Code.SetData(fields!DataText.Value+
GetArrayStr("CompanyInfo__Phone_No__Caption" , Fields!CompanyInfo__Phone_No__Caption.Value) +
GetArrayStr("CompanyInfo__Phone_No__" , Fields!CompanyInfo__Phone_No__.Value) +
GetArrayStr("CompanyInfo__Fax_No__Caption" , Fields!CompanyInfo__Fax_No__Caption.Value) +
GetArrayStr("CompanyInfo__Fax_No__" , Fields!CompanyInfo__Fax_No__.Value) +
GetArrayStr("CompanyInfo__VAT_Registration_No__Caption" , Fields!CompanyInfo__VAT_Registration_No__Caption.Value) +
GetArrayStr("CompanyInfo__VAT_Registration_No__" , Fields!CompanyInfo__VAT_Registration_No__.Value) +
GetArrayStr("CompanyInfo__Giro_No__Caption" , Fields!CompanyInfo__Giro_No__Caption.Value) +
GetArrayStr("CompanyInfo__Giro_No__" , Fields!CompanyInfo__Giro_No__.Value) +
GetArrayStr("CompanyInfo__Bank_Name_Caption" , Fields!CompanyInfo__Bank_Name_Caption.Value) +
GetArrayStr("CompanyInfo__Bank_Name_" , Fields!CompanyInfo__Bank_Name_.Value) +
GetArrayStr("CompanyInfo__Bank_Account_No__Caption" , Fields!CompanyInfo__Bank_Account_No__Caption.Value) +
GetArrayStr("CompanyInfo__Bank_Account_No__" , Fields!CompanyInfo__Bank_Account_No__.Value) +
GetArrayStr("Sales_Header___Bill_to_Customer_No__Caption" , Fields!Sales_Header___Bill_to_Customer_No__Caption.Value) +
GetArrayStr("Sales_Header___Bill_to_Customer_No__" , Fields!Sales_Header___Bill_to_Customer_No__.Value) +
GetArrayStr("VATNoText" , Fields!VATNoText.Value) +
GetArrayStr("Sales_Header___VAT_Registration_No__" , Fields!Sales_Header___VAT_Registration_No__.Value) +
GetArrayStr("ReferenceText" , Fields!ReferenceText.Value) +
GetArrayStr("Sales_Header___Your_Reference_" , Fields!Sales_Header___Your_Reference_.Value) +
GetArrayStr("Sales_Header___Shipment_Date_Caption" , Fields!Sales_Header___Shipment_Date_.Value)+
GetArrayStr("Sales_Header___No__Caption" , Fields!Sales_Header___No__Caption.Value) +
GetArrayStr("Sales_Header___No__" , Fields!Sales_Header___No__.Value) +
GetArrayStr("Sales_Header___Prices_Including_VAT_Caption" , CStr(Fields!PricesInclVAT_YesNo.Value) +
GetArrayStr("SalesPersonText" , Fields!SalesPersonText.Value) +
GetArrayStr("SalesPurchPerson_Name" , Fields!SalesPurchPerson_Name.Value) +
GetArrayStr("FORMAT__Sales_Header___Document_Date__0_4_" , Fields!FORMAT__Sales_Header___Document_Date__0_4_.Value))
=GetData("Sales_Header___No__")
7. August 2018 08:19