LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

In LabView 8.2, saving a standard report

I am new to versions above 6.1 and to reporting.
 
I am trying to find a way to save a report that is formatted, should not be editable once saved and that the filename and path are created programmatically.
 
In searching for ideas, I did find that I could print a Standard report to Virtual Printers like Microsoft XPS Document Writer. This would work except for the popup created to retrieve the filename and path which allows the user to select these.
 
I also found that previous versions of LabView could save a report as a Word document. When I tried to find this for 8.2, I couldn't. This would work except it wouldn't solve the problem of not being editable.
 
Does anyone have ideas for me? I don't have any code to show as so far I am still playing with the creation of the report itself.
 
KH @->---
The test of a first-rate intelligence is the ability to hold two opposed ideas in mind at the same time and still retain the ability to function. F. Scott Fitzgerald
0 Kudos
Message 1 of 6
(2,841 Views)

With the standard report generation functions in LabVIEW, you can generate a Standard report (sent to the printer) or an HTML report.  There is an add-on for LabVIEW called the Report Generation Toolkit which allows you to use the same report generation functions to generate Word and Excel reports as well.

I don't know of any special printer drivers that allow you to bypass the print dialog.

Good luck,
-D

0 Kudos
Message 2 of 6
(2,831 Views)

I went and looked at the Report Generation Toolkit and it doesn't do what I am needing. It does allow the programmer to create a report for visualizing in Word but it doesn't save it FOR Word. It opens Word and allows the user to save from WITHIN Word.

What I am needing to do is the report generation and file saving from within LabView programmatically. I also need to be able to set the file as a READ ONLY file. Using the Report Generation Toolkit would allow the user of my program to change the data before saving. This cannot be allowed for this project. The HTML report generation is out the question for this project.

This is the reason I have looked into using a Virtual Printer like MS XPS Document Writer. This creates a file that cannot be opened for edit as it is a Print to File XML formatted file. However, the user of my project would have to supply the filename and path. This is a major problem as well.

Any other ideas?

 

KH @->---
The test of a first-rate intelligence is the ability to hold two opposed ideas in mind at the same time and still retain the ability to function. F. Scott Fitzgerald
0 Kudos
Message 3 of 6
(2,826 Views)
You can use the Report Generation Toolkit to generate a Word document without showing Word to the user.  In the New Report.vi, you can set the window state to "Minimized", which won't show Word to the user.  Then you can use Save Report to File.vi to save the report to disk...you can set a password on the file so users cannot edit the document unless they know the password.  Alternatively, you could use the Set Permissions function in the File I/O > Advanced File Functions palette to set the file to read-only after you've saved it.
 
Hope this helps,
-D
0 Kudos
Message 4 of 6
(2,822 Views)

Am I correct in my understanding about the Document Toolkit, to create a Word doc the system that creates it has to have Word installed? If this is true, what about Word Viewer? Would it work just as good as Word itself? I figured out how to NOT have the Word program open and thus have the text generated be editable by the user. But do I really have to have Word?

The issue is that the system my executable will be running on has minimal software installed. IE No Word or Office. However, I can install Word Viewer if I have too.

KH @->---
The test of a first-rate intelligence is the ability to hold two opposed ideas in mind at the same time and still retain the ability to function. F. Scott Fitzgerald
0 Kudos
Message 5 of 6
(2,790 Views)

I have never tried using the Report Generation Toolkit on a system with just Word Viewer installed, but I'm guessing it will not work.  The toolkit uses ActiveX to generate and modify reports, and I'm guessing the Word Viewer does not include all the ActiveX functionality that Word itself includes.

If you are going to be generating reports on a "minimal" system, I suggest generating HTML reports, since the machines will have a web browser installed, and that's all you need to view the reports.  In addition, you don't need the Report Generation Toolkit to generate HTML reports...this functionality is included in the core Report Generation VIs in LabVIEW.

Good luck,
-D

Message Edited by Darren on 05-07-2007 01:22 PM

0 Kudos
Message 6 of 6
(2,783 Views)