Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI displays long numbers in 2 lines #1501

Open
mcgrady32303 opened this issue Nov 20, 2023 · 4 comments
Open

UI displays long numbers in 2 lines #1501

mcgrady32303 opened this issue Nov 20, 2023 · 4 comments

Comments

@mcgrady32303
Copy link

mcgrady32303 commented Nov 20, 2023

This is an annoying issue personally with BIRT 4.5.0 - I don't know if this is already fixed in the source.

When generating reports,BIRT will display long numbers in two lines. Refer to the picture below:
LongNumber

JasperReport can cumstomize Text Field's attribute(Stretch Type、Position Type...).

Hope BIRT can add the feature.

@hvbtup
Copy link
Contributor

hvbtup commented Nov 20, 2023

You can customize the style in BIRT as well - using either highlight rules or onCreate events and this.getStyle().xxx = "...".
But for me this doesn't make sense; usually you want the numbers to be aligned; which doesn't work if you use different fonts settings for each line; except if you determine the longest text (largest number) in the column before and use that to determine a style for each cell in the column.

@speckyspooky
Copy link
Contributor

Have you a special way to produce the numbers. I tested a small example with fixed numbers on a data element
and created a small test with 2 grids and 5 different long numbers formatted with the standard designer number.

But I cannot reproduce your case - see my screen.
Do you use "text" or "dynamic text" to produce your grid/table?

figures

@mcgrady32303
Copy link
Author

mcgrady32303 commented Nov 24, 2023

Have you a special way to produce the numbers. I tested a small example with fixed numbers on a data element and created a small test with 2 grids and 5 different long numbers formatted with the standard designer number.

But I cannot reproduce your case - see my screen. Do you use "text" or "dynamic text" to produce your grid/table?

figures

thx for your reply.

sorry,I made a mistake.

The problem is that a long number will not be displayed completely. Just like below:
1

The value is 123456789000, but the report generated displays 123456789.

Because each column of the table has a fixed width, then if the number is longer than the width, the excess part of the number will be obscured.

If long number could display in multiple lines with fixed width columns, the problem is solved.

Maybe I donot use birt in the right way, thx for your guidance.

@mcgrady32303
Copy link
Author

Follow with the previous comment.

Long numbers could display in multiple lines, but I should specify the number of character where I put a 'Enter'.

The code is : fun.putEnter(dataSetRow['Value'], 9) .

If I get lots of reports, and each report gets lots of columns(fixed width), then I have to write the 'putEnter' code for every column.

If Birt could display long numbers in multiple lines automaticly, I will save a lot of repeated/trivial codes. And if I modify some columns of a table, perhaps, I got to calculate and rewrite the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants