Report layout property exceeds maximum length

Properties
PC0032 Error Design Code Fix Ignore Obsolete

The Caption and Summary properties on report layout blocks (rendering > layout) are stored in database fields limited to 250 characters. The AL compiler does not enforce this limit, but Business Central fails at runtime when a user opens the Report Layout Selection page:

The length of the string is N, but it must be less than or equal to 250 characters.

The check applies to both report and reportextension objects. Shorten the property value to 250 characters or fewer.

Example

report 50100 MyReport
{
    DefaultRenderingLayout = MyLayout;

    rendering
    {
        layout(MyLayout)
        {
            Caption = 'This is a very long caption text that exceeds the maximum allowed length of two hundred and fifty characters in the Business Central Report Layout Selection page causing a runtime error when any user tries to open or select this specific report layout'; // Report layout property exceeds maximum length [PC0032]
            Type = Word;
            LayoutFile = 'MyReport.docx';
        }
    }
}

Shorten the Caption (or Summary) to 250 characters or fewer:

report 50100 MyReport
{
    DefaultRenderingLayout = MyLayout;

    rendering
    {
        layout(MyLayout)
        {
            Caption = 'My Report - Standard Word Layout';
            Type = Word;
            LayoutFile = 'MyReport.docx';
        }
    }
}

See also