onsdag den 29. marts 2017

Dynamics ax 2012 SSRS reports RDP Changing Query

I have used a bit of time this morning trying to figure out how to change the query in an RDP based SSRS report.

I needed to change the report from using a query JmgPaySpecification to using the query JmgPaySpecificationExt instead.

I started out by changing the

    SRSReportQueryAttribute(queryStr(JmgPaySpecificationExt))

attribute in the classdeclaration of the RDP class and compiling it.

Then I went to Visual Studio, opened the report and doing a rebuild on it to get it refreshed in the AOT.

However that didn't seem to change anything, and doing a find on the SSRS-report searching all nodes and searching for JmgPaySpecification revealed:


So doing the above changed nothing.

The solution is, to go into Visual Studio opening the report:

1. Go to Datasets and highlight the Dataset
2. Change the Data Source Type from Report Data Provider type to Query.
    This clears the Query setup.
3. Change the Data source Type back to Report Data Provider.
4. Go to the Query field and choose the (new) query and the choose the fields. (In my case the Query     JmgPaySpecificationExt).
5. Build.
6. Leave VS (not saving the report model).

Going back to the AOT and doing refresh will reveal that the SSRS report has been rebuilt.
Repeating the find on the SSRS-report searching all nodes and searching for JmgPaySpecification revealed:


Which is what I wanted.

Also remember to deploy the new SSRS-report to the reporting server by Right-clicking on the report in the AOT and choosing Deploy Element.



Ingen kommentarer:

Send en kommentar