Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

SSRS Report Contract Parameter Layout is not reflected correctly in the Dialog Form

(0) ShareShare
ReportReport
Posted on by 55

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. 

0336.Parameters.JPG

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.

ReportParams.JPG

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.

  • lennynyk Profile Picture
    55 on at
    RE: SSRS Report Contract Parameter Layout is not reflected correctly in the Dialog Form

    I’m trying to add a second page break parameter and have it in the same group as the original page break parameter. It doesn’t want to go into the PageLayout group. It just falls into the default parameters group.

    For the second issue, thanks, I figured using a label would address that. Just not sure why it would get trimmed in the first place. Strangely, I had an issue adding a new label to the label file. Got a message that I should first create a label file ID.

  • Suggested answer
    Gunjan Bhattachayya Profile Picture
    35,421 on at
    RE: SSRS Report Contract Parameter Layout is not reflected correctly in the Dialog Form

    Hi lennynyk,

    Looking at the out of the box report, the Page change parameter is already added to the "PageLayout" group. I am not sure if it has been added to the group using Visual Studio. You can try and add it using VS and see if that works for you.

    For the second issue, Please try using these steps instead -

    1. Creating a label with label id.

    2. Prefixing "literalstr()" around the label - e.g. SysOperationLabelAttribute(literalstr("@SYSXXXX"))

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,137 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,879 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans