web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Change SSRS report name displayed in report title at run time

(0) ShareShare
ReportReport
Posted on by 815

Hi ,

AX 2012 R3

I have created a new design for prodRouteCard report and running report for production order.

Report title in the title bar is showing as Route Card while I have created a design for material check List so I want to display the report name in the report title bar as "Material checklist".

Label usually come from menu item where report was called. This is specified in the class where I am calling my new design as well.

I have tried to add a new output menu by duplicating and renaming the prodRouteCard output menu, changing the new menu label to desired text and then adding this output menu to a privilege prodRouteCardGenerate but when I call this menu item then I get the permission error.

so is there a way to change the report tile in the titlebar at run time?

Regards,

Nadeem

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    237,976 Most Valuable Professional on at

    If you want to use an additional menu item and aren't able to configure security properly, please give us more information than that it's a permission error.

    If you want to change a title at runtime, please tell us what title you're talking about. The title of report parameters window? The title of report viewer (when printing reports to screen)? Or something else?

    Regarding first two options, I think it's taken from the report controller (e.g. caption()) and you can replace the default logic with your own.

  • Nadeem Profile Picture
    815 on at

    Hi Martin,

    Report title is showing as below when printing the report on the screen.

    2337.SC.png

    Regards,
    Nadeem

  • Nadeem Profile Picture
    815 on at

    Details about the error when using a new output menu:

    I have created a duplicate of output menu ProdRouteCard and renamed it along with new label.

    I have also added this new menu point to ProdRouteCardGenerate  privilage.

    There are two places where this menu is being used.

    First the the above privilage and second is class\ProdUpdRelease where I am calling this new menu.

    If I double click the erorr then it takes me to Classes\MenuFunction\Run

    Error: Insufficient rights to execute FTM 2 PER_ProdCheckList.

     

    if (isCLRSession || specialCaseSRS)
    {
    // Check security.
    if(appl.isRunningMode())
    {
    hasAccess = hasMenuItemSecurityAccess(this);
    if(!hasAccess)
    {


    throw error(strfmt("@SYS339383", this.AOTtypeStr(), this.AOTname()));
    }
    }

    I forced the cursor to bypass this and it worked. I restarted my session after that and it worked as well.

    New menu item option is working for me. 

    I have tried below options which didn't work.

    controller.parmReportContract().parmReportCaption(“@SYS323601”);

     

    Changing the label worked itself but report still displayed the same old labvl.

     

    TreeNode node;

       node = TreeNode::findNode("\\Menu Items\\Display\\AccountingDistributions");

       if (node != null)

       {

           info(strFmt("Old value: %1", node.AOTgetProperty("Label")));

           node.AOTsetProperty("Label", "Your value");

           info(strFmt("New value: %1", node.AOTgetProperty("Label")));

       }

     

    Thanks Martin for the input.

  • Martin Dráb Profile Picture
    237,976 Most Valuable Professional on at

    All right, so you mean the caption of the report viewer form.

    But now we're talking about two different things:

    - using a different menu item (which requires solving the permission issue)

    - setting the title from code

    Which one do you want address? If you want both for some reason, I suggest you split this thread and discuss each problem in its own thread.

  • Nadeem Profile Picture
    815 on at

    Hi Martin,

    I have tried with new menu item and it has worked for me as explained in my previous update but I will be keen to know how to change the caption of the report from Code as below didn't work for me.

    controller.parmReportContract().parmReportCaption(“New name”);

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Nadeem,

    you can set it on dialog's caption.

    controller.parmDialogCaption("Report caption");


    Regards

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans