Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Adding a new parameter in an existing SSRS report D365

(0) ShareShare
ReportReport
Posted on by 5

Hello,

I need to create a new parameter in the existing BOM lines report. Business needs the report on the All production orders form. I have created an extension of the contract class and added my parm method in there with proper attributes.

I am passing the values using the prePromptModifyContract method of the controller class, and the value is flowing smoothly.

pastedimage1677087198135v1.png

But when I am trying to retrieve the value from my dp class, the value is getting wiped out suddenly.

Any thoughts?

Thanks in advance.

Note: The parameter was not showing initially on the report dialog, so I had to add it using the UI builder extension class.

  • GirishS Profile Picture
    27,823 Moderator on at
    RE: Adding a new parameter in an existing SSRS report D365

    Seems you created new controller class and add the code in prePromptModifyContract - Have you created new output menu item and map the newly created class - Or extend the output menu item and set your class property to new class you created.

    If none of them work means - I will suggest you duplicate all the reports objects - Including DP class- Contract - Ui builder.

    Instead of doing R&D we can go ahead and duplicate all the objects of the report.

    But one disadvantage will be if microsoft released some features to BOM report - It won't reflect in the duplicated report.

    Thanks,

    Girish S.

  • Vikso Profile Picture
    5 on at
    RE: Adding a new parameter in an existing SSRS report D365

    Girish,

    Yes all the other parameter values are coming. I tried to add manually, but no luck.

  • GirishS Profile Picture
    27,823 Moderator on at
    RE: Adding a new parameter in an existing SSRS report D365

    Check whether other parameter values are coming.

    If the parameter is not coming, just manually add the parameter in report and try.

    Thanks,

    Girish S

  • Vikso Profile Picture
    5 on at
    RE: Adding a new parameter in an existing SSRS report D365

    Hi Girish,

    I have already duplicated the report and refreshed the dataset. Although the parameter did not come automatically in the report, like it does for a custom report.

    Thanks

  • GirishS Profile Picture
    27,823 Moderator on at
    RE: Adding a new parameter in an existing SSRS report D365

    I think you need to duplicate the report and refresh the dataset, since you have added new parameter.

    Refer to the below community thread which talks about the same issue.

    https://community.dynamics.com/365/financeandoperations/f/dynamics-365-for-finance-and-operations-forum/462255/how-to-add-a-new-parameter-to-ssrs-report-by-extending-the-data-contract-and-get-the-value-in-dp-class-extension

    Thanks,

    Girish S.

  • Vikso Profile Picture
    5 on at
    RE: Adding a new parameter in an existing SSRS report D365

    Hi Girish,

    Added the dp code below.

    public void processReport()

       {        

           BOMConsistOfContract    consistOfContract = this.parmDataContract() as BOMConsistOfContract;

           ProdTable               prodTable;

           if(consistOfContract.parmReferenceProdId())

           {

               prodTable = ProdTable::find(consistOfContract.parmReferenceProdId());

               this.parmQuery().dataSourceTable(tableNum(InventTable)).addRange(fieldNum(InventTable,ItemId)).value(prodTable.ItemId);

           }

           next processReport();

       }

    The contract class does not return anything on the parmReferenceProdId in here.

    Thanks

  • GirishS Profile Picture
    27,823 Moderator on at
    RE: Adding a new parameter in an existing SSRS report D365

    Hi Vikso ,

    Can you show us the code for DP class?

    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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,276 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,975 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans