Create Easy Text Report VI

Owning Palette: Report Generation VIs

Requires: Base Development System

Allows you to pass in a block of text along with optional formatting information and print the report to a designated printer or publish the report to a specified file path.

Details  

 Add to the block diagram  Find on the palette
font settings indicates the font settings a report uses.
charset is the character set to use for report text. The default is -1.
weight is the thickness of the font. The default is -1.
name is the font name.
size is the font size.
print or save? specifies whether the VI prints or saves the report. The default is print. Set this input to save if you specify a file path in printer name or file path.

0print (default)—Prints the report.
1save—Saves the report.
margins sets the page margins to use when printing the report.
margins sets the size of the page margins. The default is 1.00 for each margin. If the margins are smaller than the minimum margins for the printer, the VI returns an error.
top sets the distance in inches or centimeters between the top of the page and the top of the content on the page.
left sets the distance in inches or centimeters between the left edge of the page and the left edge of the content on the page.
right sets the distance in inches or centimeters between the right edge of the page and the right edge of the content on the page.
bottom sets the distance in inches or centimeters between the bottom of the page and the bottom of the content on the page.
measurement system sets the units of measurement for the margins.

0Default—Sets the margins in the measurement system configured on the computer.
1US—Sets the margins in inches.
2Metric—Sets the margins in centimeters.
text to be printed is the information you want to include in the report. Any information you want to include must be in a string.
Note  If this string contains printing codes, the VI might not behave as expected. For example, the string \00 prints a blank page on some computers. If the VI does not behave as expected, make sure this string does not contain printer codes.
printer name or file path is the name of the printer to which you want to print a report or the file path to which you want to send a report, depending on report type. If you specify a printer name, the printer must be configured for use with the computer from which you print the report. If you specify a file path, you must set the print or save? input to save. If you do not wire this input, the VI uses the default printer in LabVIEW.

If you wire a file path, you must enter the path as a string or use the Path to String function. If you do not specify a path, LabVIEW displays error -41003.
report type is the type of report you want to create.

0HTML—Creates an HTML report.
1Word (Report Generation Toolkit) —Creates a Word report.
2Excel (Report Generation Toolkit)—Creates an Excel report.
orientation (Windows) specifies how the report appears when it prints.

0Portrait (default)—Prints the report so the short edge of the paper is the top of the page.
1Landscape—Prints the report so the long edge of the paper is the top of the page.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
headers specifies what information appears in the header of each page of the report.
left is the information you want to appear in the left side of the header.
center is the information you want to appear in the center portion of the header.
right is the information you want to appear in the right side of the header.
footers specifies what information appears in the footer of each page of the report.
left is the information you want to appear in the left side of the footer.
center is the information you want to appear in the center portion of the footer.
right is the information you want to appear in the right side of the footer.
error out contains error information. This output provides standard error out functionality.

Create Easy Text Report Details

Use tokens with this VI to generate information in the report, such as in the headers and footers. For example, you can insert a time stamp in the footers of the report.

You cannot use tokens with Microsoft Word and Excel reports.

You cannot use this VI with any other Report Generation VIs. Also, this VI does not give you fine-grain control over the formatting of a report. You can use this VI to specify the text font, set the header and footer, set margins, specify a printer, and set the page orientation. This VI disposes of the report automatically, which frees memory space. However, you cannot control where information is placed, append information from another file, or clear the report of font styles, headers and footers, or text. Use the other Report Generation VIs to generate complicated reports, such as those with many different kinds of information.