2006 IR Open Discussion Posted August 18, 2006 Share Posted August 18, 2006 By: Erich Kilmer - ekilmer Why can't JR do a border around text in HTML? 2003-03-18 05:39 Just trying to understand why JR can't do a border around multiple text elements in HTML. Since most structuring in HTML is done in <table>s why is it that an attribute can't be converted over to border=1? I am sure that there is more to it and I probably over simplify it. If there is a way to do this, would someone please post a code snippet. I can understand why HTML can't do more advanced shapes but a border around a few rows with multiple cells is pretty basic. TIA By: Giulio Toffoli - gt78 RE: Why can't JR do a border around text in HTML? 2003-03-18 07:45 HTML exporter shipped with JR not support rectangle. Giulio By: Teodor Danciu - teodord RE: Why can't JR do a border around text in HTML? 2003-03-25 14:08 Hi, Text elements in JasperReports do not have a border of their own. At first, I was tempted to say: "We'll add one." Some sort of a "pen" attribute in the <textElement> tag. But then things are more complicated as only <graphicElements> have the ability to stretch based on the "stretchType" attribute and without that text elements will still lack flexibility when it comes to accommodating their size based on other elements size. So let's just stay where we are and say that when it comes to border around elements, you should always use either rectangles or horizontal and vertical lines. And this is when the HTML problem intervenes. The current HTML exporter simply ignores lines and rectangles. But the new one, which I'm preparing these days, will at least know how to handle horizontal and vertical lines and rectangles as long as they do not overlap with other elements. With this approach, the solution that employs rectangles to draw the border will still remain out of the question as it would imply that the text elements overlap the rectangle. But if you use lines to draw the border around, then starting with the 0.4.6 version, it will also work in HTML and XLS format. Thank you, Teodor By: Erich Kilmer - ekilmer RE: Why can't JR do a border around text in HTML? 2003-03-18 10:19 OK. Well if you ever are looking for nice features to add you might consider adding a way to put a group box around multiple rows of text. Thanks! By: Teodor Danciu - teodord RE: Why can't JR do a border around text in HTML? 2003-03-25 14:13 Hi, I agree. But the problem is that HTML border does not even behaves the same way across different platforms and different browsers. Until then, the new version will bring an enhanced HTML exporter that would know how to treat at least horizontal and vertical lines, as well as rectangles. The only condition is for the elements to not overlap. We cannot have overlapping elements in HTML, at least not without the intensive use of CSS. But CSS compatibility is another sad story. So, if you'll use horizontal and vertical lines to put border around your elements, beginning with the next version, they will also appear in HTML. Thank you, Teodor Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now