LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

html report

Hello

I wrote a subvi to generate an html preview of what i want to print but severals question appears :

1) i pass a table to sub vi but it seems not to receive colums headers

2) i use event structure that make a click each time ( 5000ms in this case ) it generate html report, is that sound normal ?

3) is there a way to adapt width columns to text size

4) is this vi the best method to make preview windows before printing report ?

filltable.vi calls in_printpreview.vi

Best regards

Sébastien





 

 




CLAD / Labview 2011, Win Xp
------------------------------------------------------
Mission d'une semaine- à plusieurs mois laissez moi un MP...
RP et Midi-pyrénées .Km+++ si possibilité de télétravail

Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
Don't forget to valid a good answer / pensez à valider une réponse correcte
Download All
0 Kudos
Message 1 of 6
(3,184 Views)
To answer your questions:

  1. That's because you're only passing the data in the table. You need to pass in a reference to the table using a control reference.
  2. No. You only need to generate the HTML report once, not every 5 seconds. You should have an "init" event that you can trigger a number of ways. One way is with a custom user event. Another way is to use a hidden LED or something else and you wire a dummy value using the "Value (signaling)" property, and you have your event case handle that event.
  3. See this thread for multicolumn listboxes. You may be able to adapt it to tables.
  4. As long as you change (2) it should be OK.
EDIT: Addition to (4): An alternate is to just call the Open URL in Default Browser, passing in the URL of the HTML file you created. That way you don't have to have a popup VI.


Message Edited by smercurio_fc on 03-13-2008 01:12 PM
Message 2 of 6
(3,176 Views)
hello

thanks 

i tought headers was an internal property of table, i'll try all that tomorrow ...


Sébastien


CLAD / Labview 2011, Win Xp
------------------------------------------------------
Mission d'une semaine- à plusieurs mois laissez moi un MP...
RP et Midi-pyrénées .Km+++ si possibilité de télétravail

Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
Don't forget to valid a good answer / pensez à valider une réponse correcte
0 Kudos
Message 3 of 6
(3,163 Views)
To answer your questions:

  1. That's because you're only passing the data in the table. You need to pass in a reference to the table using a control reference.
  2. No. You only need to generate the HTML report once, not every 5 seconds. You should have an "init" event that you can trigger a number of ways. One way is with a custom user event. Another way is to use a hidden LED or something else and you wire a dummy value using the "Value (signaling)" property, and you have your event case handle that event.
  3. See this thread for multicolumn listboxes. You may be able to adapt it to tables.
  4. As long as you change (2) it should be OK.
EDIT: Addition to (4): An alternate is to just call the Open URL in Default Browser, passing in the URL of the HTML file you created. That way you don't have to have a popup VI.


hello,

sorry i was aproximative :

3) i wanted to say html columns

2) sorry i not native english some words are little bit abstractive or too much technique for me : "init event", "trigger a number of ways" ......

If possible could you be more "rookie talker" if we can say !

Thanks for all

Sébastien









CLAD / Labview 2011, Win Xp
------------------------------------------------------
Mission d'une semaine- à plusieurs mois laissez moi un MP...
RP et Midi-pyrénées .Km+++ si possibilité de télétravail

Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
Don't forget to valid a good answer / pensez à valider une réponse correcte
0 Kudos
Message 4 of 6
(3,151 Views)
They say a picture is worth a thousand words, so I'll give you a number of pictures in the form of some LabVIEW code. Attached is a modified example for you. I've created 2 versions of the "display HTML" VI. One just calls the Open URL in Default Browser, and the other has an embedded browser like you were doing with an init case. The way I did the init is just one way of doing it.

In terms of your question regarding autosizing for HTML tables: a browser will do this automatically if you do not specify a specific width for a column. In your case you were specifying a width of 2, which generates HTML code in the form <TD WIDTH="200">. If you change the 2 to a 0 then you will get the columns to be autosized.
Message 5 of 6
(3,142 Views)
for sure it's clearer like that

now i see what you mean with init value ....

ok,   passing with reference, headers can be transmited, great...


thanks to you

Sébastien
CLAD / Labview 2011, Win Xp
------------------------------------------------------
Mission d'une semaine- à plusieurs mois laissez moi un MP...
RP et Midi-pyrénées .Km+++ si possibilité de télétravail

Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
Don't forget to valid a good answer / pensez à valider une réponse correcte
0 Kudos
Message 6 of 6
(3,134 Views)