Friday, 4 October 2013

NextReports Designer: Hidden Gems

Today someone needed to add a line break inside an expression, and to see the result inside different formats like HTML, PDF, RTF, EXCEL.  This means the line break must be considered even if the column width is big enough to fill the entire text on a single row, so "wrap text" property is not useful in such situation.

For HTML , adding a simple <br> tag does the trick. An expression like

$C_First_Name + "< br >" +  $C_Last_Name

will show the expression from a cell with the needed line break:

But for other formats like PDF, RTF and EXCEL the solution was not so obvious. Trying with "\n" had no effect. The needed character was the unicode representation for line feed: "\u000A":

$C_First_Name + "\u000A" + $C_Last_Name 

This works for all three formats:

1 comment:

  1. Great Article android based projects

    Java Training in Chennai

    Project Center in Chennai

    Java Training in Chennai

    projects for cse

    The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training