Field Length stored in document is incorrect

I am receiving the above error message when creating a new document in a customised Notes application. I have traced the problem to a CFD (Computed for Display field), which inherits its value from a field which performs an ODBC lookup to SQL Server to retrieve a numeric value. I can however open existing documents, edit and save them without error.

When I use the same formula in a CTF (computed text field) and remove the CFD field the form behaves okay. However using any computed fields causes the same error.

This application is being ported from Notes 5.x to Notes 7.01 and I’d really like to understand the problem rather than just make it a CTF and ignore it.

I have completed a Compact and a FixUp over this database without errors being reported.

Can anyone help with this problem?