This article applies to Microsoft Dynamics NAV for the Italian (it) language locale.
Symptoms
Assume that you install hotfix 2274594 in the Italian version of Microsoft Dynamics NAV 2009 R2 and of Microsoft Dynamics NAV 2009 Service Pack 1 (SP1). When you run the Depreciation Book report (12119), the report does not print the end totals that are related to previous-year figures.
For more information about hotfix 2274594, click the following article number to view the article in the Microsoft Knowledge Base:
2274594 The book value is incorrect when you print the Depreciation Book report (12119) in the Italian version of Microsoft Dynamics NAV 2009
Resolution
Hotfix information
A supported hotfix is now available from Microsoft. However, it is only intended to correct the problem that is described in this article. Apply it only to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Microsoft Dynamics NAV 2009 service pack or the next Microsoft Dynamics NAV version that contains this hotfix.
Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Technical Support Professional for Microsoft Dynamics and related products determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.
Installation information
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
Note Before you install this hotfix, verify that all Microsoft Navision client users are logged off the system. This includes Microsoft Navision Application Services (NAS) client users. You should be the only client user who is logged on when you implement this hotfix.
To implement this hotfix, you must have a developer license.
We recommend that the user account in the Windows Logins window or in the Database Logins window be assigned the "SUPER" role ID. If the user account cannot be assigned the "SUPER" role ID, you must verify that the user account has the following permissions:
-
The Modify permission for the object that you will be changing.
-
The Execute permission for the System Object ID 5210 object and for the System Object ID 9015 object.
Note You do not have to have rights to the data stores unless you have to perform data repair.
Code changes
Note Always test code fixes in a controlled environment before you apply the fixes to your production computers.
To resolve this problem, follow these steps:
-
Change the code in Data Item Number 1 in the Depreciation Book report (12119) as follows:
Existing code 1...
FASource := Text008;
IF NOT FADeprBook.GET("No.",DeprBookCode) THEN
CurrReport.SKIP;
// Delete the following lines.
IF SkipRecord THEN
CurrReport.SKIP;
// End of the lines.
IF "FA Posting Group" <> FADeprBook."FA Posting Group" THEN
ERROR(Text007,FIELDCAPTION("FA Posting Group"),"No.");
...Replacement code 1
...
FASource := Text008;
IF NOT FADeprBook.GET("No.",DeprBookCode) THEN
CurrReport.SKIP;
// Add the following lines.
FixedAsset.COPY("Fixed Asset");
IF SkipRecord THEN BEGIN
IF FixedAsset.NEXT = 0 THEN
CreateTotals;
CurrReport.SKIP;
END;
// End of the lines.
IF "FA Posting Group" <> FADeprBook."FA Posting Group" THEN
ERROR(Text007,FIELDCAPTION("FA Posting Group"),"No.");
...Existing code 2
...
FillTempFALedgEntry;
UpdateTotals;
CreateGroupTotals;
// Delete the following lines.
CreateTotals;
TotalStartingAccumulated := TotalStartAmounts[2] + TotalStartAmounts[5] + TotalStartAmounts[6];
TotalAntAccDepreciation := TotalNetChangeAmounts[5] + TotalNetChangeAmounts[6];
IF TotalEndingAmounts[1]+TotalEndingAmounts[3]+TotalEndingAmounts[4] = 0 THEN BEGIN
TotalBasicDepreciationPerc := 0;
TotalAntAccDepreciationPerc := 0
END ELSE BEGIN
TotalBasicDepreciationPerc := ABS(ROUND((((TotalNetChangeAmounts[2] + ReclassDeprAmount) / // IT0001
(TotalEndingAmounts[1] +
TotalEndingAmounts[3] +
TotalEndingAmounts[4])) * 100),0.01));
TotalAntAccDepreciationPerc := ABS(ROUND(((TotalAntAccDepreciation /
TotalEndingAmounts[1] +
TotalEndingAmounts[3] +
TotalEndingAmounts[4]) * 100),0.01));
END;
// End of the lines.
END;
ReqFilterFields=No.,FA Class Code,FA Subclass Code,Budgeted Asset;
...Replacement code 2
...
FillTempFALedgEntry;
UpdateTotals;
CreateGroupTotals;
// Add the following lines.
IF FixedAsset.NEXT = 0 THEN
CreateTotals;
// End of the lines.
END;
ReqFilterFields=No.,FA Class Code,FA Subclass Code,Budgeted Asset;
... -
Change the code in Data Item Number 1 Sections in the Depreciation Book report (12119) as follows:
Existing code 1...
CONTROLS
{
{ 169 ;TextBox ;24450;0 ;1650 ;423 ;FontBold=Yes;
// Delete the following line.
SourceExpr=BookValueAtEndingDate;
// End of the line.
AutoFormatType=1;
DataSetFieldName=BookValueAtEndingDate_Control169 }
{ 1130064;Label ;0 ;0 ;2250 ;423 ;HorzAlign=Left;
...Replacement code 1
...
CONTROLS
{
{ 169 ;TextBox ;24450;0 ;1650 ;423 ;FontBold=Yes;
// Add the following line.
SourceExpr=EndTotalBookValueAtEndingDate;
// End of the line.
AutoFormatType=1;
DataSetFieldName=BookValueAtEndingDate_Control169 }
{ 1130064;Label ;0 ;0 ;2250 ;423 ;HorzAlign=Left;
...Existing code 2
...
TotalNetChangeAmounts_3__TotalNetChangeAmounts_4_ }
{ 1130077;TextBox ;5850 ;0 ;1800 ;423 ;SourceExpr=TotalDisposalAmounts[1]+TotalDisposalAmounts[3]+TotalDisposalAmounts[4];
DataSetFieldName=TotalDisposalAmounts_1__TotalDisposalAmounts_3__TotalDisposalAmounts_4_ }
// Delete the following line.
{ 1130078;TextBox ;7650 ;0 ;1800 ;423 ;SourceExpr=TotalEndingAmounts[1]+TotalEndingAmounts[3]+TotalEndingAmounts[4];
// End of the line.
DataSetFieldName=TotalEndingAmounts_1__TotalEndingAmounts_3__TotalEndingAmounts_4__Control1130078 }
{ 1130079;TextBox ;9450 ;0 ;1500 ;423 ;SourceExpr=TotalStartingAccumulated;
DataSetFieldName=TotalStartingAccumulated }
...Replacement code 2
...
DataSetFieldName=TotalNetChangeAmounts_1__TotalNetChangeAmounts_3__TotalNetChangeAmounts_4_ }
{ 1130077;TextBox ;5850 ;0 ;1800 ;423 ;SourceExpr=TotalDisposalAmounts[1]+TotalDisposalAmounts[3]+TotalDisposalAmounts[4];
DataSetFieldName=TotalDisposalAmounts_1__TotalDisposalAmounts_3__TotalDisposalAmounts_4_ }
// Add the following line.
{ 1130078;TextBox ;7650 ;0 ;1800 ;423 ;SourceExpr=EndTotalEndingAmounts[1]+EndTotalEndingAmounts[3]+EndTotalEndingAmounts[4];
// End of the line.
DataSetFieldName=TotalEndingAmounts_1__TotalEndingAmounts_3__TotalEndingAmounts_4__Control1130078 }
{ 1130079;TextBox ;9450 ;0 ;1500 ;423 ;SourceExpr=TotalStartingAccumulated;
DataSetFieldName=TotalStartingAccumulated }
...Existing code 3
...
DataSetFieldName=TotalStartingAccumulated }
{ 1130081;TextBox ;13950;0 ;1500 ;423 ;SourceExpr=ABS(TotalNetChangeAmounts[2]);
DataSetFieldName=ABS_TotalNetChangeAmounts_2__ }
// Delete the following line.
{ 1130083;TextBox ;22950;0 ;1500 ;423 ;SourceExpr=ABS(TotalEndingAmounts[2]+TotalEndingAmounts[5]+TotalEndingAmounts[6]);
// End of the line.
DataSetFieldName=ABS_TotalEndingAmounts_2__TotalEndingAmounts_5__TotalEndingAmounts_6___Control1130083 }
{ 1130090;TextBox ;21450;0 ;1500 ;423 ;SourceExpr=ABS(TotalNetChangeAmounts[2]+TotalAntAccDepreciation);
DataSetFieldName=ABS_TotalNetChangeAmounts_2__TotalAntAccDepreciation_ }
...Replacement code 3
...
DataSetFieldName=TotalStartingAccumulated }
{ 1130081;TextBox ;13950;0 ;1500 ;423 ;SourceExpr=ABS(TotalNetChangeAmounts[2]);
DataSetFieldName=ABS_TotalNetChangeAmounts_2__ }
// Add the following line.
{ 1130083;TextBox ;22950;0 ;1500 ;423 ;SourceExpr=ABS(EndTotalEndingAmounts[2]+EndTotalEndingAmounts[5]+EndTotalEndingAmounts[6]);
// End of the line.
DataSetFieldName=ABS_TotalEndingAmounts_2__TotalEndingAmounts_5__TotalEndingAmounts_6___Control1130083 }
{ 1130090;TextBox ;21450;0 ;1500 ;423 ;SourceExpr=ABS(TotalNetChangeAmounts[2]+TotalAntAccDepreciation);
DataSetFieldName=ABS_TotalNetChangeAmounts_2__TotalAntAccDepreciation_ }
... -
Add the following global variables in the Depreciation Book report (12119):
-
FixedAsset@1130040 : Record 5600
-
EndTotalEndingAmounts@1130041 : ARRAY [7] OF Decimal
-
EndTotalBookValueAtEndingDate@1130042 : Decimal
-
-
Change the code in the UpdateTotals function in the Depreciation Book report (12119) as follows:
Existing code 1...
GroupStartAmounts[J] := 0;
GroupNetChangeAmounts[J] := 0;
GroupDisposalAmounts[J] := 0;
// Delete the following lines.
TotalStartAmounts[J] := 0;
TotalNetChangeAmounts[J] := 0;
TotalDisposalAmounts[J] := 0;
TotalReclassDeprAmount := ReclassDeprAmount;
// End of the lines.
END;
// IT0001.end
FOR J := 1 TO NumberOfTypes DO BEGIN
...Replacement code 1
...
GroupStartAmounts[J] := 0;
GroupNetChangeAmounts[J] := 0;
GroupDisposalAmounts[J] := 0;
END;
// IT0001.end
FOR J := 1 TO NumberOfTypes DO BEGIN
...Existing code 2
...
TotalStartAmounts[J] := TotalStartAmounts[J] + StartAmounts[J];
TotalNetChangeAmounts[J] := TotalNetChangeAmounts[J] + NetChangeAmounts[J];
TotalDisposalAmounts[J] := TotalDisposalAmounts[J] + DisposalAmounts[J];
END;
END;
...Replacement code 2
...
TotalStartAmounts[J] := TotalStartAmounts[J] + StartAmounts[J];
TotalNetChangeAmounts[J] := TotalNetChangeAmounts[J] + NetChangeAmounts[J];
TotalDisposalAmounts[J] := TotalDisposalAmounts[J] + DisposalAmounts[J];
// Add the following lines.
IF J = 2 THEN
TotalReclassDeprAmount := TotalReclassDeprAmount + ReclassDeprAmount;
// End of the lines.
END;
END;
... -
Change the code in the CreateGroupTotals function in the Depreciation Book report (12119) as follows:
Existing code 1...
LOCAL PROCEDURE CreateGroupTotals@1130114();
BEGIN
BookValueAtEndingDate := 0;
BookValueAtStartingDate := 0;
FOR J := 1 TO NumberOfTypes DO BEGIN
...Replacement code 1
...
LOCAL PROCEDURE CreateGroupTotals@1130114();
BEGIN
BookValueAtEndingDate := 0;
BookValueAtStartingDate := 0;
FOR J := 1 TO NumberOfTypes DO BEGIN
...Existing code 2
...
BookValueAtStartingDate := 0;
FOR J := 1 TO NumberOfTypes DO BEGIN
TotalEndingAmounts[J] := GroupStartAmounts[J] + GroupNetChangeAmounts[J] + GroupDisposalAmounts[J];
BookValueAtEndingDate := BookValueAtEndingDate + TotalEndingAmounts[J];
BookValueAtStartingDate := BookValueAtStartingDate + GroupStartAmounts[J];
...Replacement code 2
...
BookValueAtStartingDate := 0;
FOR J := 1 TO NumberOfTypes DO BEGIN
TotalEndingAmounts[J] := GroupStartAmounts[J] + GroupNetChangeAmounts[J] + GroupDisposalAmounts[J];
// Add the following lines.
IF J = 2 THEN
TotalEndingAmounts[J] += ReclassDeprAmount;
// End of the lines.
BookValueAtEndingDate := BookValueAtEndingDate + TotalEndingAmounts[J];
BookValueAtStartingDate := BookValueAtStartingDate + GroupStartAmounts[J];
...Existing code 3
...
BookValueAtEndingDate := BookValueAtEndingDate + TotalEndingAmounts[J];
BookValueAtStartingDate := BookValueAtStartingDate + GroupStartAmounts[J];
// Delete the following lines.
IF J = 2 THEN
TotalEndingAmounts[J] += ReclassDeprAmount;
// End of the lines.
END;
END;
...Replacement code 3
...
BookValueAtEndingDate := BookValueAtEndingDate + TotalEndingAmounts[J];
BookValueAtStartingDate := BookValueAtStartingDate + GroupStartAmounts[J];
END;
END;
... -
Change the code in the CreateTotals function in the Depreciation Book report (12119) as follows:
Existing code 1...
LOCAL PROCEDURE CreateTotals@1130117();
BEGIN
// Delete the following lines.
BookValueAtEndingDate := 0;
BookValueAtStartingDate := 0;
FOR J := 1 TO NumberOfTypes DO BEGIN
TotalEndingAmounts[J] := TotalStartAmounts[J] + TotalNetChangeAmounts[J] + TotalDisposalAmounts[J];
// End of the lines.
// IT0001.begin
IF J = 2 THEN
...Replacement code 1
...
LOCAL PROCEDURE CreateTotals@1130117();
BEGIN
// Add the following lines.
FOR J := 1 TO NumberOfTypes DO BEGIN
EndTotalEndingAmounts[J] := TotalStartAmounts[J] + TotalNetChangeAmounts[J] + TotalDisposalAmounts[J];
// End of the lines.
// IT0001.begin
IF J = 2 THEN
...Existing code 2
...
// IT0001.begin
IF J = 2 THEN
// Delete the following lines.
TotalEndingAmounts[J] += ReclassDeprAmount;
// IT0001.end
BookValueAtEndingDate := BookValueAtEndingDate + TotalEndingAmounts[J];
BookValueAtStartingDate := BookValueAtStartingDate + TotalStartAmounts[J];
// End of the lines.
END;
END;
...Replacement code 2
...
// IT0001.begin
IF J = 2 THEN
// Add the following lines.
EndTotalEndingAmounts[J] := EndTotalEndingAmounts[J] + TotalReclassDeprAmount;
// IT0001.end
EndTotalBookValueAtEndingDate := EndTotalBookValueAtEndingDate + EndTotalEndingAmounts[J];
END;
TotalStartingAccumulated := TotalStartAmounts[2] + TotalStartAmounts[5] + TotalStartAmounts[6];
TotalAntAccDepreciation := TotalNetChangeAmounts[5] + TotalNetChangeAmounts[6];
IF EndTotalEndingAmounts[1]+EndTotalEndingAmounts[3]+EndTotalEndingAmounts[4] = 0 THEN BEGIN
TotalBasicDepreciationPerc := 0;
TotalAntAccDepreciationPerc := 0
END ELSE BEGIN
TotalBasicDepreciationPerc := ABS(ROUND((((TotalNetChangeAmounts[2] + TotalReclassDeprAmount) / // IT0001
(EndTotalEndingAmounts[1] +
EndTotalEndingAmounts[3] +
EndTotalEndingAmounts[4])) * 100),0.01));
TotalAntAccDepreciationPerc := ABS(ROUND(((TotalAntAccDepreciation /
EndTotalEndingAmounts[1] +
EndTotalEndingAmounts[3] +
EndTotalEndingAmounts[4]) * 100),0.01));
// End of the lines.
END;
END;
... -
Change the code in the Depreciation Book report (12119) as follows:
Existing code 1...
<PaddingTop>2pt</PaddingTop>
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Delete the following line.
<Value>=LAST(Fields!TotalEndingAmounts_1__TotalEndingAmounts_3__TotalEndingAmounts_4_.Value)</Value>
// End of the line.
<ZIndex>11</ZIndex>
</Textbox>
</ReportItems>
...Replacement code 1
...
<PaddingTop>2pt</PaddingTop>
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Add the following line.
<Value>=LAST(Fields!TotalEndingAmounts_1__TotalEndingAmounts_3__TotalEndingAmounts_4__Control1130078.Value)</Value>
// End of the line.
<ZIndex>11</ZIndex>
</Textbox>
</ReportItems>
...Existing code 2
...
<PaddingTop>2pt</PaddingTop>
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Delete the following line.
<Value>=LAST(Fields!ABS_TotalEndingAmounts_2__TotalEndingAmounts_5__TotalEndingAmounts_6__.Value)</Value>
// End of the line.
<ZIndex>2</ZIndex>
</Textbox>
</ReportItems>
...Replacement code 2
...
<PaddingTop>2pt</PaddingTop>
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Add the following line.
<Value>=LAST(Fields!ABS_TotalEndingAmounts_2__TotalEndingAmounts_5__TotalEndingAmounts_6___Control1130083.Value)</Value>
// End of the line.
<ZIndex>2</ZIndex>
</Textbox>
</ReportItems>
...Existing code 3
...
<PaddingTop>2pt</PaddingTop>
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Delete the following line.
<Value>=LAST(Fields!BookValueAtEndingDate.Value)</Value>
// End of the line.
<ZIndex>1</ZIndex>
</Textbox>
</ReportItems>
...Replacement code 3
...
<PaddingTop>2pt</PaddingTop>
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Add the following line.
<Value>=LAST(Fields!BookValueAtEndingDate_Control169.Value)</Value>
// End of the line.
<ZIndex>1</ZIndex>
</Textbox>
</ReportItems>
...Existing code 4
...
<Field Name="ABS_ReclassDeprAmount__Control1130212Format">
<DataField>ABS_ReclassDeprAmount__Control1130212Format</DataField>
</Field>
<Field Name="BookValueAtEndingDate_Control169Format">
<DataField>BookValueAtEndingDate_Control169Format</DataField>
</Field>
...Replacement code 4
...
<Field Name="ABS_ReclassDeprAmount__Control1130212Format">
<DataField>ABS_ReclassDeprAmount__Control1130212Format</DataField>
</Field>
// Add the following lines.
<Field Name="BookValueAtEndingDate_Control169">
<DataField>BookValueAtEndingDate_Control169</DataField>
</Field>
// End of the lines.
<Field Name="BookValueAtEndingDate_Control169Format">
<DataField>BookValueAtEndingDate_Control169Format</DataField>
</Field>
...Existing code 5
...
<Field Name="TotalDisposalAmounts_1__TotalDisposalAmounts_3__TotalDisposalAmounts_4_Format">
<DataField>TotalDisposalAmounts_1__TotalDisposalAmounts_3__TotalDisposalAmounts_4_Format</DataField>
</Field>
<Field Name="TotalEndingAmounts_1__TotalEndingAmounts_3__TotalEndingAmounts_4__Control1130078Format">
<DataField>TotalEndingAmounts_1__TotalEndingAmounts_3__TotalEndingAmounts_4__Control1130078Format</DataField>
</Field>
...Replacement code 5
...
<Field Name="TotalDisposalAmounts_1__TotalDisposalAmounts_3__TotalDisposalAmounts_4_Format">
<DataField>TotalDisposalAmounts_1__TotalDisposalAmounts_3__TotalDisposalAmounts_4_Format</DataField>
</Field>
// Add the following lines.
<Field Name="TotalEndingAmounts_1__TotalEndingAmounts_3__TotalEndingAmounts_4__Control1130078">
<DataField>TotalEndingAmounts_1__TotalEndingAmounts_3__TotalEndingAmounts_4__Control1130078</DataField>
</Field>
// End of the lines.
<Field Name="TotalEndingAmounts_1__TotalEndingAmounts_3__TotalEndingAmounts_4__Control1130078Format">
<DataField>TotalEndingAmounts_1__TotalEndingAmounts_3__TotalEndingAmounts_4__Control1130078Format</DataField>
</Field>
...Existing code 6
...
<Field Name="ABS_TotalNetChangeAmounts_2__Format">
<DataField>ABS_TotalNetChangeAmounts_2__Format</DataField>
</Field>
<Field Name="ABS_TotalEndingAmounts_2__TotalEndingAmounts_5__TotalEndingAmounts_6___Control1130083Format">
<DataField>ABS_TotalEndingAmounts_2__TotalEndingAmounts_5__TotalEndingAmounts_6___Control1130083Format</DataField>
</Field>
...Replacement code 6
...
<Field Name="ABS_TotalNetChangeAmounts_2__Format">
<DataField>ABS_TotalNetChangeAmounts_2__Format</DataField>
</Field>
// Add the following lines.
<Field Name="ABS_TotalEndingAmounts_2__TotalEndingAmounts_5__TotalEndingAmounts_6___Control1130083">
<DataField>ABS_TotalEndingAmounts_2__TotalEndingAmounts_5__TotalEndingAmounts_6___Control1130083</DataField>
</Field>
// End of the lines.
<Field Name="ABS_TotalEndingAmounts_2__TotalEndingAmounts_5__TotalEndingAmounts_6___Control1130083Format">
<DataField>ABS_TotalEndingAmounts_2__TotalEndingAmounts_5__TotalEndingAmounts_6___Control1130083Format</DataField>
</Field>
...
Prerequisites
You must have one of the following products installed to apply this hotfix:
-
The Italian version of Microsoft Dynamics NAV 2009 R2
-
The Italian version of Microsoft Dynamics NAV 2009 Service Pack 1
Removal information
You cannot remove this hotfix.
Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.