运行报表 11207 以在瑞典版本的 Microsoft Dynamics NAV 中使用文件类型 2 创建 SIE 文件时,SIE 文件中的日期不正确

应用对象
Dynamics NAV 2009 Service Pack 1 Microsoft Dynamics NAV 5.0 Service Pack 1

快速发布的文章直接从Microsoft支持组织内部提供信息。 此处包含的信息是针对新出现或唯一主题创建的,或旨在补充其他知识库信息。

本文适用于) 语言区域设置 (Microsoft Dynamics NAV。

症状

运行 SIE 导出报告 (11207) 使用瑞典版 Microsoft Dynamics NAV 中的定期平衡文件类型 (文件类型 2) 创建 SIE 文件时,SIE 文件中的数据不正确。 缺少不同的周期性总和。

以下产品中会出现此问题:

  • Microsoft Dynamics NAV 2009 Service Pack 1 的瑞典版本
  • Microsoft Dynamics NAV 5.0 Service Pack 1 的瑞典版本

解决方法

修补程序信息

Microsoft现在提供了受支持的修补程序。 但是,它仅用于更正本文中所述的问题。 仅将其应用于遇到此特定问题的系统。 此修补程序可能会收到其他测试。 因此,如果你没有受到此问题的严重影响,我们建议你等待下一个Microsoft Dynamics NAV Service Pack 或包含此修补程序的下一Microsoft Dynamics NAV 版本。

注意 在特殊情况下,如果 Microsoft Dynamics 和相关产品的技术支持专业人员确定特定更新将解决你的问题,则通常由支持呼叫产生的费用可能会被取消。 对于相关特定升级无法解决的其他支持问题和事项,将照常收取支持费用。

            
          

安装信息

Microsoft 的编程示例仅用于说明,不做任何明示或暗示的保证。 这包括但不限于特定用途的适销性或适用性的隐含保证。 本文假定你熟悉所演示的编程语言以及用于创建和调试过程的工具。 Microsoft 支持工程师可以帮助解释特定过程的功能,但他们不会修改这些示例以提供新增功能或构建步骤以满足你的特定需要。

注意 在安装此修补程序之前,请验证所有 Microsoft Navision 客户端用户是否已从系统注销。 这包括 Microsoft Navision Application Services (NAS) 客户端用户。 实现此修补程序时,应是唯一登录的客户端用户。

若要实现此修补程序,必须具有开发人员许可证。

建议为 Windows 登录窗口或数据库登录名窗口中的用户帐户分配“SUPER”角色 ID。 如果无法为用户帐户分配“SUPER”角色 ID,则必须验证该用户帐户是否具有以下权限:

  • 要更改的 对象的“修改”权限。
  • 系统对象 ID 5210 对象和系统对象 ID 9015 对象的 Execute 权限。

                
注意 除非必须执行数据修复,否则您不必拥有数据存储的权限。

代码更改

注意 在将修补程序应用到生产计算机之前,始终在受控环境中测试代码修复。
若要解决此问题,请更改 SIE 导出报表中的 PeriodicPost 函数中的代码 (11207) 。 请按以下步骤完成此操作:

  1. 添加局部变量,然后指定变量,如下所示:

    • 名称:CurrMonthStartDate
    • DataTypeDate
  2. 添加局部变量,然后指定变量,如下所示:

    • 名称:CurrMonthEndDate
    • DataTypeDate
  3. 添加局部变量,然后指定变量,如下所示:

    • 名称:FilterEndDate
    • DataTypeDate
  4. 更改代码,如下所示:
    现有代码 1

    ...
              GLAccount.SETFILTER("Global Dimension 1 Filter",'');
              GLAccount.SETFILTER("Global Dimension 2 Filter",'');
              GLAccount.SETFILTER("Date Filter",AccountDateFilter);
    
              // Delete the following lines.
              GLAccount.CALCFIELDS("Net Change");
              IF GLAccount."Net Change" <> 0 THEN
                ExportFile.WRITE(STRSUBSTNO('#PSALDO   %1  %2  %3  {} %4',0,FORMAT(FormatDate(GLAccount.GETRANGEMAX
                (GLAccount."Date Filter")),6),GLAccount."No.",FormatAmount(GLAccount."Net Change")));
    
              SetGLFilterPrev(GLAccount2);
              GLAccount2.CALCFIELDS("Net Change");
              IF GLAccount2."Net Change" <> 0 THEN
                ExportFile.WRITE(STRSUBSTNO('#PSALDO  %1  %2  %3  {} %4',-1,FORMAT(FormatDate(GLAccount2.GETRANGEMAX
                (GLAccount2."Date Filter")),6),GLAccount2."No.",FormatAmount(GLAccount2."Net Change")));
              // End of the lines.
    
              IF AccountBudgetFilter <> '' THEN BEGIN
                GLAccount.RESET;
                GLAccount.SETFILTER("Global Dimension 1 Filter",'');
    ...
    
    

    替换代码 1

    ...
              GLAccount.SETFILTER("Global Dimension 1 Filter",'');
              GLAccount.SETFILTER("Global Dimension 2 Filter",'');
              GLAccount.SETFILTER("Date Filter",AccountDateFilter);
    
              // Add the following lines.
              CurrMonthStartDate := GLAccount.GETRANGEMIN(GLAccount."Date Filter");
              FilterEndDate := GLAccount.GETRANGEMAX(GLAccount."Date Filter");
              REPEAT
                CurrMonthEndDate := CALCDATE('<CM>',CurrMonthStartDate);
                IF FilterEndDate < CurrMonthEndDate THEN
                  CurrMonthEndDate := FilterEndDate;
                GLAccount.SETFILTER("Date Filter",'%1..%2',CurrMonthStartDate,CurrMonthEndDate);
                GLAccount.CALCFIELDS("Net Change");
                IF GLAccount."Net Change" <> 0 THEN
                  ExportFile.WRITE(
                    STRSUBSTNO('#PSALDO   %1  %2  %3  {} %4',0,
                      FORMAT(FormatDate(GLAccount.GETRANGEMAX(GLAccount."Date Filter")),6),
                      GLAccount."No.",FormatAmount(GLAccount."Net Change")));
                CurrMonthStartDate := CALCDATE('<CM+1D>',CurrMonthStartDate);
              UNTIL CurrMonthEndDate >= FilterEndDate;
              // End of the lines.
    
              IF AccountBudgetFilter <> '' THEN BEGIN
                GLAccount.RESET;
                GLAccount.SETFILTER("Global Dimension 1 Filter",'');
    ...
    
    

    现有代码 1

    ...
                GLAccount.SETFILTER("Global Dimension 2 Filter",'');
                GLAccount.SETFILTER("Date Filter",AccountDateFilter);
                GLAccount.SETFILTER("Budget Filter",AccountBudgetFilter);
    
                // Delete the following lines.
                GLAccount.CALCFIELDS("Budgeted Amount");
                IF GLAccount."Budgeted Amount" <> 0 THEN
                  ExportFile.WRITE(STRSUBSTNO('#PBUDGET   %1  %2  %3  {} %4',0,FORMAT(FormatDate(GLAccount.GETRANGEMAX
                  (GLAccount."Date Filter")),6),GLAccount."No.",FormatAmount(GLAccount."Budgeted Amount")));
                SetGLFilterPrev(GLAccount2);
                GLAccount2.CALCFIELDS("Budgeted Amount");
                IF GLAccount2."Budgeted Amount" <> 0 THEN
                  ExportFile.WRITE(STRSUBSTNO('#PBUDGET  %1  %2  %3  {} %4',-1,FORMAT(FormatDate(GLAccount2.GETRANGEMAX
                  (GLAccount2."Date Filter")),6),GLAccount2."No.",FormatAmount(GLAccount2."Budgeted Amount")));
                // End of the lines.
    
              END;
              DialogWindow.UPDATE(7,GLAccount."No.");
              DialogWindow.UPDATE(8,ROUND(Counter / CounterTotal*10000,1));
    ...
    
    

    替换代码 1

    ...
                GLAccount.SETFILTER("Global Dimension 2 Filter",'');
                GLAccount.SETFILTER("Date Filter",AccountDateFilter);
                GLAccount.SETFILTER("Budget Filter",AccountBudgetFilter);
    
                // Add the following lines.
                CurrMonthStartDate := GLAccount.GETRANGEMIN(GLAccount."Date Filter");
                FilterEndDate := GLAccount.GETRANGEMAX(GLAccount."Date Filter");
                REPEAT
                  CurrMonthEndDate := CALCDATE('<CM>',CurrMonthStartDate);
                  IF CurrMonthEndDate > FilterEndDate THEN
                    CurrMonthEndDate := FilterEndDate;
                  GLAccount.SETFILTER("Date Filter",'%1..%2',CurrMonthStartDate,CurrMonthEndDate);
                  GLAccount.CALCFIELDS("Budgeted Amount");
                  IF GLAccount."Budgeted Amount" <> 0 THEN
                    ExportFile.WRITE(
                      STRSUBSTNO('#PBUDGET   %1  %2  %3  {} %4',0,
                        FORMAT(FormatDate(GLAccount.GETRANGEMAX(GLAccount."Date Filter")),6),
                        GLAccount."No.",FormatAmount(GLAccount."Budgeted Amount")));
                  CurrMonthStartDate := CALCDATE('<CM+1D>',CurrMonthStartDate);
                UNTIL CurrMonthEndDate >= FilterEndDate;
                // End of the lines.
    
              END;
              DialogWindow.UPDATE(7,GLAccount."No.");
              DialogWindow.UPDATE(8,ROUND(Counter / CounterTotal*10000,1));
    ...
    
    

          

先决条件

必须安装以下产品之一才能应用此修补程序:

  • Microsoft Dynamics NAV 2009 Service Pack 1 的瑞典版本
  • Microsoft Dynamics NAV 5.0 Service Pack 1 的瑞典版本

删除信息

无法删除此修补程序。

状态

Microsoft 已确认在 "适用于" 部分中所列的 Microsoft 产品中存在问题。

MICROSOFT和/或其供应商不就此网站上发布的文档和相关图形中包含的信息的适用性、可靠性或准确性作出任何声明或保证, (“材料”) 出于任何目的。

这些材料可能包含技术不准确或排版错误,可随时修订,不另行通知。 在适用法律允许的最大范围内,MICROSOFT和/或其供应商否认并排除所有明示、默示或法定的陈述、保证和条件,包括但不限于与材料有关的所有权、不侵权、令人满意的条件或质量、适销性和特定用途适用性的陈述、保证或条件。