Printing fields / elements

How can I keep an element or field from printing on a form based on a argument. I have tried to use .visible = true / false, but it prints regardless. I guess I could change the text / field color to white, but that does not seem to be a very clean route.

I am sure that there is something simple I am missing

Any Ideas?

Here here,

I too have this delimma and was about to post the very same question. I have an invoice with L1 X H1 X L2 X H2 and I want to be able to ‘white’ out the lengths or heights if they are zero.

Any help would be greatl appreciated.

Dave

Yes,
thats the only way to decare it through the elements node.

Haven’t come up against this myself,

However, one quick idea would be to change the position of those fields and move them off the printable area of the document, print it and then move them back to their original positions using:

elements.field.setLocation ( x , y )

Cheers
Harry

Whiteing them out would solve my problem. How do you do that as an argumnent in the elements node?

Thanks,

Thats a bit less code then changing the forgeound / field color

Dave,
Use Harry’s Idea, it’s less code.

Also,

My problem is that it is not single elemtns as their are four elements and they are in the ‘Body’ of a ‘List View’ form. So if my report has three lines, I cannot move one element as it will be moved for all three rows would it not?

I guess I am expecting a bit too much being used to other more report orientated RAD tools.

Could a HTML table help me since I may be able to ‘blank’ out the zeros as it is generated???

Dave

Sounds like my other challange

http://forum.servoy.com/viewtopic.php?t=4631&highlight=

I think we may be wishing for a bit too much…

Well, they Dev team has allot on its plate, but it might be a simple enhancement. I requested a elements.print = true / false for the original thread issue.

The current issue would involve declaring related elements, I am not sure what that would entail.

Hi guys!

indeed, if you print, the print-out is tottally rebuild again, and for that lossing all settings, and places of elements (if you set them manually) but there is a trick! :o

After you set the elements manually, place the whole printout on a different form in a hidden tabpanel!
and set that form in print-preview.

Hope this helps, a bit

ebrandt:
How can I keep an element or field from printing on a form based on a argument. I have tried to use .visible = true / false, but it prints regardless. I guess I could change the text / field color to white, but that does not seem to be a very clean route.

Servoy 3.0(a11) will retain javascript changes (until now print UI are build from the repository form description)