cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Report

Former Member
0 Kudos

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:-

Former Member
0 Kudos
Is there any other solution to this? As you can see I have tried both HTML and CSS, but as Crystal do not accept all HTML and CSS code, it does not work.

Accepted Solutions (1)

Accepted Solutions (1)

ido_millet
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

Thanks ! this solved my problem.

Answers (2)

Answers (2)

Former Member
0 Kudos

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

Former Member
0 Kudos

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>'

Former Member
0 Kudos

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

Ian

Former Member
0 Kudos

Thanks for your answer!

But I want the text field that can grow to justify left and the number right justify. It is an invoice and the numbers must be in the same position to the right.