crystal-reportscrystal-reports-2008

Add blank line between paragraphs in Crystal Reports Formula Field


In my report, I have a parameter that I use to pass some configurable text stored in a database to the report. This text then gets displayed on the report.

I want that text to include some basic formatting (i.e. bold, italics, centering, etc.). To accomplish this, I place the parameter on the report and format it as HTML. The text then includes HTML tags that accomplish the formatting.

This all works until I want to include a blank line between paragraphs (i.e. "double spacing"). In HTML I would add multiple <br/> tags. However, Crystal Report only interprets that as "single spacing".

If I switch the display mode from HTML to none, and replace <br/><br/> with chr(13)+chr(13) (plus a few changes involving a formula field -- it won't work with the chr(13) just embedded in the incoming text), I do get my "double spacing" between paragraphs. However, I then lose the ability to include any kind of text formatting within the paragraph.

Is there a way to force a "double space" between paragraphs dynamically in Crystal Reports and still retain the ability to dynamically format portions of text?


Solution

  • So I was able to accomplish this by replacing the use of <br/> with:

    <p>&nbsp;</p>
    

    Kind of a pain, but it works.