web
You’re offline. This is a read only version of the page.
close
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

Print selected lines

(3) ShareShare
ReportReport
Posted on by 11

Hello, I am working on an SSRS report with D365 Finance & Operations using X++.

I am in a scenario where I have a journal with a header and lines, and the particular requirement of the report is that I need to select N number of lines within the journal and send only the selected lines to the printed report.

From the header, I am passing the journal ID through my Data Contract class, so I have no problem retrieving the header information in my DP (Data Provider). However, for the lines, I am not able to pass at least the RecId of the selected lines and then retrieve them in my DP.

 

How could this be achieved?

Thank you in advance. Best regards.

Categories:
I have the same question (0)
  • Martin Dráb Profile Picture
    237,967 Most Valuable Professional on at
    Moved from Integration, Dataverse, and general topics forum to Finance | Project Operations, Human Resources, AX, GP, SL forum.
     
    Title changed from SSRS Report.
     
    Please tell us more about your problem. The current description, I am not able to pass at least the RecId of the selected lines, isn't very detailed. Do you mean that you don't know how to use collections in a data contract, or do you have a particular problem with it, or is your problem about something else? 
  • CU23061930-0 Profile Picture
    11 on at

    Sorry for the confusion, let me provide more context.

     

    In my Controller, using a MultiSelectionHelper, I retrieve the RecId values of the selected lines in order to pass only those selected line RecIds to my DP class. However, I don’t know how to properly send them to the DP.

     

    I have tried using a parm method in the Data Contract, sending them as a string, list, or container, but when I retrieve the contract in the DP, the journal/header ID arrives correctly, while the RecIds of the selected lines always arrive empty.

  • Martin Dráb Profile Picture
    237,967 Most Valuable Professional on at
    The way to pass them to the DP class is indeed through a data contract. Please show us your code of the parm method. I would use a list, but the other options are possible too. If you use a list, don't forget the AifCollectionType attribute.
  • CU23061930-0 Profile Picture
    11 on at
    Alright, I’m attaching a screenshot of my parm method.
  • Martin Dráb Profile Picture
    237,967 Most Valuable Professional on at
    It looks acceptable to me.
     
    Now show us how you use it and what you found when you debugged your code. Don't you, for example, set the value before a previously stored contact gets loaded from usage data? Debugging should have told you at what point the value disappears.
  • Sagar121 Profile Picture
    872 on at
    Hi, 
     
    Please check my video if this can help you. Else you can show us full end to end code.
     

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

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 428 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans