I am trying to add some parameters for the LedgerTrialBalance SSRS report and add them to one of the existing Dialog Groups. I go to the LedgerTrialBalanceContract class and create the new parameter method with the following tags:
[ DataMemberAttribute('PageChangeOnEntity'), SysOperationLabelAttribute('New Page on Entity'), SysOperationHelpTextAttribute('Start a new page between all entities?'), SysOperationGroupMemberAttribute('PageLayout'), SysOperationDisplayOrderAttribute('1') ] public boolean parmPageChangeOnEntity(boolean _pageChangeOnEntity = pageChangeOnEntity) { pageChangeOnEntity = _pageChangeOnEntity; return pageChangeOnEntity; }
I already had a parameter in the "PageLayout" group and I tried to move it to the number 2 spot:
[ DataMemberAttribute('PageChange'), SysOperationLabelAttribute('New Page on Primary Dimension'), SysOperationHelpTextAttribute('Start a new page between all primary dimension sets?'), SysOperationGroupMemberAttribute('PageLayout'), SysOperationDisplayOrderAttribute('2') ] public boolean parmPageChange(boolean _pageChange = pageChange) { pageChange = _pageChange; return pageChange; }
The class declaration method is tagged like so:
[ DataContractAttribute, SysOperationGroupAttribute('Financial dimension set', "@SYS83218", '1'), SysOperationGroupAttribute('Date', "@SYS343126", '2'), SysOperationGroupAttribute('DateDivided', "@SYS343127", '3'), SysOperationGroupAttribute('PageLayout', "@SYS27406", '4'), SysOperationGroupAttribute('PrintOut', "@SYS12608", '5'), SysOperationGroupAttribute('LegalEntityRange', "@AKA450", '6'), SysOperationGroupAttribute('CreatedDate', "@SYS59617", '7'), SysOperationContractProcessingAttribute(classstr(LedgerTrialBalanceUIBuilder), SysOperationDataContractProcessingMode::CreateUIBuilderForRootContractOnly) ] public class LedgerTrialBalanceContract implements SysOperationValidatable { //Variable declarations here }
I save all this, generate an incremental CIL. At first, when I go to run the report right away, the new parameter appears to get assigned to the correct group. However, when I go to the report in Visual Studio (in the correct layer) and click Refresh Dataset on the report, some parameters don't fall into the correct groups and also get the labels trimmed to 14 characters. Also some of the groups are not named the same.
When I deploy this report and go to run it in AX, I can see the parameters fall into the same groups as in the report. My new parameter falls into the default "MainGrp" DialogGroup.
Additionally, the labels got trimmed to 14 characters for some reason. I'm guessing this can be addressed by using system labels, but still kind of strange.
I scoured the LedgerTrialBalanceUIBuilder class to make sure there is nothing going on for these fields there and I don't find anything. There are just some groups and fields being added, but unrelated to these. Also, I stepped into the super() call of the build() method of the UI builder class, before any modifications are applied and I can see in there where it's stepping through the parameters, that my new parameter is already part of the MainGrp group and the label is already trimmed. I see nothing in the Contract that could be causing this either. I also made sure that there are no invalid group names in the parameter tags and no duplicate orders assigned. I also tried several troubleshooting steps such as Recompiling the application using axbuild.exe; restarting he AOS; clearing out all the XPPIL files; restarting the Reporting Service; clearing usage data in AX; restarting the server; refreshing everything in Dev Window > Tools > Caches.
It looks like the Contract isn't assigning the layout correctly for some reason.
Has anyone run into a similar issue? Or maybe I'm doing something wrong? This is a standalone server running AX 2012 R3 6.3.164 on Windows Server 2012 R2.