How to Add Additional Data to a Query Based Report

You can take a classic SSRS approach to add additional data to a SSRS query-based report, which means extending the report query as described in MS documentation.

However, there is another so-called Docentric approach, by using a custom DSP class. However, there is a difference between adding additional data to RDP- (Report Data Provider) based reports and query-based reports.

Namely, you need to override the addAdditionalDataFieldsForQueryRecord() method instead of the addDataFieldsForRdpTableRecord() method which is used for RDP-based reports.

Another difference is that when adding additional data via the addAdditionalDataFieldsForQueryRecord() method, there is no option to remove fields you don’t need.

Let’s take a look at Work report (WHSWork.Report) and how we can add additional data using Docentric approach.

You can find many other examples in Docentric SSRS Replicas.

See also

Data Source Generation Options Specifics for Query-Based Reports >>
Example: Query-Based Report Customization >>
Training Lab: Query-Based Report Customization >>

IN THIS ARTICLE