Skip to main content

Notifications

Microsoft Dynamics AX forum
Suggested answer

How do I change the labels on my parameters and have the report reflect my changes

Posted on by Microsoft Employee

I have created a report using RDP classes. It has 2 parameters, From Date and To Date. Previously, I had both  parameters declared as TransDate EDT in  the  class. The label for both parameters show as "Date".

date_5F00_date.JPG

I am  trying to make the parameters say From Date and To Date so I tried the SysOperationLabelAttribute class (see code below), selected Build in Visual Studio, and  Deploy in AOT, and launch from my Menu Item  The report parameters' labels remain the same. 

Now I changed the definition of the class variables as FromDate and ToDate EDT respectively. I also changed  the Prompt String property of the parameters in Visual Studio to the label (@SYS328562 - From Date). Build (in VS), and deployed (AOT). Still, the parameters are "Date, Date".

date_5F00_date3.JPG

How can  I  change  the label of the parameters to show From Date  and To Date? Why won't the report refresh to show the changes I  have made? Do I need to delete the report and start again?

Here is my code, it is very standard.

[DataContractAttribute]
public class PositivePayContract
{
FromDate fromDate;
ToDate toDate;

}

[DataMemberAttribute('FromDate'),
SysOperationLabelAttribute(literalStr("@SYS328562")),
SysOperationDisplayOrderAttribute('0')
]
public FromDate parmFromDate(FromDate _fromDate = fromDate)
{
fromDate = _fromDate;
return fromDate;

}

[DataMemberAttribute('ToDate'),
SysOperationLabelAttribute(literalStr("@SYS328564")),
SysOperationDisplayOrderAttribute('1')
]
public ToDate parmToDate(ToDate _toDate = toDate)
{
toDate = _toDate;
return toDate;
}

Here is my project. I am using Ax 2012 and VS 2013

date_5F00_date2.JPG

Categories:
  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How do I change the labels on my parameters and have the report reflect my changes

    Hi all, thank you for your comments. The issue has been resolved, after searching  through different articles and bearing your suggestions in mind. I now use this process whenever I make changes to the report.

    In Visual Studio

    1. Clean  the report project.

    2. Build the report.

    In AOT,

    3. close  the SSRS Report node, then  right click Refresh

    4. expand the SSRS Report node, then select your report name, right click Save.

    5. If there  is an error about the version in the server being newer, then right click Restore

    6. Right click Deploy

    I find that this works for my project.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How do I change the labels on my parameters and have the report reflect my changes

    Thank  you for your suggestion. I will keep that in mind, and I am requesting admin access to the ssrs report server so that I  can use powershell to  redeploy and/or delete the report from ssrs myself.

  • Suggested answer
    Lance [MSFT] Profile Picture
    Lance [MSFT] on at
    RE: How do I change the labels on my parameters and have the report reflect my changes

    To get changes made to a report to show up in runtime you have to redeploy that report.  This means you need to be granted permissions in ssrs to deploy reports or you need to find someone with that permission to deploy the report for you.  Without redeploying the report, the setting changes will never take effect.

    In the case of settings for ssrs report parameters, I've noticed that the ssrs parameter info for the report is often not updated on redeployment.  To get around this, when I have made a change to parameters, I delete the report off ssrs and then deploy it again.

    If you use the powershell command, it has a parameter to specify if you want to delete the report first, but if deploying from AOT or visual studio, you might need to delete the report from ssrs yourself before deploying again.

    This article has some more info on deploying reports through powershell if you need it.

    technet.microsoft.com/.../hh389771.aspx;MSPPError=-2147217396

    Hope this helps,

    Lance.

  • sohaibcheema Profile Picture
    sohaibcheema 46,594 User Group Leader on at
    RE: How do I change the labels on my parameters and have the report reflect my changes

    1)if you cannot find your project inside AOT, that means you have not added that to AIT yet.

    but that not an issue to be worried unless the report has aany business logic CS file associated with it.

    you can simply open application explorer in VS, select your inside Application Explorer of AOT, which appears in Visual Studio. select your report and click edit.

    2) I am unable to get how your are modifying your report? are you really using VS or some other tool?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How do I change the labels on my parameters and have the report reflect my changes

    Hi Nidhi

    Yes I tried cleaning and build/redeploy as you suggested. Stilll doesnt work.

    Thanks for the suggestion anyway.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How do I change the labels on my parameters and have the report reflect my changes

    Hi Sohaib,

    1) Click your VS project inside AOT and click edit, now wait for project to be loaded. after project is loaded in VS. go to solution explorer and click your report inside solution explorer right click report and click open/edit


    I cannot find my project in AOT>Visual Studio Projects>Dynamics Ax Model Projects. Should I be worried? I can however find my report in SSRS Reports

    2) delete temporary project from folder physical from following path

    C:\Users\YourUserName\AppData\Local\Temp\Microsoft Dynamics AX\Dynamics AX Model Projects

    There is no AppData folder on my drive. Again, should I be worried?

     

    Regards,

    JB

  • sohaibcheema Profile Picture
    sohaibcheema 46,594 User Group Leader on at
    RE: How do I change the labels on my parameters and have the report reflect my changes

    okay, one more point.

    Usually when we click on VS project inside AX and click EDIT.

    it loads Project in Visual Studio and also loads a report also itself i.e. at this point you don't need to click solution explorer and open report by clicking edit. Till this point VS project is showing you report from temporary folder. it is not showing you report from AOT.

    there could be two possibilities to load what's currently inside AOT exactly

    1) Click your VS project inside AOT and click edit, now wait for project to be loaded. after project is loaded in VS. go to solution explorer and click your report inside solution explorer right click report and click open/edit

    now do modification on this loaded report

    OR

    2) delete temporary project from folder physical from following path

    C:\Users\YourUserName\AppData\Local\Temp\Microsoft Dynamics AX\Dynamics AX Model Projects

    Delete your report project folder completely

    now go to AOT and modify your report

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How do I change the labels on my parameters and have the report reflect my changes

    Hi Sohaib,

    I cannot delete the RDL because I dont have access to the ReportServer  even from Configuration Manager ("Unable to connect to the Report Server *****")

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How do I change the labels on my parameters and have the report reflect my changes

    In VS, Clean the report and Build, then redeploy it from AOT.

    Sometimes just rebuilding doesnt help.

  • sohaibcheema Profile Picture
    sohaibcheema 46,594 User Group Leader on at
    RE: How do I change the labels on my parameters and have the report reflect my changes

    have you tried deleting RDL?

Helpful resources

Quick Links

Dynamics 365 Community Update

Welcome to the inaugural Community Platform Update. As part of our commitment to…

Dynamics 365 Community Newsletter - August 2024

Catch up on the latest D365 Community news

Community Spotlight of the Month

Kudos to Mohana Yadav!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,115 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 227,971 Super User 2024 Season 2

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans