11-16-2012 08:50 AM
Hello,
I need to generate a report which includes text regarding the test and two tables with Pass(Green)/Fail(Red) status. When I tried in html, it appends the front panel table without any problem (including the cell color), but it generates two ‘xx.jpg’ files to load from. I don’t want to have xx.jpg saved as a separate file and like to have only one file either in html or some other form which includes the data and image in one file. Is there any other method I could follow?
Thanks,
11-16-2012 09:07 AM - edited 11-16-2012 09:10 AM
html needs to load the image from somewhere, does it not?
Unless you embed the image into the html code (usually at the bottom). This is not as straightforward as simply loading an image file.
If you want everything in a single file, then you need to google how to embed the image within the html body.
You could create a pdf document which has both the text & image into one.
Same with Excel spreadsheet or Word document. There are others.
11-16-2012 10:01 AM
I was going to recommend using the Word report instead of the HTML.
11-16-2012 10:20 AM
Thanks for the info. I tried in excel and it did work great, except unable to transfer the row color details.
For example,
Test 1 in row 1 -> FAIL -> Entire row is in RED
Test 2 in row 2 -> PASS -> Entire row is in GREEN
Any idea?
11-16-2012 10:22 AM
What are you transferring to?
11-16-2012 10:32 AM
For the test conditions (checkbox and test req), I am using a listbox to display info to the tester. When the test is completed, the status will be updated in the listbox as below and wanted to save the result in excel.
Test 1 | FAIL |
Test 2 | PASS |
11-16-2012
10:43 AM
- last edited on
03-27-2025
11:48 AM
by
Content Cleaner
@K.Vins wrote:
Hello,
I need to generate a report which includes text regarding the test and two tables with Pass(Green)/Fail(Red) status. When I tried in html, it appends the front panel table without any problem (including the cell color), but it generates two ‘xx.jpg’ files to load from. I don’t want to have xx.jpg saved as a separate file and like to have only one file either in html or some other form which includes the data and image in one file. Is there any other method I could follow?
Thanks,
Check this object oriented logging and reporting example.
https://forums.ni.com/t5/Example-Code/Object-Oriented-Logging-With-LabVIEW/ta-p/3518937
Br,
/Roger
11-20-2012 01:28 PM
Thanks. Now I understand how to get the table with different color for test status and it is working.
Is there any way in Labview I could generate pdf report?
Thanks.
11-20-2012
02:40 PM
- last edited on
03-27-2025
11:49 AM
by
Content Cleaner
@K.Vins wrote:
Thanks. Now I understand how to get the table with different color for test status and it is working.
Is there any way in Labview I could generate pdf report?
Thanks.
A few actually.
https://www.ni.com/en/support/downloads/tools-network/download.pdf-toolkit-for-labview.html
https://forums.ni.com/t5/Example-Code/PDF-Report-with-ItextSharp/ta-p/3500858
Or install a PDF printer, and programatically print to it. In the past I've used PDFCreator because it has ActiveX calls to control the conversion.
I also believe newer versions of Word/Excel can be saved in PDF using other ActiveX calls.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord