# html (fields) and borders

**URL:** <https://forum.servoy.com/t/html-fields-and-borders/798>\
**Category:** Classic Servoy\
**Created:** [December 2, 2003, 4:37pm UTC](https://forum.servoy.com/t/html-fields-and-borders/798 "2003-12-02T16:37:11Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)\
**Post date:** [December 2, 2003, 4:37pm UTC](https://forum.servoy.com/t/html-fields-and-borders/798/1 "2003-12-02T16:37:11Z")

</div>

I have a html field and I fill the field with, surprising ![:D]( "Very Happy") , html source.

now I have some tables and I want the tables to be bordered. So I use

This should give a 1 pixel border but it doesn’t. The border is 3D and I just don’t want that.

How do I solve this?

---

<div class="post-metadata">

**Author:** ![Harry\_Catharell](https://avatars.discourse-cdn.com/v4/letter/h/e19adc/32.png) [@Harry\_Catharell](https://forum.servoy.com/u/Harry_Catharell)\
**Post date:** [December 2, 2003, 5:38pm UTC](https://forum.servoy.com/t/html-fields-and-borders/798/2 "2003-12-02T17:38:14Z")

</div>

I’m no expert but I think that you forget about the table border and have to use the ‘cellspacing’ property combined with a different table colour versus cell colour as in :

| text1 | text2 | text3 |
| texta | textb | textc |

This table has a border of ‘0’ so none is shown but the cellspacing forces a single pixel gap between each cell so that the table colour of blue will show through.  
Each cell has a background colour of gold so you get the effect of a blue table outline with gold contents.

Colours can be changed to protect the innocent and I am sure that there is better HTML code to do this !

Hope that it helps

---

<div class="post-metadata">

**Author:** ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)\
**Post date:** [December 2, 2003, 5:48pm UTC](https://forum.servoy.com/t/html-fields-and-borders/798/3 "2003-12-02T17:48:40Z")

</div>

Bingo, thank you!

---

<div class="post-metadata">

**Author:** ![maarten](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@maarten](https://forum.servoy.com/u/maarten)\
**Post date:** [December 3, 2003, 8:59am UTC](https://forum.servoy.com/t/html-fields-and-borders/798/4 "2003-12-03T08:59:40Z")

</div>

hmm,  
Normally you can use bordercolordark=“” and bordercolorlight=“” in a TABLE tag to influence the 3D effect of the border.  
However this doesn’t seem to work in the current HTML renderer of Servoy.

So above mentioned looks like a cool workaround.

Thanks Harry.

---

<div class="post-metadata">

**Author:** ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)\
**Post date:** [December 3, 2003, 9:12am UTC](https://forum.servoy.com/t/html-fields-and-borders/798/5 "2003-12-03T09:12:21Z")

</div>

Maarten, that’s indeed what I thought. Therefore that was the background of my question but the workaround Harry suggested works like a charm!

BTW I use this to print. You MUST advertise this more. It makes Servoy a wonderfull printing tool. Very, very powerfull and easy to use!

---

<div class="post-metadata">

**Author:** ![Harry\_Catharell](https://avatars.discourse-cdn.com/v4/letter/h/e19adc/32.png) [@Harry\_Catharell](https://forum.servoy.com/u/Harry_Catharell)\
**Post date:** [December 3, 2003, 10:52pm UTC](https://forum.servoy.com/t/html-fields-and-borders/798/6 "2003-12-03T22:52:44Z")

</div>

Marcel,

Can you give some more detail on how you compose reports using an HTML field, if you have time.

If it is as good as you say then I would be really interested in some guidelines - maybe an example solution…and so, I would assume, would the rest of the list !

It may end up being a good addition to the ‘How To’ forum !!??

Also re : ’ bordercolordark=“” and bordercolorlight=“” ’ - I think that these were Microsoft whims which were not recognised consistently by browsers other than IE so this may be why they slipped by the Servoy HTML rendering engine !!??

Harry

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [December 3, 2003, 10:57pm UTC](https://forum.servoy.com/t/html-fields-and-borders/798/7 "2003-12-03T22:57:05Z")

</div>

Please try to use Stylesheets for all those things.

---

<div class="post-metadata">

**Author:** ![Willem](https://avatars.discourse-cdn.com/v4/letter/w/898d66/32.png) [@Willem](https://forum.servoy.com/u/Willem)\
**Post date:** [November 27, 2007, 10:24am UTC](https://forum.servoy.com/t/html-fields-and-borders/798/8 "2007-11-27T10:24:20Z")

</div>

I like this work-around; very elegant.  
Unfortunately, this does not work on a Macintosh (Java 1.5) as the background does not shine through when the border = “0”.  
Is there anybody who knows how to get thin borders on a Mac?

---

<div class="post-metadata">

**Author:** ![jcarlos](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@jcarlos](https://forum.servoy.com/u/jcarlos)\
**Post date:** [November 28, 2007, 5:47pm UTC](https://forum.servoy.com/t/html-fields-and-borders/798/9 "2007-11-28T17:47:56Z")

</div>

Clearly the HTML field for reporting and printing is the way to go. It is easier than the JasperReport from JasperSoft. This applies, of course, if you don’t need the charting capabilities of JasperReports.

I agree with Marcel. Servoy should advertise this more. Perhaps, Servoy should publish a manual or a paper about how to use this better.

---

<div class="post-metadata">

**Author:** ![jcarlos](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@jcarlos](https://forum.servoy.com/u/jcarlos)\
**Post date:** [November 28, 2007, 5:49pm UTC](https://forum.servoy.com/t/html-fields-and-borders/798/10 "2007-11-28T17:49:33Z")

</div>

In addition, Bob Cusik once demonstrated how using the plugins.textxport and a global HTML field you can create wonderful reports. The example that he first showed us had captions, a couple of paragraphs and a table containing data retrieved. His trick is to export the html text field with the extension “.xls” (Excel) rather than “.html.” Although the file is still an html file, by saving it with the extension .xls it opens in Excel. BTW, Excel renders html very effectively. Bob’s technique is neat and elegant and works better than anything else.

Bob, if you read this, can you please post in the forum the steps to follow to get this working? Could you send the solution that contains this method? This will be really helpful. If you do this, the people that think that Servoy lacks of built-in Reporting Tools will find that their argument is not longer valid.

---

<div class="post-metadata">

**Author:** ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)\
**Post date:** [November 28, 2007, 5:52pm UTC](https://forum.servoy.com/t/html-fields-and-borders/798/11 "2007-11-28T17:52:31Z")

</div>

> Bob’s technique is neat and elegant and works better than anything else.

I disagree ![:)]( "Smile") The Data plugin does the job much better including formatting options etc…

---

<div class="post-metadata">

**Author:** ![jcarlos](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@jcarlos](https://forum.servoy.com/u/jcarlos)\
**Post date:** [November 28, 2007, 6:56pm UTC](https://forum.servoy.com/t/html-fields-and-borders/798/12 "2007-11-28T18:56:58Z")

</div>

> IT2Be:
> 
> > Bob’s technique is neat and elegant and works better than anything else.
> 
> I disagree ![:)]( "Smile") The Data plugin does the job much better including formatting options etc…

What Data plugin are you talking about? Is it the JasperReport? If it is, I agree. It is very powerful but much more difficult to use than creating an HTML/Excel report. It also costs a lot of money.

---

<div class="post-metadata">

**Author:** ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)\
**Post date:** [November 28, 2007, 7:00pm UTC](https://forum.servoy.com/t/html-fields-and-borders/798/13 "2007-11-28T19:00:03Z")

</div>

I mean ours, have a look here: [http://www.it2be.com/plugins.htm#data](http://www.it2be.com/plugins.htm#data)

---

<div class="post-metadata">

**Author:** ![jcarlos](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@jcarlos](https://forum.servoy.com/u/jcarlos)\
**Post date:** [November 28, 2007, 7:14pm UTC](https://forum.servoy.com/t/html-fields-and-borders/798/14 "2007-11-28T19:14:49Z")

</div>

> IT2Be:  
> I mean ours, have a look here: [http://www.it2be.com/plugins.htm#data](http://www.it2be.com/plugins.htm#data)

Good. What does the “unlimited deployment” mean?

---

<div class="post-metadata">

**Author:** ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)\
**Post date:** [November 28, 2007, 7:22pm UTC](https://forum.servoy.com/t/html-fields-and-borders/798/15 "2007-11-28T19:22:47Z")

</div>

exactly that, you can deploy unlimited times without additional costs.

More information can be found here: [http://www.it2be.com/support/](http://www.it2be.com/support/) .

The knowledgebase will answer many more questions.

---

<div class="post-metadata">

**Author:** ![jcarlos](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@jcarlos](https://forum.servoy.com/u/jcarlos)\
**Post date:** [November 28, 2007, 7:54pm UTC](https://forum.servoy.com/t/html-fields-and-borders/798/16 "2007-11-28T19:54:37Z")

</div>

I want to clarify that the Bob’s technique mentioned above really doesn’t works better than anything else. I can’t work better than the I2Be’s Data Plug-in for instance. It is effective for simple reports and formatting along as you are good using HTML to do the formatting. I consider this technique an option to the lack of built-in reporting tools in Servoy.

---

<div class="post-metadata">

**Author:** ![Dirc](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dirc](https://forum.servoy.com/u/Dirc)\
**Post date:** [November 29, 2007, 9:20am UTC](https://forum.servoy.com/t/html-fields-and-borders/798/17 "2007-11-29T09:20:30Z")

</div>

> maarten:  
> hmm,  
> Normally you can use bordercolordark=“” and bordercolorlight=“” in a TABLE tag to influence the 3D effect of the border.  
> However this doesn’t seem to work in the current HTML renderer of Servoy.
> 
> So above mentioned looks like a cool workaround.
> 
> Thanks Harry.

think this won’t work, same as border-left, border-top, border-bottom and border-right.

Maybe it only accepts simple HTML?

---

<div class="post-metadata">

**Author:** ![bcusick](https://avatars.discourse-cdn.com/v4/letter/b/ed8c4c/32.png) [@bcusick](https://forum.servoy.com/u/bcusick)\
**Post date:** [November 29, 2007, 4:59pm UTC](https://forum.servoy.com/t/html-fields-and-borders/798/18 "2007-11-29T16:59:51Z")

</div>

Basically, it’s the same old story - the HTML renderer in Java sucks. The HTML bean is great because it doesn’t rely on Java’s built-in HTML renderer to do the HTML rendering.

Also - Juan Carlos - I’m confused when you say that Servoy lacks built-in reporting tools… I often create really, really robust reports from within Servoy. What are you expecting that you’re not seeing?
