LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

report distorted

I am using the report generation toolkit to make a record of key values from my production test.  The problem I'm having is that the image aspect ratios are distorted.  It's not the end of the world, but I'm also verifying my labeling, so I would like it to look better.  I am using the standard report format.  I can't use excel or word becasuse it is not installed on all target machines.  I have attached the pdf of the report.  Any suggestions?

 

 

 

 

Download All
0 Kudos
Message 1 of 11
(4,028 Views)

Hi OregonGumby,

 

I tried running the VI you attached, but it looks like I'm missing some subVI's, specifically the "Validation Report - create header.vi" and "Validation Report - insert label image.vi" subVI's. Would it be possible for you to zip the project up and attach it to a reply so I can try running the VI to replicate the issue?

 

Also, if you could let me know what OS and LabVIEW version you're running, that might help me troubleshoot the issue.

 

Thanks,

0 Kudos
Message 2 of 11
(4,001 Views)

Hey OregonGumby,

 

I think I've pinpointed the issue you're running into with the distorted images. It seems that it's related to the physical size of your front panel controls--for example, if you use that "Append Control Image" VI with a small front panel control, it appears correctly in the report. Basically, the report generation VI's are squashing the image down to fit in the bounds of a printed page.

 

I have a few ideas for workarounds to the problem:

1. Resize Front Panel Controls: If you resize the front panel controls to a smaller size, they shouldn't distort in the report. You could even do this programmatically if you want; for example you could have the VI make the front panel controls smaller before creating the report and then resize them to their original size after the report is created.

 

2. GetImage Invoke Node: You could create an invoke node for each front panel control and use its GetImage property to grab a raw image of the control, then programmatically resize that in LabVIEW before appending it to the report.

 

3. Send Raw Data to Excel: You could send the raw data to Excel and build a spreadsheet or graph in there. I realize this is a last resort since you don't have Excel on all of your target machines (and it's also the most difficult of the three methods) but it is an option if you want to go that route.

 

I hope that helps a bit. It's certainly an interesting problem, and I hope one of the workarounds I listed above will work for you and your application. Please let us know if you need any more help with this.

0 Kudos
Message 3 of 11
(3,975 Views)

Thanks for the suggestions on how to insert control images.  The biggest issue I'm having is inserting a jpg of my label image.  It looks fine in the jpg image, but when I put it in the report it becomes very distorted.  Currently, I've solved the problem by creating an HTML report.  The only issue with that is it's not compatible with some of my virtual printers and it clips part of one image.

 

I'm also running into another problem.  The print report vi works fine in the development environment, but when I compile it,  The report gets sent to the wrong printer.

0 Kudos
Message 4 of 11
(3,955 Views)

OregonGumby,

 

It would really help me troubleshoot the label image issue if I could see the subVI that's inserting that image into the report. Would it be possible for you to upload that subVI?

 

As for the printer difficulties, it looks like your code is iterating through available printers to find the correct one. Are you trying to run the executable on a different machine than the one with LabVIEW? I'm wondering if the printer configuration on that computer is different from your development machine. And just to clarify, are you always wanting to use the Bullzip PDF printer, or do you occasionally print to other virtual or physical printers?

 

Thanks,

0 Kudos
Message 5 of 11
(3,941 Views)

I am now opening the label file, using the get image subset vi to crop and resave it and then inserting it and that seems to be working.  The bigest problem I'm having now, is that it all works fine until I compile it and then I can't get the image to go to the printer that I've hard coded.  I'm including a test vi that simulates what I'm doing in my larger vi.

Download All
0 Kudos
Message 6 of 11
(3,928 Views)

Unfortunately, I was not able to reproduce the problem on my machine--the executable correctly used the Bullzip printer. Are you running the executable on your LabVIEW development machine? If not, it's possible that the Bullzip printer is named differently on the target machine.

 

Also, I noticed in your previously posted VI, you were using the Query Printers VI to find a list of all printers on the machine. If you continue to have problems, you might consider using that to display a list of printers found by LabVIEW, for debugging purposes.

 

Hope that helps, and let us know if you still run into issues.

 

Thanks,

0 Kudos
Message 7 of 11
(3,905 Views)

Hi Daniel,

 

I'm experiencing the same issue, only this time I'm using a different method of acquiring the image. I'm using a 2d picture and saving that image to a temporary file. 

 

Why does it resize my image? Overlaying the image with the resulting PDF, there seems to be no conflict with the margins. . . This doesn't make sense. 

Download All
0 Kudos
Message 8 of 11
(3,871 Views)

Hello Pablo, 

 

One thing you might try, is to use the "Zoom Factor" property node of the 2D picture, as described here in this KnowledgeBase. This might set a standard for the image and prevent any further resizing. Give this a try and let me know what your results are. 

 

 

Huntington W
National Instruments
Applications Engineer

***Don't forget to give Kudos and Accepted as Solution where it is deserved***
0 Kudos
Message 9 of 11
(3,844 Views)

That is not an acceptable solution for me for various reasons, but I've worked around all this by using HTML. 

 

After having been working with this kit for a week or so, I've concluded that this Report generation toolkit is broken in so very many ways. 

 

1. Standard Reports have many bugs attaching images. They are blurry,
their aspect ratios get changed, they cannot be placed properly, etc.


2. But HMTL reports can only be printed to the default printer (somehow
this is by design!? who thought this was a good idea?) Becuase of this I had to programmatically call internet explorer and print it to give my user some choice.

 

3. HTML can't be changed to landscape. So if I want to print a graph using landscape I'm on my own. 

 

4. Standard Reports cannot be saved. 

 

5. Fonts in tables can't be colored / changed,

 

6. The tables look terrible, straight out of 1999, and there's no customization options. I had to programmaticaly edit the <TABLE> tags in the output to get them looking semi-decent. 

 

 

And there are a dozen other idiosyncracies I've happened accross that I can't even remember now. The kicker is this toolkit was made in 2005. You'd think NI would have put more effort into this. 

 

This post isn't so much one of questions - I've already worked around everything - but I'm just venting. 

Message 10 of 11
(3,810 Views)