LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Print report

Solved!
Go to solution

Okay , i tried to print a picture using LabView , 1st i didit using HP Deskjet D1663 , and it gave me error " Invalid printer name " , so i added Query Printers.vi , extracted the printer from there as a default printer and connected to print report terminal and it gave me error " Object OX4BE00004 is not valid "

 

I thought maybe its the printer problem , though its new , i changed the default printer to an HP laserjet 1020 , and it actually printed but a bunch of weird codes and dollar signs and euros also , etc i wish i could scan it.

code is attached . 

 

So any clue ? 

0 Kudos
Message 1 of 8
(3,790 Views)

Why are you using "Append File to Report"?  It's context help says "appends text from text file to report".  But you don't have a text file.  You have a binary file of an image.  That is why you are getting crazy characters when it prints.

 

I think you want to use Append Image to Report.

0 Kudos
Message 2 of 8
(3,784 Views)

Now it prints on the laserjet , but i am still getting the error "Invalid printer name" Error 41002 while using the deskjet , i looked through nearly the whole forums and i could not find valuable help . 

 

is it possible to send the printing command to specific USB port rather than mentioning the Printer name ?  

0 Kudos
Message 3 of 8
(3,768 Views)
The report generation toolkit has a function "Query Available Printers.vi".  Run that and see what pops up.  Compare the printer names there to what you are using.  My guess is that you have some small error in the way you typed the printer name that is not easily spotted.
0 Kudos
Message 4 of 8
(3,762 Views)
negative , that did not work either  , i also tried to set it as a default printer and the error remains the same 
0 Kudos
Message 5 of 8
(3,754 Views)
Try renaming the printer through Windows.  That way you'll see if it is something about the name, or something about the printer driver.
0 Kudos
Message 6 of 8
(3,748 Views)
Solution
Accepted by topic author B4S3M

why not debug step by step?

You have bad programming  habit. For your original one, which block will be executed firstly?

 

 

Please see the solution.

 

 

you can set your pdf printer as defaut printer when you generate pdf report.

帖子被Mechtest在 03-01-2010 06:52 AM
时编辑过了
Message 7 of 8
(3,721 Views)

Sorry for being late , had troubles with internet connection , The PDF thing worked .

thanks also for the advice of structuring the code , life is now easier .

 

 

For Ravens Fan , Changing the printer name did not work , i believe its something in the driver , as it is some sort of global driver "Deskjet 1600 SERIES" , it also can be done if one got specific driver for the printer . 

0 Kudos
Message 8 of 8
(3,661 Views)