11-03-2008 08:18 AM
I am printing a graph from a high resolution monitor to a report using the append control funtion in the reporting. I want to fit the graph to the page that I am printing on. Currently it goes about 2cm over the bottom margin in landscape mode and I miss the graph scale off the bottom. along with some of the data points.
It must be possible to fit the control to the page somehow. Please has anybody got any experience of this?
11-03-2008 08:43 AM
James W,
One way of doing this is to create a subVI which has a copy of the graph and anything else you want printed but sized to fit the paper. Make sure its front panel is open (even if offscreen), write all the data to it, then print.
Lynn
11-03-2008 09:19 AM
11-05-2008 04:09 AM
Hi James W,
Forgive me if I have misunderstood you but do you mean that when you go to the options for printing your VI, the output from the printer is not correct. Have you checked your printer's settings and made sure that it is printing in the correct paper format? Is there a minimum margin that your printer can print to?
Thanks,
11-05-2008 04:24 AM - edited 11-05-2008 04:24 AM
Hi Andrew,
I've tried changing the margins and everything.
When Printing Portrait, the control is squashed to fit to the page with a large marging on the right, but not stretched vertically.
When printing Landscape, the control is printed with the bottom 1.5 cm missing (on what would be full size a4)
getting the printer to print at 50%, results in the same cut off image but at 50% of the size. It is obviously something about the way that LabVIEW is spooling to the printer and is not sending all of the correct info or assumes a default paper size which is not ISO standard.
I set my margins at 0.5cm all around the page, - it just moved the plot up and left on landscape mode.
I am using code almost identical to the shipping example of how to Print a control to a report (web or printer). In fact I just saved this code and added the change page orientation in the Printer case. As I can't set the paper size I suspect this may be part of the issue, but I'm not sure.
James
11-05-2008 04:47 AM
Hi James,
Have you tried just printing out the report using the standard File->Print. Can you try and verfy that you can print the control out as you want. I was wondering if you could create a separate printer in the printer settings and configure it to have different margins and see if that helps the issue.
Could you possibly test this issue on another printer and see if it is reproduceable? If you post your code, I can try it here.
Thanks,
11-05-2008 08:41 AM - edited 11-05-2008 08:43 AM
Hi Andrew,
Attached are 3 VIs. Two are the reporting VIs,
1 is the FP of the VI I am trying to print. I have removed vast chunks of code from behind it, and it may have dependencies on other VIs. so I'm not sure if you will be able to open the FP VI.
I hope this allows you to see what I am trying to do.
(The FP has a Tab Control, each tab contains n graphs, 1=<n=<4) I print either the acitve graph on the tab, or the whole Tab, as it is such a complicated control, you can understand why creating a subVI is not ideal.
(I ran this VI on 2 different machines to 2 different printers before I started posting, so I'm sure the problem is in the code, not the machine or printer.)
James
11-07-2008 08:19 AM
Hi James,
I can't run your Analysis VI as I don't have all of the subVIs. Could you possibly try running the VI and generating an HTML report so that I can have a look at what is output?Could you possibly include all the subVIs so that I can try running the VI here.
Thanks,
11-10-2008 04:52 AM
Hi James,
I made a simple program to try and replicate the issue and I think I can see what you mean. If the control is over a certain size, when you print the report, it will chop off the bottom of the control. Have you tried any of the following?
1. Making the control slightly smaller.
2. Printing the Control using the standard dialogue box (File->Print...).
3. Adjusting the margins so that the control is offset to the top of the page.
I shall keep investigating this problem to determine whether or not it is a bug.
Please let me know how you get on,
Thanks,
11-10-2008 05:01 AM - edited 11-10-2008 05:02 AM
Hi Andrew,
Yes I have tried all of the following:
1) This works but is no good for my application where I want to display the control over most of a (1400*800 ?) widescreen.
2) See Report.VI attached above.
3) With a large enough screen resolution - and screens are getting ever bigger, this does not work.
I urge NI to fix this proglem fast if it is a bug and there is not already a feature in place to get around it as this will soon become a major problem due to screen resolutions outstripping printer resolutions by far.