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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)
Answered

Calling a ssrs REport from x++

(0) ShareShare
ReportReport
Posted on by

Hi ,

How can I run (call)  a SSRSreport from a method in X++.

Thanks.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Daniel Weichsel Profile Picture
    on at

    You can use the SrsReportRunController class as in this example:

       SrsReportRunController  controller;

       controller = new SrsReportRunController();

       controller.parmReportName(ssrsReportStr(LedgerTrialBalance, Summary));

       controller.startOperation();

    The controller has additional parm methods to help control running the report, such as parmShowDialog which you can use to skip the report dialog.

    For advanced features you can create a new controller class extending SrsReportRunController and override methods.  For example, by overriding the prePromptModifyContract method you can manipulate the query or other data members before the dialog is shown.

  • Community Member Profile Picture
    on at

    Thanks Daniel,

    It's working.

    Case closed.

  • Community Member Profile Picture
    on at

    Hi,

           I need to know the usage of controller class in ax 2012 for creating SSRS Report.

           Any ideas, Please share it.

    Regards,

    Zahir

  • venkatesh vadlamani Profile Picture
    3,180 on at

    Report programming model for Microsoft Dynamics AX 2012

    search for above text in BING.

    MOst comprehensive documentation for reporting framework in ax 2012

  • Community Member Profile Picture
    on at

    How can I run the report with parameters?

  • venkatesh vadlamani Profile Picture
    3,180 on at

    you have to get the contract object associated to the execution by using this kind of construct

    ReportContractClass contract;

    contract = controlerObj.ParmReportContract().ParmRDPContract() as ReportContractClass

    contract.parmParamete1(SetValueHere)

    contract.parmParameter2(SetValuehere);

    now call this method,

    ControlerObj.startOperations()

  • Community Member Profile Picture
    on at

    With parameters like calling the report with parameter name Customer_Num, Invoice_ID...,  not report parameters like print destination, report name, caption... ?

  • venkatesh vadlamani Profile Picture
    3,180 on at

    @ Ante    

    You need to first set the report name for the controller object

    then you get the ReportContract object from it as mentioned above.

    ReportContractContains

    1)RDPContract   (If you have a DP class attached to a DS used in the report which has a parameters)

    2)RDLContract  (these are parameters used just in the design of the report )

    3)QueryContracts (the query  LIST associated with the execution of the DP)

    4)PrintContracts (these are the print destination settings associated to report execution)

    you can explicitly set all these for a report once the report name is set and you have ReportContract object

    Hope this might be of some help

    Cheers

    Venkatesh

  • Jim Bonnie IBIS Profile Picture
    900 on at

    I am so happy to have found this snippet of code,

    contract = controlerObj.ParmReportContract().ParmRDPContract() as ReportContractClass

    That did the trick for me!

    Thanks, Jim

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Sanhthosh.Kumar.K Profile Picture

Sanhthosh.Kumar.K 2

#2
Raed Salah Bzour Profile Picture

Raed Salah Bzour 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans