Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Unanswered

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

(1) ShareShare
ReportReport
Posted on by 731
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,816 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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,703 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,433 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans