管理報告 2012 數據超市整合錯誤「索引超出範圍」
本文提供當您使用 Management Reporter 2012 數據超市與 Microsoft Dynamics GP 整合時,索 引超出範圍 錯誤問題的解決方法。
適用於: Microsoft Management Reporter 2012,Microsoft Dynamics GP
原始 KB 編號: 3029952
徵狀
下列錯誤訊息可能會出現在維度值工作的 Management Reporter Dynamics GP Data Mart 整合中:
DimensionValueProvider 到維度值:錯誤文字:索引超出範圍。 必須是非負數且小於集合的大小。
此外,裝載Management Reporter 服務之伺服器上的事件查看器會在 Windows 應用程式記錄中顯示下列錯誤詳細數據。
索引超出範圍。 必須是非負數且小於集合的大小。
參數名稱:索引
---例外狀況傾印---
攔截到的例外狀況:[System.ArgumentOutOfRangeException] 索引超出範圍。 必須是非負數且小於集合的大小。
參數名稱:索引堆疊追蹤:
at Microsoft.Dynamics.Performance.Integration.Reporting.Adapter.GP.DimensionValueProvider.CreateGLDimensionValueFromReader (SqlDataReader reader, Company cmp)
位於 Microsoft.Dynamics.Performance.Integration.Reporting.Adapter.GP.DimensionValueProvider。<ReadObjects>d__0.MoveNext ()
at Microsoft.Dynamics.Integration.Service.Tasks.MapWork.ProcessRecordsImplementation (OperationType operationType)
當您嘗試開啟建置組塊或產生報表時,也會發生此錯誤訊息。
原因
如果 Microsoft Dynamics GP 應用程式資料庫的帳戶區段數據表 (GL40200) 中沒有帳戶設定資料表 (SY00300) 或帳戶索引數據表中 (GL00100) 的帳戶參考,就會發生此錯誤。
解決方案
注意事項
遵循本文中的指示之前,請確定您有可在發生問題時還原的資料庫完整備份複本。
在 SQL Management Studio 中針對 Microsoft Dynamics GP 公司資料庫執行下列查詢,以識別無效的帳戶區段:
select * from GL40200 where SGMTNUMB not in (select SGMTNUMB from SY00300) select * from GL40200 where SGMTNUMB=1 and SGMNTID not in (select distinct ACTNUMBR_1 from GL00100) select * from GL40200 where SGMTNUMB=2 and SGMNTID not in (select distinct ACTNUMBR_2 from GL00100) select * from GL40200 where SGMTNUMB=3 and SGMNTID not in (select distinct ACTNUMBR_3 from GL00100) select * from GL40200 where SGMTNUMB=4 and SGMNTID not in (select distinct ACTNUMBR_4 from GL00100)
視區段數目而定,您可能需要調整 語句。
在 SQL 中執行下列語句,以從GL40200數據表中刪除不正確的記錄:
delete GL40200 where SGMTNUMB not in (select SGMTNUMB from SY00300) delete GL40200 where SGMTNUMB=1 and SGMNTID not in (select distinct ACTNUMBR_1 from GL00100) delete GL40200 where SGMTNUMB=2 and SGMNTID not in (select distinct ACTNUMBR_2 from GL00100) delete GL40200 where SGMTNUMB=3 and SGMNTID not in (select distinct ACTNUMBR_3 from GL00100) delete GL40200 where SGMTNUMB=4 and SGMNTID not in (select distinct ACTNUMBR_4 from GL00100)
從GL40200表移除記錄之後,請在 Microsoft Dynamics GP 的帳戶主機上執行檢查連結:
- 選 取 [Dynamics GP],然後選取 [ 維護] ,然後選取 [檢查連結]。
- 選取 [財務 系列]。 選 取 [帳戶主機],選取 [插入 ],然後選取 [ 確定]。
在更正帳戶區段之後,重新設定 Management Reporter Data Mart 與新數據超市資料庫的整合。
注意事項
所有步驟都必須由指派給管理報告安全性系統管理員角色的網域使用者完成,該使用者也是伺服器上本機 Administrators 群組的成員
開啟 Management Reporter 組態主控台。
選取 [ERP 整合] 下的 GP 整合。
選 取 [停用整合]。
選 取 右上角的 [移除] 以移除整合。
結束組態主控台。
啟動 SQL Server Management Studio。
備份 Management Reporter 資料庫。
將數據超市備份 (通常是 DDM 或 ManagementReporterDM) 資料庫。
刪除數據超市資料庫。
開啟組態主控台。
停止 Management Reporter 2012 Process Service。
停止 Management Reporter 2012 應用程式服務。
啟動Management Reporter 2012 應用程式服務。
啟動 Management Reporter 2012 Process Service。
選 取 [檔案 ],然後選取 [ 設定]。
選 取 [新增 Microsoft Dynamics GP Data Mart]。
請遵循 Microsoft Dynamics GP 提供者的步驟,
當您完成時,請在組態控制台中選 取 [啟用整合 ]。
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應