Error while generating Financial dimension report

Hi All,

When I am generating a customised report by the name of ‘Sales by Financial Dimension’ report in AX 2012, I am encountering an error:

“Function DimensionStorage.getSegmentForHierarchy has been incorrectly called”

This function has been used in the DP class of the report - The DP class is using a query which involves GeneralAccountEntry and GeneralEntry as the data sources.

Any idea as to what might be causing the above error?

Your help and guidance is highly appreciated!

Thanks :slight_smile:

Roshni Sujay

What if you debug the failing method?

Hi Martin,

That was my first and foremost approach to resolving this error, but the data for the report is in huge numbers and it is practically impossible to manually debug around say 1000 records.

What I did was, changed the filter and reduced the data set to make my debugging process simpler. I ended up with 50 records.

Debugging didn’t completely help - hence I added an infolog message right before the function is called and retrieved the RecId of the table records that I am passing in that function.

Taking the last RecId just before the error is generated, I checked in the above mentioned tables - I found that the record had been created by one of my colleagues, and a few fields were missing when compared to another record which doesn’t throw an error.

I haven’t been able to get clarity as to why the error is encountered, if it’s because there is some problem with the data that is present in those tables or there is something else.


I don’t know all he context, but I thought that placing a breakpoint at the line throwing the error would give you the exact data causing the problem. And then you can use a conditional breakpoint if you need to interrupt execution even before the error is thrown.

Hi Martin,

Tried debugging but it did not help:(

Is there any other solution that you know of for the above error?