address data print new line

  • My address data return on the pdf report like below.

    No 99, street1\r\nstreet 2.

    i would like to print to new line. i tried write a function to replace the \r\n to <br />.

    function replace(value){
    var result = value.replace(/\r\n/, "<br />");
    return result;

    but it return No 99, street1<br />street 2 instead print new line.

    anyone can help? I want the address to show like below

    No 99, street1

    Thanks in advance

  • The replace function seems good solution. You perhaps just need to use triple brackets to avoid handlebars html escaping


  • Hi,

    Thanks for the reply and your solution working perfectly!!!! thank you and appreciate that

Log in to reply

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.