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, ...
Answered

New data provider class in Electronic Reporting

(0) ShareShare
ReportReport
Posted on by 30

Hi everyone! 

I need to add another data provider as a data source to model mapping for Sales Invoice printout. I had one that we used when we printed all invoices with SSRS and it was a class defined as below (where X is an example prefix):

[SRSReportParameterAttribute(classStr(SalesInvoiceContract))]
public class XSalesInvoiceSummaryDP extends SrsReportDataProviderBase

It did work great in SSRS as it was included as a DataSource on the report. Now when I try to include it in model mapping as an object data source (as original SalesInvoiceDP is being referenced there as an object) with SRS attribute support option selected I can't seem to get it to actualy run. ProcessReport, init, construct and nothing like that is being called when I attach the debugger.

I have created a dummy data provider that extends SrsReportDataProviderPreProcess to no avail, now I'm trying with extending SalesInvoiceDPBase but before I'll get my results I'd like to ask if you can point me to the right direction.

So my question is: how to properly create a class that will be used as a data provider for ER report (I'm experimenting on Sales Invoice, but I think that isn't important) and in a way that it will be used in proper context (in my case in the context of a particular customer invoice)?

I have the same question (3)
  • WillWU Profile Picture
    22,361 on at

    Hi Janusz,

    Are you focusing on electronic report?

    Please have a look at this DOC:

    docs.microsoft.com/.../general-electronic-reporting

  • Janusz Chalimoniuk Profile Picture
    30 on at

    Hi Will!

    Thank you for your answer.

    Yes, I'm focusing on Electronic Reporting. I've seen those docs and I believe I've read it all, but something may have skipped my attention. Is there any particular place in those docs you're refering to?

  • WillWU Profile Picture
    22,361 on at

    Hi Janusz,

    Electronic report is different from SSRS report, it doesn't need to use RDP class, you even don't need to code it.

    Please tell us what is your requirement so we can help you.

  • Verified answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hi Janusz,

    For some reporting / electronic reporting scenarios the reference and use to a class can make sense.

    Yet, there is not much documentation around this specific issue, which means that you can either

    (a) try to make this on your own by doing a lot of testing and experimenting, or

    (b) by getting the MS support involved, or

    (c) that you try to find the respective data sources in the available tables in D365FO in the ER designer.

    Personally, I would always try (c) first because that's the easiest and fastest way.

    There are also standard sale invoice templates that you can download, use and investigate from LCS; meaning that you can either use them directly without reinventing something or that you can have a look at them how they designed to report to improve your own design.

    Hope this helps.

    Best regards,

    Ludwig

  • Janusz Chalimoniuk Profile Picture
    30 on at

    Hi Ludwig,

    Thank you for your answer.

    As for reasoning why I even tried to use another data provider I have only one answer: we already had it done for SSRS printouts of sales invoices and we wanted to reuse it in ER. Of course we can turn it into an extension of a standard data provider or even recreate logic in it as direct table connections in ER model mapping, but first I wanted to make sure there is no "simple" way of reusing it.

    My thoughts were: if ER is able to use standard data provider, that was previously used (and still is) in SSRS report and we were able to add another - custom - data provider in SSRS report, then maybe it will be easy to do the same in case of ER. Not so much, as it seems.

    In the mean time I spent some time on debugging the process running an ER-driven printout and what I came to realise, is that:

    1. Data provider used is passed in a contract waaaaaaaay back in SSRS-related implementation

    2. Then, in one point in the process there is a simple "if" statement that splits code paths between SSRS and ER processing

    3. In SSRS processing query builder related data providers are taken into consideration and are properly provisioned with contracts and called with processReport(), but in ER those seem to be ommited but I'm not 100% sure on that.

    4. Extending standard data provider is still possible if some more elaborate logic is required in a document and not just simple (or even complex, but not to the point of creating custom logic) table binding than that is propably the only way to go.

    Any way, thank you Ludwig and Will for your time and suggestions! :)

  • Dhalia Profile Picture
    14 on at

    Did you manage to create the report?

    What do you mean by "NOT check the 'SRS attribute support' and 'Integration point' check boxes on its properties"?

    How the data should be stored in the report? And where can I find those methods for my business provider?

    At the moment, I have a b2b data provider who is supplying me with the database. I’m not sure if he will help me with the electronic report. That's why I want to learn to do the report all by myself.

  • Janusz Chalimoniuk Profile Picture
    30 on at

    Yes, the most important part is to give the data provider methods that are required by SSRS (and to decorate them accordingly) to prepare the data for the report and then to include it in the model mapping as a class object and to NOT check the 'SRS attribute support' and 'Integration point' check boxes on its properties (at least that's what worked for me).

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 660 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 291 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans