Tuesday, 30 October 2018

Refreshing code changes in reports objects in SSRS

When working with the reports' objects (be that one of the controller, contract, data provider classes, the query, or the table, temp or regular) sometimes it happens that the changes done are not properly reflected in SSRS.

The first item that I want to make clear is that for the reports you do not need to run the generate CIL (be that full or incremental) when doing changes in the above objects. It is a misconception that doing this will fix any problems with the SSRS, and not doing this will save you the time of waiting for it. Of course, there is the time when the reports are not running all together, but that is when the system services are not properly running to serve information regarding the session, query, or metadata.

With that in mind, you have the following items to perform:
1. if you are on R3, you have the Tools -> Caches -> Refresh report server;
2. also, do a Tools -> Caches -> Refresh elements and Tools -> Caches -> Refresh dictionary;
3. if you have an AOT query, you can do a Restore on the query;
4. open the report in Visual Studio, and perform a Refresh on your dataset in the Datasets node;
5. also in Visual Studio perform a rebuild and a deploy of the report;
6. before step 5. you can check that the parameters you have for your report are the proper ones (if you've changed the data contract or the query);
7. depending on the decision to load the last values (controller.parmLoadFromSysLastValue) you want to do a Reset usage data;
8. and last but not least, you want to do a Restore and then also a Deploy element on the report in the AOT.

You should view your new changes now (in the dialog prompt or the report).

Monday, 22 October 2018

AX2012: Error when downgrading the AX server kernel

Description:
 It can happen that you need to downgrade the AOS kernel in a system. Depending on the build you are going back to, you might get an error message.

Error message:
Object Server 01:  Fatal SQL condition during
login. Error message: “The internal time zone version number stored in the
database is higher than the version supported by the kernel (4/1). Use a newer
Microsoft Dynamics AX kernel.”
Solution:
You need to change the value for the column value SYSTIMEZONESVERSION in the table SQLSystemVariables. If you look in
the event viewer you can see that it finds the value 4, but expected 1 (4/1).
So the solution is to change the value to 1.