Skip to main content

Notifications

Dynamics 365 Community / Forums / Finance forum / How do I pass caller f...
Finance forum
Unanswered

How do I pass caller from the controller to the DP class? [SSRS]

Posted on by 713
Hello,
 
I am currently transferring reports from AX [old technology] to SSRS and I have a problem. A certain report is run from 5 different forms in the system, for example: from BOMTable , CustInvoiceTrans or CustInvoiceJour. 
Is it possible to create an SSRS report in the same way? 
Suppose I have a Controller, Contract and Data Provider class. In the Controller class, I can check what the caller is, but how to pass it to the DP class?
I know how to pass a single parameter/value. But I have a problem passing the whole caller. Is it possible to do this? Would it be easier to create 5 separate reports?
Can someone give me a suggestions or an example?
Thank you in advance.
  • GirishS Profile Picture
    GirishS 27,832 Super User 2024 Season 1 on at
    How do I pass caller from the controller to the DP class? [SSRS]
    Hi Shooowtek,
     
    You can pass the unique field of the table to the DC class where you can get the same in the DP class.
    For example CustTable will have AccountNum as unique field - Create an parm method with AccountNum as return type.
    Later on the DP class you can add a select statement to get the whole buffer.
     
    protected void prePromptModifyContract()  
     {  
       Contract=this.parmReportContract().parmRdpContract() ;
       CustTable cust  =this.parmArgs().record();  
       Contract.parmAccountNum(cust.AccountNum);  
       super();  
     }  
    
    In the Dp class you can get the account num field similar to the value you get it for other parameters.
     
    Thanks,
    Girish S.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 229,173 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans