LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Printing a File(.html, .doc ,etc) from LabVIEW

Hi All,
I am currently using LabVIEW 6i(PDS). In one of my application I had created (HTML) reports. Now I want to print the report through LabVIEW. If I use the Standard report format than LabVIEW has a vi to print the report. Please guide me how to print the report or file through LabVIEw.
Thnaking you.
Vishal Shah.
0 Kudos
Message 1 of 14
(9,079 Views)
Vishal,

Sounds like you need to make a sysexec call, or use some other form of comm. with the opsys. LabVIEW does not yet have a way of directly handling HTML (I have been begging for a browser control/indicator in LV). In order to print HTML format, you are either going to have to build yourself a printer driver for HTML information (which you should sell!) or just use a browser to do it.

One way is to use ActiveX to drop in IE Browser to display your HTML and then print the panel.

Another is to use a sysexec call to iexplore.exe with a print suffix (iexplore.exe /p C:/.../filename - although I am sure that that is not the exact format you need for the command - you will have to look it up.) Still another is to use ActiveX to send the HTML to
IE or Word and then command a print.

How you proceed is up to you. Good luck, and let NI know you need an HTML/XML broswer control/indicator in LabVIEW 7 (or 6.2)

Good luck
0 Kudos
Message 2 of 14
(9,079 Views)
LabVIEWGuru has got it right. The best way I know to print HTML docs from LabVIEW is to embed the Microsoft Internet Browser control in LabVIEW and print it through that. I put together a few VIs that do this which I will attach.
Message 3 of 14
(9,079 Views)
Is there a way to programatically set the report orientation?
0 Kudos
Message 4 of 14
(9,079 Views)
I have been using a much earlier version of a piece of code similar to the Print HTML Reports/Files library that is attached in the above comment. When I upgraded to LabVIEW 7 it no longer worked for some reason and I then was able to find this library. While it works now there are warnings that the ActiveX Event Queue VIs that are used will not be available in future releases of LabVIEW. I was curious if Aaron Marks or anyone else has revised these VIs to use the activeX event callback functionality. I gave it a quick try but came up short.
0 Kudos
Message 5 of 14
(9,079 Views)
Hi
 
i run this print html vi but this error rise ,, attach see file ,, what its mean
 
thanks
 
 
 
 
0 Kudos
Message 6 of 14
(8,651 Views)

Hi elyan,

it looks like the "report in" reference is not valid. Do you call this vi from another vi? You have to.

Mike

0 Kudos
Message 7 of 14
(8,649 Views)

Let me explain my self

 

I generate a report then I save it in specific directory,,, what I want to if I want to print this file I want to load it then print it ..  

 

I build application to explain what I want to do.

 

Attach see file ,, please run print vi

 

Download All
0 Kudos
Message 8 of 14
(8,642 Views)

Hi elyan,

i get no error if i run your vi. I only change your init vi, with the "create new report.vi" because yours is missing. And i connect the error to the first vi after your init vi.

Mike

0 Kudos
Message 9 of 14
(8,638 Views)

can you send for me the changes that you have been correct

 

 

thanks

0 Kudos
Message 10 of 14
(8,631 Views)