LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

NI Report Generator: how to implement mixed text and graphics

NI Report Generator - how to implement mixed text and graphics

I'm using CVI 5.5 and it's NI Report Generator (I'm not allowed to use MS-Word Active X server). NI Report works well when printing only text reports. However, I'll have to create reports with mixed parts of text and graphics. The graphics should be copies of Graph Controls containing curve representations of measurement results. - I tried the following steps:

a) I first painted a curve to a Graph Control and then stored the whole control to an image file on the harddisk using the toolbox function

SaveCtrlDisplayToFile(....)

The type of saved file showed to be a "*.bmp" file (24 bit RGB true color)


b) I tried to import this "*.bm
p" file into the NIReportGenerator by using the Function

NIReport_AppendImageFile(...)

The OnlineHelp to this function explains: "You can use only '*.emf' files" - thus, I got "error -15" (= InvalidImageFile) when referring to a "*.bmp" file


Questions:

1) Does CVI 6.0 allow to import "*.bmp" files, too (or still only "*.emf" files)

2) How can one change the format of a "*.bmp" file (as generated by the CVI toolbox Cmd "SaveCtrlDisplayToFile") to a "*.emf" file (as needed by the NI report generator).

3) Or can one force the toolbox command to generate "*.emf" files directly?

4) "*.emf" seems to mean: "Enhanced Metafile Format" (MS-Windows). - There is a SDK function "CreateEnhMetaFile" to generate a *.emf file from the contents of a screen rectangle - has anyone experienced this, is anyone able to supply an example (CVI C-coding)?
0 Kudos
Message 1 of 2
(3,233 Views)
1) Yes, CVI 6.0 has an updated version of NI-Reports that supports EMP, BMP, GIF, and JPG formats.

2) You can use any 3rd party graphics program such as Adobe Photoshop or Paint Shop Pro. I'm sure you could find a program online for free that would do the conversion from bitmap (BMP) to extended metafile (EMF)

3) No, the toolbox function do not generate EMF files.

4) It would be difficult to use the SDK functions to get an image of a CVI control or panel into an EMF file. An upgrade to CVI 6.0 would be a much better idea (http://www.ni.com/upgrade).

Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 2 of 2
(3,233 Views)