Some time ago I needed to set up reporting role for Dynamics AX 4.0 with Turkish GLS and database which collation was Turkish_CI_AS. The task was not easy. Starting from situation that I was not even able to start AOS after installation when KB article: https://mbs.microsoft.com/knowledgebase/KBDisplay.aspx?scid=kb$EN-US$931955&wa=wsignin1.0 helped me to fix it. After compilation and synchronization I had to generate report models. During generation of report models after around 20 min I get following error:

Failed to process instance internal.totalcom.net Cannot create a record in Analysis Services Enum Cache (SRSAnalysisEnums). Value: 203, Subscription.The record already exists."


After longer investigation I found that error is raised in

[c] \Classes\SRSModelWriter\cacheAnalysisEnumValues 93

[c] \Classes\SRSModelWriter\generateUniqueNames 21

[c] \Classes\SRSModelPerspectivesGenerator\generate 40

[c] \Classes\SRSUpdateModels\updateModels 105

[c] \Classes\SRSUpdateModels\run 5

[c] \Classes\SRSUpdateModels\main 8 

If you look into SRSAnalysisEnums Primary Key EnumValueEnumValue there is index:

-LanguageID

- EnumID

- EnumItemValue

Error is raised because the index is broken, the record with such a values (LanguageID, EnumID, EnumItemValue) already exists. What would mean that there is Enum which has two nodes with the same value, what is of course strange as you are not able to create such an Enum.
In the end I found the that indeed there is Enum which has two nodes with exactly the same values.
The problem happens during generation of Bank model. The enum which is causing the problem is

\Data Dictionary\Base Enums\LedgerTransTxt\SMASubscription Layer: gls Value: SMASubscription which value has 203

If you look into \Data Dictionary\Base Enums\LedgerTransTxt there is another enum CashReceipt which value is also 203 what is causing the error (this one was added in GLS layer)

So the solution was to apply KB 936323 https://mbs.microsoft.com/knowledgebase/KBDisplay.aspx?scid=kb$EN-US$936323&wa=wsignin1.0 which was nit included in SP2.

After this change the models get generated, but it was not the end of the problems.

After creating report in report builder and running in I run into new error:

Semantic query execution failed. Invalid column name 'WindowsID' Query execution failed for data set 'dataSet' An error has occurred during report processing.


The reason behind this is standard issue for Turkish localization difference between ‘i’ and ‘I’. In Turkish there is difference between i and I if you try to run this query you will get the error that column WindowsID if you change column name to WINDOWSID then the statement will be correct
In this case problem was hidden in macro SRSModel in AOT \ Macros \ SRSModel

to fix it by changing the value from

#define.windowsIdFieldName ("WindowsID")

to

#define.windowsIdFieldName ("WINDOWSID")

After applying fix, you need to re-compile Classes\SRSModelGenerator. We can input a blank key at any place in SRSModelGenerator and delete it, after that, do compile. It will make sure system will re-compile it.

After all those changes reports were running correctly.

 

--author: Czesława Langowska
--editor: Czesława Langowska
--date: 03/Aug/2010