I use report addon to generate documents from DOCX template.
I have some fields that are “comments” including newline.
All are good in the application, textArea save newline and display newline.
But in a docx report the same field will display its content without newline…
How can I correct this ?
I’m looking for a global solution, I have more than 1000 fields…
You can try to implement you own custom ContentInliner to support newline for current values.
You will also need to register new ContentInliner - override existing bean JmixInlinersProvider (declared in ReportsConfiguration) and add custom ContentInliner:
@Primary
@Bean
public JmixInlinersProvider inlinersProvider(FileStorageContentInliner fileStorageContentInliner, CustomContentInliner customContentInliner) {
return new JmixInlinersProvider(fileStorageContentInliner, customContentInliner);
}
And in report you will need to apply formatter related to new ContentInliner.
We are facing the same problem using JMIX version 2.5.2, We are using the report addon and we are struggling to send a new line inside a string variable, is there any forecast when this issue will be solved? If not so, would you be so kind to provide a bit more details about the ContentInliner workaround, I was not able to fully understand this option with your comments.