Thursday 9 April 2015

Access 2010 - Report text truncated when exported to text file

I have an MS Access report that looks fine in View mode and exports as a PDF with no problems but when exported to Text file some of the text gets truncated. When viewed in vim it seemed like the truncation was happening at the 140 character mark with a newline added and some characters missing before the rest of the text continued on the next line.

Very strange.

Did a google search and found nothing useful.

The fact that the truncations were all at the 140 char mark seemed weird but seemed to point to a width issue. So I made the report wider and increased the width of the text boxes. Problem has resolved with the text now displaying as expected and newlines being added in sensibly at word breaks in the text.

My guess: page setup was using landscape mode, report width well short of landscape width and so text was hitting the report width before the page width and the text wrapping algorithm wasn't kicking in in time and so a brute-force linebreak was happening. Increasing the report width to be in alignment with the landscape width is now allowing the text wrapping to work as it should.