05-07-2015 05:45 AM
Hi
I have an odd problem.
I create a report in excel with in LV. The I'd like to have it printed. But the printer settings are set to gray on default.
How can I set the printer settings to colour before printing?
Thanks for any help.
Yves
05-08-2015 02:42 AM
Hi Yves,
if you are useing the "Easy Print VI Panel or Documentation VI" then you can configure all layout options inclusive the colouring.
You should try to put it in your VI and look at the LabVIEW Help for further informations.
Hope this could help you with your problem.
Regards
Mike
05-08-2015 02:50 AM
By the way I read that it is a default setting in LabVIEW that every colour printer prints out coloured and every monochrome printer prints out black and white.
So it should be printing coloured if you got the right printer. Maybe you already configured it while changing the file type or something like that?
05-11-2015 03:08 AM
Thank you for your help.
But it's not really waht I intended to do. I'd linke to print out the excel chart, not the vi.
I have attached what I'm actually doing. But unfortunately there's no option.
Thank you for any help.
Yves
05-11-2015 03:54 AM - edited 05-11-2015 04:08 AM
In this way you really work in Excel through the ActiveX interface. So you will have to try to find an ActiveX interface in Excel that allows to do printer settings. There seems to be something promising when going from _Application.Active Dialog.Page Setup.Black and White. But how that all works I'm not sure.
Something like this should probably work. It's untested but should get you into the right direction.
12-08-2015 02:55 PM
I want to print my Excel file with option of color. I use PrintDialog to bring up the printer properties and select color print, however, it doesn't work. I find the printer setting is dominated by the Print Report and always is black/white. My .vi is attached. Can some one help? Thank you in advance.
12-08-2015 04:28 PM
Dear HermanYang,
On the one hand, it is rude to "take over" another Poster's Message to ask a question of your own -- you should start your own thread. On the other hand, it allows me, by directly answering your question (sorry I can't include the lovely color printout from Excel, as I don't have a scanner handy), to show the Original Poster how simple it is to print in color using the Report Generation Toolkit.
I chose as the Excel file an example that was posted recently on this Forum that involved changing the colors of Excel Histogram bars. Here's the (really simple) code:
I had to run this twice -- the first time, I used the Query Available Printers function to list my printers (I didn't have the Index Array function in yet, so my Print Report function had no printer specified, so it used my Default Printer). From the System Configured Printers, I saw that the third printer was a Color Printer, so the second time, I chose it from the list, and voilà, a colored Chart.
Bob Schor
12-08-2015 04:49 PM
Bob,
Thank you for letting me know I should not "take over" others' poster.
My question was not to select the color printer, what I want is to use the printer properties to set my printer to print the excel file in color. Sorry for not explaining clearly.
12-08-2015 05:08 PM
I know that when I'm doing Excel (not LabVIEW) and print on a Color Printer, if it comes out in Black and White, I need to change the Printer Properties in Windows, specifically change the default printer properties to Color (for Excel). Since the RGT uses Excel, you may want to open Excel, open the Print Dialog, find the Color Printer, and change its default settings (manually) to Color.
I suspect that attempting to do this using ActiveX is going to be tricky and messy ... However, if anyone can do it, I'm pretty sure Ben64 can ...
Bob Schor
12-08-2015 06:07 PM
I'm not 100% sure here but I think that the way you turn on or off color printing in Excel is by pressing the "Properties" button (or in Excel 2013, the text link) on the print dialog, which brings up a printer-driver-specific dialog box. So I don't think there's a generic way to activate color printing with every printer type out there.
Do you have one specific printer that you will be printing to that you want to enable color for? If so, maybe it has a registry entry or a config file you can modify or maybe it has ActiveX hooks you can use.
If you want to write catch-all code that just tries to tell every possible printer to use color, I think you might be out of luck.