LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

print a graph when used different resolutions

Hello,

 

my LV programm (using V8.5.1) must run on computers with different resolutions (1024x768, 1280x1024...), so I used the option

 

"new scaling of all frontpanel elements after changing the windows size" (free translating 🙂  )

(German: "Alle Elemente des Frontpanels bei Änderung der Fenstergröße neu skalieren")

in my VI.

This works fine but now I have some trouble with the printout of a graph.
Depending of the selected resolution of the computer, the graph will be printed complete or only partial, then the lower part of the graph is missing.


To print out the graph I used the VI  "Append Control Image to Report.vi"

Can anybody help me?


Gruß
jan91

0 Kudos
Message 1 of 7
(3,251 Views)

Hello Jan,

 

can you please attach your VI to your next post in this forum?

 

I have tried to reproduce the described problem here, but the graph image is resized automatically if it does not fit on the printout page... 

 

Best regards,

Sebastian 

Message 2 of 7
(3,228 Views)

Hello Sebastian,

 

 in the attachment you find a small VI to print the graph.

 

When the PC uses a resolution off 1024 x 768 the print is ok, but when I uses f.e. 1280 x 1024 the problem occurs.

 

MfG

 

jan91 

Download All
0 Kudos
Message 3 of 7
(3,216 Views)

Hello Jan,

 

 you are right - when printing the report in landscape orientation, images will be cropped if higher than the paper size.This issue has already been reported to our LabVIEW R&D team (#36511) and should be solved in a forthcoming update of the report generation toolkit. In my opinion, the issue is linked to the problem that the image will not fill out the report page completely to the right margin (#36926), another nuisance you might also have encountered.

 

I have created a workaround for the problem,  which you should find attached to this post. As you change the graphs background color for printing, I added another property to resize the graph to the maximum printable size (evaluated here in trial&error, depending on your printer, the maximum size might change a bit), and another one to restore the original size when the report is done. To reduce the "blink time" of the graph, I placed the restoring property node directly after the control image has been attached to the report, so that during printer initialization, the original layout is already visible again.

 

Hopefully, this is acceptable for you, until these issues have been fixed.

 

Best regards,

Sebastian 

Message 4 of 7
(3,207 Views)

Hello Sebastian,

 

this works really good.

 

 

Thank you very much for your quick help.

 

 

jan91 

 

 

0 Kudos
Message 5 of 7
(3,191 Views)

Hello Sebastian,

 

up to now I was not able to locate the printed graph in the middle of the printout.

 

When I use the border function, I get trouble with different resolution.

 

Do you know a solution?

 

jan91

0 Kudos
Message 6 of 7
(3,122 Views)

Hello Jan,

 

are you working with an HTML report now? I am asking because the alignment options of the "append control image to report"-function are available only for HTML reports (as noted in the function's help text). For standard reports, the images are always placed into a new line of the current the text flow, so you might experiment with the insertion of several CRLFs before inserting the image to get a horizontal layout correction, but the image will always stay close to the left page margin.

 

Best regards,

Sebastian 

Message 7 of 7
(3,093 Views)