Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Management Reporter 2012 Data mart integration error 'Index was out of range'


View products that this article applies to.

Symptoms

The following error message may appear in the Management Reporter Dynamics GP Data Mart integration, for the Dimension Value task:

DimensionValueProvider to Dimension Value: Error Text: Index was out of range. Must be non-negative and less than the size of the collection.



Additionally, the event viewer on the server hosting the Management Reporter services will display the following error details in the Windows Application logs.

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
--- Exception Dump ---
 Caught Exception: [System.ArgumentOutOfRangeException] Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Stack trace:
   at Microsoft.Dynamics.Performance.Integration.Reporting.Adapter.GP.DimensionValueProvider.CreateGLDimensionValueFromReader(SqlDataReader reader, Company cmp)
   at Microsoft.Dynamics.Performance.Integration.Reporting.Adapter.GP.DimensionValueProvider.<ReadObjects>d__0.MoveNext()
   at Microsoft.Dynamics.Integration.Service.Tasks.MapWork.ProcessRecordsImplementation(OperationType operationType)


This error message can also occur when you attempt to open a building block or generate a report.

↑ Back to the top


Cause

This error can occur if there are references to accounts in the account segment table (GL40200) of the Microsoft Dynamics GP application database that are not present in the Account setup table (SY00300) or the Account index table (GL00100).

↑ Back to the top


Resolution

Note Before you follow the instructions in this article, make sure that you have a complete backup copy of the database that you can restore if a problem occurs.

1. Run the following query in SQL Management Studio against the Microsoft Dynamics GP company database to identify the invalid account segments:

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)


Depending on the number of segments, you may need to adjust the statement.

2. Run the following statements in SQL to delete the bad records from the GL40200 table:

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)

3. After removing the records from the GL40200 table, run Check Links on the account master in Dynamics GP:

  a. Click Dynamics GP, then click Maintenance and then click Check Links.
  b. Click Financial series. Select Account Master, click Insert and then click OK.

4. Reconfigure the Management Reporter Data Mart integration to a new data mart database after correcting the account segments.


Note All steps must be completed by a domain user assigned to the "Administrator" role in Management Reporter Security who is also a member of the local Administrators group on the server

a. Open the Management Reporter Configuration Console.

b.  Click the GP integration under ERP integrations. 

c. Click Disable Integration.

d.  Click Remove in the upper-right corner to remove the integration.

e. Exit the Configuration Console.

f. Open SQL Server Management Studio.

g. Backup the Management Reporter database.

h. Backup the data mart (usually DDM or ManagementReporterDM) database.

i. Delete the data mart database.

j. Open the Configuration Console.

k. Stop the Management Reporter 2012 Process Service.

l. Stop the Management Reporter 2012 Application Service.

m. Start the Management Reporter 2012 Application Service.

n. Start the Management Reporter 2012 Process Service.

o. Click File and then click Configure.

p. Select Add Microsoft Dynamics GP Data Mart.

q. Follow the steps for the Dynamics GP provider at:


Microsoft Management Reporter: Installation, Migration, and Configuration Guides

http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=5916


r. When you have finished, click Enable Integration in the Configuration Console.

↑ Back to the top


Keywords: kbmbsmigrate, kbmbspartner, kbsurveynew, kb

↑ Back to the top

Article Info
Article ID : 3029952
Revision : 1
Created on : 1/7/2017
Published on : 1/13/2015
Exists online : False
Views : 289