Skip to Content
0

Crystal Report

Apr 11, 2017 at 11:23 AM

178

avatar image

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

10 |10000 characters needed characters left characters exceeded
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.
0
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Ian Waterman Apr 11, 2017 at 11:27 AM
0

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

Ian

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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.

0
Ian Waterman Apr 12, 2017 at 08:37 AM
0

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

Show 1 Share
10 |10000 characters needed characters left 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>'

0
Ido Millet May 31, 2017 at 12:37 PM
0

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.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thanks ! this solved my problem.

0