I am attempting to find out what is causing certain (MorphX) reports within our AX 2009 environment to print with extra blank zero-width columns.
The appearance of these columns seems to occur over time, and do not seem to be tied to any changes with the report itself. I've been able to trace the problem to HTML formatted reports, where the HTML generated looks something like this:
<tr>
<td colspan="1" style="text-indent: 0px; font-family: Arial; font-weight: 400; font-size: 9pt; color: #000000; text-align: right" nowrap>SO-0043355</td>
<td WIDTH="0.0%"></td>
<td colspan="1" style="text-indent: 0px; font-family: Arial; font-weight: 400; font-size: 9pt; color: #000000; text-align: left" nowrap>00041891</td>
</tr>
In the above example, there is one such column. Normally, we save these files with a .xls
extension, and when Excel then opens the file it automatically formats the report into a cell-based layout. These extra td
tags are not set to a zero or hidden width but instead the default Excel cell width. These extra columns cause users to spend a considerable amount of time to clean them up prior to being able to work with the data.
Additionally looking at the raw HTML, I'm finding certain cells have different colspan values. In one case, the same information is repeated, and one cell has a colspan of 2 while the other has a colspan of 1.
I've attempted to recreate the reports, using the simplest data source possible and the most basic design, but the problem still occurs.
I cannot seem to find any pattern to what reports will have this column and which will not. A report will print perfectly one day (without the extra columns), and the next will have these extra columns. Once they do the columns it seems we cannot get rid of them. No code changes occur near this time. In some cases we have no changes made to the report for months prior to seeing this occur.
I don't know where to look for the code that generates this HTML, which I think would answer many of the discrepancies I've seen. I've attempted to search for it, but it seems to be deep within the core kernel, which we do not have access to view or modify.
Are there any leads that may shed some light as to why this happens, and how we may be able to fix it?
After some interesting testing, it seems this problem is related to KB2934938, which we installed about 4-5 months ago. Using a test VM, I applied each of the AX updates we have (SP1, SP1 Rollup 6, KB2934938) without changing anything else and running the report after each upgrade was complete. We do not see the empty columns until after the KB2934938 patch is applied.