html (fields) and borders

I have a html field and I fill the field with, surprising :D , 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?

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

Bingo, thank you!

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.

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!

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

Please try to use Stylesheets for all those things.

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?

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.

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.

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

I disagree :) The Data plugin does the job much better including formatting options etc…

IT2Be:

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

I disagree :) 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.

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

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

Good. What does the “unlimited deployment” mean?

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

More information can be found here: http://www.it2be.com/support/ .

The knowledgebase will answer many more questions.

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.

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?

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?