Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
A few questions about BIRT capabilities
Aurelien78
Hi,
I'm currently working on a report design, and i have some questions.
For information, i'm passing columns dynamically, so i can never know whenever a column will be the first one or event if it's going to be in the report ... And also, i'm using BIRT 2.3.
Having said that, my questions :
- Is it possible to fix the column width, i mean different width for different columns ?
- My Excel reports are not right : i have huge marges, is this a bug, or can it be set when generating the report (i mean, outside Excel) ?
- At the end of pages, sometimes the cells are cut (the end is on the next page). Is there a way to specify that cells are not to be cut ?
- Some headers have their text cut too ... is there a way to specify that the text continues on the next line ?
- is there a way to change text alignment for some columns ?
- Is there a way to specify a different rule for sorting data, for example if my column contains ab1, ab4 and ab10, they should be sorted like this.
- Is there a way to not expand the columns too much if my array doesn't contain a lot of columns ? i mean, have a max size for columns
- It's not really design, but is there a way to have a preview when passing a datasource (i'm not using the plugin)
I think that's it!
Sorry if the answers are obvious, but i'm a BIRT newbie ...
Thank you for your help
Find more posts tagged with
Comments
mwilliams
Hi Aurelien78,<br />
<br />
I didn't catch if you were using the designer or not, but you can change the width of each column in the property editor or through script.<br />
<br />
In your question about your Excel output, are you saying you have large margins? Can you provide a screenshot so I know exactly what you're talking about?<br />
<br />
In BIRT 2.5.0, the option to avoid page breaks within a cell was reintroduced. If you can upgrade to this version, you shouldn't have the problem of cells split between pages.<br />
<br />
You can create a custom report element to rotate text as seen in the following devShare post:<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/devshare/designing-birt-reports/537-birt-extension-mechanism/#description'>BIRT
Extension Mechanism - Tutorials - BIRT Exchange</a><br />
<br />
Let me know if you have any questions.
Aurelien78
Thank you for your answer.
I'll try to give you a capture of my Excel report as soon as possible. My margins are indeed quite large : whenever i create the PDF vesion it's OK, but if i use Excel, then all the data cannot fit.
About BIRT 2.5, i read it's not easy to upgrade from 2.3 to 2.5, but i don't exactly know why ... can you confirm that ? I'm under Eclipse 3.4 and i'm developping an RCP product. I understand i should use 3.5 if i want to use BIRT 2.5 ?
My question about the header text wasn't clear. I meant that the text is cut because all columns have equal width right now. In fact, when there are several words, it does split on more than one line.
And about the designer, i'm using BIRT RCP designer to create my templates, and then directly the birt engine from within my java code.
mwilliams
Aurelien78,
The best way to determine whether upgrading to 2.5 will be an issue for you will probably be to download a copy of the new designer and copy some report designs in from 2.3 and see if you have any issues.
Aurelien78
OK then, i'll do that and keep you informed !
Thanks again
Aurelien78
Hi
I didn't have time to test BIRT 2.5 yet, but here is the Excel generated by BIRT. As you can see, margins are really large, and some columns end up being on a second page ...
What about my sorting problems ? is there maybe a more appropriate forum to post ?
Thank you !
Aurélien
mwilliams
Aurélien,
I believe that if you sorted a character column of ab1, ab2, ab10 in ascending fashion, you'd get ab1, ab10, ab2. The best way to sort something like this would be to create a computed column that would assign the actual integer values 1, 2, and 10 to these rows as well. Then, sort on the new computed column to get ab1, ab2, ab10.
Hope this helps.
mwilliams
Aurélien,
As for the margins, what are you setting the margin value to on the master page? Also, are you setting widths for your columns?
Aurelien78
that's exactly my problem.
But i'm not sure i understand what you mean, tell me if i'm wrong but what you're suggesting is that i create a fake column, then sort on that column ? (even it it's not visible ?)
One more thing, i don't think i mentionned it but, my columns are dynamic : position and availability. Is that a problem regarding the solution you posted earlier for the width problem ?
Thanks
Aurelien78
<blockquote class='ipsBlockquote' data-author="mwilliams"><p>Aurélien,<br />
<br />
As for the margins, what are you setting the margin value to on the master page? Also, are you setting widths for your columns?</p></blockquote>
<br />
I'm not setting a column width, but i'm going to (the only problem i still have there is that i have no way to know what my column represents since i pass the column list from my code).<br />
<br />
I'll check it out for margins, but i don't think i put any particular value for them.
mwilliams
Aurélien,
Yes, I'm suggesting creating a new column that won't show in your report that in some way grabs the integer value off your string and you can sort on that since there will be a value associated with every row.
Aurelien78
OK, i'll do that for my sorting problems, thank you.
Now, about the margins, it's set to 0.25in for the template.
And it works correctly for PDF output
mwilliams
Aurélien,<br />
<br />
If the margins are set to a small amount and they work with PDF and not with XLS, it must just not be set in Excel by the XLS emitter. Not sure if 2.5 is any different in this. I'll have to check. There is also an XLS emitter by Tribix that you could try to see if it solves any of your issues with the XLS output.<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/devshare/designing-birt-reports/33-tribix-extended-emitters-for-birt/#description'>Tribix
- Extended Emitters for BIRT - Designs & Code - BIRT Exchange</a>
Aurelien78
OK, so if i use larger margins, it may be OK with Excel is that right ?
I've tried Tribix but i couldn't manuallay modify the report easily afterwards...
mwilliams
Aurélien,
I would imagine that if you designed your report around the standard margins in Excel, that it'd work out for you the way you're wanting. I don't know that for sure, but I don't see why it wouldn't.
Aurelien78
I see what you mean.
I don't think margins can be set dynamically depending on the output format though, am i right ? Or i didn't see it
mwilliams
Aurélien,
I'm not sure the margins are applied to the XLS output, otherwise, I think that setting the margin dependant on output should be possible. I'll have to look into this.
Aurelien78
OK i tried using a different margin value for Excel, and with 4cm left and right margins, my output is correct ...
If you have a clue on how to set margins only for Excel documents, don't hesitate to tell me, I'll look around by myself to see if I can find something
mwilliams
Aurélien,
If I find out a newer version of BIRT actually sets the margins in Excel, I'll let you know.
Let us know whenever you have questions.
Aurelien78
Thank you for your help !
I think i'll try this week end for BIRT 2.5
Aurelien78
Hello again !
I've not tested yet birt 2.5, but my sorting problems are resolved, and my column width problem will be OK soon (I used the API).
I have juste one more question, about styles : i'd like to set text alignment for each column depending on its "type" (it's not as simple as text, date or integer).
I'm wondering if it is wiser to use the API or a script (i mean, define styles inside the template, and use them directly from my java code ?)
What would you recommend ?
Thank you
Aurelien78
Hello everyone !
I finally went for BIRT 2.5 and all my problems are now resolved, except for Excel margins, i was forced to cheat ...
Now i'm facing another problem, which seems to be a BIRT 2.5 matter : if i don't create a table wide enough (with enough columns in fact), and even if i have specified a 100% width for this table, it does not take all the space ... even worse, some text inside the columns is truncated !
Is this a bug, or do i missed something here ?
I also have another problem regarding localization. My .rptdesign files are inside a jar, and so is my properties file. BIRT apparently can't find this properties file. What am i doing wrong ?
Thank you !
mwilliams
Aurélien,
Are you setting a width on the columns? Or are you only setting the 100% table width?
Aurelien78
I'm setting a width only on some columns, using the API.
Should I set a default width for all of them ?
Aurelien78
OK, setting columns width to 100% made the trick !
My only problem left is with internationalisation ...
I tried using the setResourcePath, but it still won't work with the properties file inside the .jar...