Skip to Content

Crystal Report

In my detail section I have a text field where cangrow = true, I have also a field with numbers (currency). I want the numbers to be in line with the bottom row of the text field - is that possible?

like this:

Assistance with
designing a new report 1 000:-

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    May 31, 2017 at 12:37 PM

    One of the 3rd-party Crystal Reports UFLs listed here provides a function that returns the height of a wrapped text given its width, font, font size, and style. This allows you to shift another text down by prefixing it with blank new lines until it matches the height of the first text. Here's an image of a demo report demonstrating this technique.

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 11, 2017 at 11:27 AM

    Place the two fields into a single text box and set that to can grow.

    Ian

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 12, 2017 at 08:37 AM

    You can create a formula which concatenates the fields and uses HTML tags to justify two fields as you want.

    Then format text field on paragraph tab select Text interpretation as HTML.

    I am not an html developer so will be something like this, however, this puts number on line below.

    '<p align="left">'&{TextField}&'</p><p align="right">'&totext({numberfield})&'</p>'

    Ian

    Add comment
    10|10000 characters needed characters exceeded

    • I have tried with HTML - but it did not work - in CR <td> table is not working.

      Now I tried with the CSS below which I have put in a formula - but it does not work . Is there any other way to solve this?

      '<html>' +
      '<head>' +
      '<style>' +
      'div' +
      '{' +
      ' width: 100%;' +
      '}' +
      'div.text' +
      '{' +
      ' display: inline-block;' +
      ' width: 75%;' +
      '}' +
      'div.belopp' +
      '{' +
      ' position: relative;' +
      ' bottom: 0;' +
      ' width: 20%;' +
      ' display: inline-block;' +
      ' text-align: right;' +
      '}' +
      '</style>' +
      '</head>' +
      '<body>' + '</head>' +
      '<body>' +
      '<div>' +
      '<div>'

      + {FakturaRader.Text} +
      '</div>' +
      '<div>'
      + totext({FakturaRader.Belopp}) +
      '</div>' +
      '</body>' +
      '</html>'