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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Using 2 different menuitem on same SSRS report with different value

(0) ShareShare
ReportReport
Posted on by 90

Here i have made SSRS report using Contract & DP Class.

to put simply in this report there is Qty value and Price value, what i need is a new report that is basically the same report but i dont want price Value to show in this new report.

as im new to this programming, im browsing around & found that instead of creating a bran new report, i can create another menu item & filter what i want to show depend on which menu item calling the report.

The problem i dont know what to do or even where to start with.

Thanks.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Faqruddin Profile Picture
    1,909 on at

    Its takes same parameter that you already define in contract class. But you can have two different designs for same report and you can call two designs with same report name.

  • Verified answer
    István Orosz Profile Picture
    2,137 on at

    Hi,

    First you need a second menu item, and slight modifications in the classes. You have to pass an extra parameters towards the SSRS report, you can use the contract/controller class to set this parameter. This parameter lets you decide to show Qty and Price fields or not, all you have to do is attach the cell visibility on the SSRS layout to the parameter. You can use the same layout, with this extra logic, no need to make another design in Visual Studio. Please let me know if you need more details.

    Kind Regards,

    István

  • ITIPG Profile Picture
    90 on at

    ok so far i manage to create another boolean parameter on contract & depend on that parameter (true/false) i can show Price Value or hide it. i also able to hide those parameter from Parameter Input Form.

    im still stuck at setting the new parameter value base on Menu Item who call it.

    * My New Contract Parameter

    [

    DataMemberAttribute('ShowValue'),

    SysOperationLabelAttribute(literalStr("Show value")),

    SysOperationHelpTextAttribute(literalStr("Show Value")),

    SysOperationDisplayOrderAttribute('3'),

    SysOperationGroupMemberAttribute('group_notdefined_at_classdeclaration')

    ]

    public boolean parmShowValue(boolean _ShowValue = ShowValue)

    {

       ShowValue = _ShowValue;

       return ShowValue;

    }

    * My Controller

    class InventOnHandTransController extends SrsReportRunController

    {

    }

    public static void main(Args args)

    {

       InventOnHandTransController controller;

       controller = new InventOnHandTransController();

       controller.parmArgs(args);

       controller.parmReportName(ssrsReportStr(InventOnHandTrans, Report));

       controller.startOperation();

    }

    protected void preRunModifyContract()

    {

      InventOnHandTransContract Contract;

      Contract = this.parmReportContract().parmRdpContract() as InventOnHandTransContract;

      Contract.parmShowValue(true);

      super();

    }

    What do i miss here? Thanks

  • ITIPG Profile Picture
    90 on at

    finally its working as i want it to be.

    Thanks all for your help.^^

    1 question a little out of this topic.

    with my method up there, i just need to set previlege for user who can access my 2nd Menu item & everything is done.

    as im browsing through i find another method to do this by using User Group. with this method i dont need to setup previlege access just add the user who can access it to User Group.

    so my question is : what is the pros & cons between this 2 method? or its all the same.

    Thanks

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 26

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans