viernes, 18 de julio de 2014

Export to Excel Error

There are multiple reasons for failures when exporting to Excel from AX 2012.  It's difficult to detect the reason why as it's part of the system, however there is a forum post that details a few reasons as to why the failure may occur.

Today I found yet another.  We had a strange 'empty' column in the PurchLine (Purchase order lines) form.  It was a field that ended with '_MX' and assumed it to be Mexican functionality.  We just changed the control's visibility in the form and the export to excel worked without problems.

Excel Export Error
Perhaps the omission was at the table field level, however, and we should have added MX to the CountryRegionCodes list.  The Base Enum 'VendorOperationType_MX' DOES have the Country Code applied, however.

viernes, 11 de julio de 2014

AX 2009 PDF conversion

Converting our finely honed AX 2009 report to PDF produces a number of formatting differences.  The worst 'error', if you're an accountant, can be the lack of bold text in parts of the report.

AX 2009 Report

AX 2009 Report, exported to PDF
The solution is simple, by embedding the font into the PDF.  This can be done manually
(Image stolen from Gerrit's AX blog, see link below) 
To do this via code is also trivial change:
Use the PDF_EMBED_FONTS option

Our end result in PDF is pretty good...  But they may ask me to move stuff around by 1 mm once more...  Ye gods!

Finally, in AX4.0 SP1 there is a small bug that when changing to this option where you may lose the .pdf file extension.

miércoles, 9 de julio de 2014

Microsoft.Dynamics.Performance.Reporting.Security.EvaluationPeriodExpiredException: Evaluation license period expired.

Error:


Event viewer:

Solution:
Restart Sql Server Reporting Services
Edit: Also check that both the Managerment Reporter Process and Application services are Instanctiated...

lunes, 7 de julio de 2014

Backup and restore MorphX Version control II (AX 2009)

I refer you to Shashi's excellent post about how to set up version control with MorphX, when it is necessary to restore the production database over the development one, for example.

It worked for me!  I can't live without version control, and don't understand my colleagues when they don't activate it.

The only addition that I would make is that if Step 5 can't be done because there are no SYSVERSIONCONTROLMORPHXREV2543 rows in the systemSequences table, use the following database inserts to create the dummy rows and THEN execute step 5.

INSERT INTO [SYSTEMSEQUENCES]
     ([ID],[NEXTVAL],[MINVAL],[MAXVAL],[CYCLE],[NAME],[TABID],[DATAAREAID],[RECVERSION],[RECID])
     VALUES
     (-1, 5637144826, 1, 9223372036854775807, 0, 'SEQNO', 2541, 'dat', 1, -1)
GO
INSERT INTO [SYSTEMSEQUENCES]
     ([ID],[NEXTVAL],[MINVAL],[MAXVAL],[CYCLE],[NAME],[TABID],[DATAAREAID],[RECVERSION],[RECID])
     VALUES
     (-1, 5637144826, 1, 9223372036854775807, 0, 'SEQNO', 2543, 'dat', 1, -1)
GO

viernes, 4 de julio de 2014

White or no text appears in the PDF generated file from an AX 2009 report

Below is the report in the AX 2009 viewer. All good....

...Producing what is apparently an empty report when converting to PDF. Here I have selected the text so that it is highlighted in blue.

The solution that I have found is to move the shapes in the report to the top of the control list.  We presume that they are therefore rendered first.  Below I have already moved one box control , highlighted in yellow, up to the top.


There is a downside to this, however. Now when we print the report in the AX views we can see the text overwriting the borders.  It looks good in PDF format, but we have some micro management to do here, moving controls down or across a half a millimetre.  It's a time sink producing little value, but it must be done.

I find that when working with multiple shapes overlaying each other, it's a good idea to change one of their border colours.
We're nearly there!  There last changes can now be made by simply moving the second string control above the first.

Next time as soon as I see that the Analyst has drawn lines on an AX 2009 report, I'll be adding 2.5 hours to my estimation.