TL3: Enhance a Query Based Report

Welcome to Training Lesson #3 | Download Training Lab Resources

Exercise 1: Enhance only the design of the query based report

  • Register the Customer base data report report (CustBaseData.Report) as a Docentric report. The report's location: Accounts receivable -> Inquiries and reports -> Customers -> Customer base data report.
  • Generate the DDSP file using the Generate DS print destination.
  • Design a Docentric template using the generated DDSP file and assign it to the report in Docentric report setup.
  • Run the report from D365FO.

Exercise 2: Adding additional data

  • We can do it in the standard way, using the original report artifacts (i.e. the report query), or, take the following steps - this is so called Docentric approach.
  • Create a custom DSP class for CustBaseData.Report: DTCustBaseDataReportDSP. You can use this VS DSP class template.
  • Remove all methods except the description(), preRunGenerateDS() and generateXmlDataSource().
  • Override the following two methods:
    • addAdditionalDataFieldsForQueryRecord()
    • onSelectedQueryRecord()

    and put breakpoints within each method to understand the report execution pipeline.

  • TASK #1: In the generateXmlDataSource() method export generated XML to a string or a file to check the resulting report DS (data source): _recordBuilder.exportToXmlFile('CustBasedataDs.xml');
  • TASK #2: Add additional data to the currently selected record of a query data source in the addAdditionalDataFieldsForQueryRecord() method.
  • TASK #3: Append additional data to the end of the report DS in the generateXmlDataSource() method.
  • TASK #4: Include display methods of all query data sources from the report DS in the preRunGenerateDS() method.
IN THIS ARTICLE