Newlines in JSON data for DOCX reports

Currently, if I select the data from the database, with newlines (Chr(13)), in the text and place it on a DOCX template, it will split the lines up, as expected.
This was fixed by the patch to the Docxformatter class.

However, if I pass in a JSON string where the text fields contain “\n” or “\r”, and place the field on the DOCX template, it will NOT split the line up. All the “newlines” are replaced by spaces.

Is there a correct way to define newlines in the JSON string that is passed into the report parameter, so that it will cause the line to be split up accordingly, in DOCX templates ?

Sorry. I found the issue. I need to use “\r” instead of “\n” to force the newlines and lines to be split up in DOCX templates.

1 Like