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

Notifications

Announcements

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,883 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

News and Announcements

Season of Giving Solutions is Here!

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

#2
TAHER Mehdi Profile Picture

TAHER Mehdi 3

#3
Nakul Profile Picture

Nakul 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans