LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Replacement for NIReport_GetPrinters ?

Hi,

 

In CVI 2017 projects, I used NI_Report_GetPrinters.

Since CVI 2019 NI report has been removed.

How can I now get the available printers?

 

Thank you

0 Kudos
Message 1 of 5
(1,746 Views)

One possibility is to get them via VMI; you have to query Win32_printer object and list all instances.

You can take my example on getting system info via VMI as a starting point to elaborate on.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 5
(1,737 Views)

Hi Roberto,

 

Thank you for sharing your example.

 

It seems a bit complicated to me, but I will try to understand in order to get the connected printers.

 

Do you know why NI has removed NIReport from the CVI package?

 

Bertrand

0 Kudos
Message 3 of 5
(1,692 Views)

Bertrand, I know that I am the developer of that sample program and so it's easier for me to modify it, but it took only a few minutes for me to extend the app adding the list of printers taking one of the available querying function and modifying it for win32_printers: I'm confident you will succeed as well considering that I structured all queries in 3 steps: preparation of the environment, actual querying step and closing step. You'll have to operate only on the second one.

 

As per NI_Reports, I don't know why but that instrument was declared closed by Luis G back in 2011 when he declined my suggestion to add a preview facility to it. Given that, it was only a matter of time for NIReport to be removed from CVI distributions.

Having said this, you should take a look at the last post by macksel in this other idea, which seems to suggest there is still a way to have NIReport working.

Disclaimer: I am not interested in using NIReport so I did not tried what macksel suggests.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 4 of 5
(1,668 Views)

The underlaying NI Report ActiveX control was old code they did not want to maintain and upgrade anymore. It would have required also work to make it 64-bit capable. So they decided to scrap it and not just in LabWindows/CVI. LabVIEW also had a provider in its Report palette that was using the NI Report engine. They kept the HTML and the Excel provider but removed the NI Report one.

Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 5
(1,630 Views)