Cannot choose printer when printing HTML report

Hello,
I have lost many many hours trying to print correctly a report that is composed only of a JPEG image.
After a conversation in the forum, I concluded that the LabVIEW has a bug printing Standard Reports, as it cannot manipulate correctly the margins and the scale of the image. But, when using Standard Reports I could choose which printer to use.
So, I use HTML Reports that print the report smoothly, but the choise of the printer has a problem. No matter which printer is chosen by a Ring Menu, it prints to same printer all the time.
Could you please give me any hint to solve this problem?
I attach the corresponding code:
Solved!
Go to Solution.

Hey guys, this is Paul with National Instruments.
Being employed at NI I am obligated to provide a big disclaimer about the information I am about to provide:
MANUALLY CHANGING YOUR WINDOWS REGISTRY CAN CAUSE CORRUPTION AND ERRORS IF YOU ARE NOT CAREFUL.  DO SO AT YOUR OWN RISK.
With that being said, nikosfs was on the right track by editing his Windows Registry to perform this action.  Please see the following steps, and see if it helps further explain what you need to do:
Open the Registry Editor. To do this, click Start >> Run and type "regedit", then press OK.
Navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows.   In this key there should be an entry called Device with values that should match up with your default printer.
Right click on the Windows key, choose "Export" from the menu that pops up, and save the Registration File as printer1.reg.
Leaving the Registry Editor open, change your default printer. To do this, go to Start >> Settings >> Printers and Faxes. Right click on the printer that you want your report to print to, and choose the option "Set as Default Printer".
Go back to the Registry Editor, it should be noted that the value of the Device entry has changed to the new default printer. Right click on the Windows key again, choose "Export" from the menu that pops up, and save the Registration File as printer2.reg
These two files may now be used to manipulate your default printer settings in conjunction with the System Exec.vi. The figures below show how to use the registry files and the System Exec.vi. 
→ The "/s" in the text field makes sure that this vi will run without interrupting regular user interaction.
→ The path constant is set to "c:\" because the Registration Files were saved directly in the C drive. Change according to location of Registration Files.
Make sure that this operation is called before the Print Report.vi is called, as it will print just to the default printer.
Paul Davidson
Sound and Vibration Software Staff Product Support Engineer
National Instruments

Similar Messages

  • My printer double prints when printing

    My printer (Hp Officejet 5610 All -in-One) double prints when printing. What should I do?

    Hi,
    Disconnect the  USB cable and follow the below steps  to restart  the spooler service.
    Click Start (Windows logo) >> All Programs >> Accessories >>
    Right click on  Command Prompt and open it as Administrator ( choose run as administrator)
    Enter the below command in black window and hit enter key..
    net stop spooler
    That will stop the spooler service.
    Then enter the below command and hit enter key to start the spooler service
    net start spooler
    That will delete the current print comment and the  things in print queue.
    Press the widnows key and R key on the key board to open run window ( Click on Start >> Run).
    In run window  enter services.msc and click Ok.
    That will open services window.
    From there double click on the print spooler service.That will open a new window.
    Click on Stop button to stop and then click on start button to restart the spooler service.
    Make sure that startup type is : Automatic and Service status is : Started
    Click on Apply and Ok to close the services window.
    If the issue resolved,
    Say "Thanks" by clicking the Kudos Star in the post that helped you.
    Saul
    Tech Support Eng.
    HP

  • I use floating time zone with all of my iCal entries.  But then the times of the entries do not print when printing month view.  Is there a fix for this?

    I use floating time zone with all of my iCal entries.  But then the times of the entries do not print when printing month view.  Is there a fix for this?

    Sorry to have repeated this question as if I were answering it.  Just a mistake.  I'm just now learning how to use this site.

  • Change output printer when printing a production order

    I can see that there is a specific printer associated with the output of a production order.  Is there a way to change the destination (a different printer) when printing a single production order?
    Right now I can see where the printer destination is shown in CO02, but I do not know how to change it. The screen is display only. The menu path is Order->Settings->Print info.
    Any help would be appreciated.

    Hi Janet,
    Try this.
    Path: CO02 -> Enter PO-> Settings -> List Control -> Here you can change the printer -> Click on continue button.
    Regards,
    Ferry Lianto

  • Printing when printer off

    Might be a stupid question but if i send email to print when printer is off does it print when printer is switched back on, or does it have to be on to work which kinda defeats the point of calling it remote printing 
    This question was solved.
    View Solution.

    Hi,
    Print jobs sent to the printer once it turned off will not be printed of course, however the print job will remain on the server up to 24 hours. the job will be printed one the printer turned on and connected to the network during that timeframe:
    http://h10025.www1.hp.com/ewfrf/wc/document?docnam​e=c02908385&cc=us&dlc=en&lc=en&product=5058338&tmp​...
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

  • Open & print an existing HTML report

    I want to open a previously created, saved & closed HTML report for printing.  I don't see any thing in the Report Generation vi group for opening existing reports and wasn't sure how to go about it (if at all possible) using the standard file open options to get to a report.  Any ideas?  Thanks.

    Hello,
    To print and view an HTML report you have already saved to disk, just create a new report, and use the "Append User Formatted HTML to Report.vi" to append the entire HTML content of the report to a new report.  Then use the "Print Report.vi" and "Open HTML Report in Browser.vi" to print and view it.  This is the easiest way I can think of...here is a screenshot showing what I mean:
    Hope this helps,
    -D
    Message Edited by Darren on 04-18-2006 01:31 PM
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman
    Attachments:
    print_and_save_report.jpg ‏84 KB

  • Printer Setup for HTML reports (Landscape)

    I'm trying to print an HTML report in Landscape, the Report Orientation VI only works with Standard Reports, and I can't find anything that will let me modify the "Printer Setup"
    Anyone done this?

    Jeff,
    To print an HTML report it first has to be rendered. To render HTML, you need a browser. For example, you can render HTML in either Internet Explorer or Firefox or Opera, and all three might render the same data slightly differently. To simplify the situation let's say that you're using IE. Once IE renders the HTML, you then have to get it to send the rendered output to the printer. So you can see why it isn't time or cost-effective for NI to try and necessarily support these functions. For the end user however, I'd guess that quite a few people have had this problem.
    I have had to do a lot of digging around to get HTML reports to print right. My solution has been to use an ActiveX container with an IWebBrowser2 object (Internet Explorer). This will let you load and print HTML reports programatically however (glancing back over some old code) I don't see immediately how you can print a report in Landscape. With an ActiveX container however you can call the IE print preview function which will let you (the user) modify the report printing to Landscape. It's not a programmatic solution since you have to interact with the GUI but it works. Also, once you set the setting to Landscape, everything printed afterwards using your ActiveX container will also print in Landscape.
    Something else which may not apply to you (but maybe--I'll at least mention it) is printing a landscape single image... that's usually why I needed to print landscape... to print out a full page screenshot of a graph or something. I do this in portrait mode by just attaching the control image but rotating it first and adding the HTML code to make it 100% of the vertical page.
    Last but not least, if you are 100% set on using a programmatic implementation to print a landscaped report (no user interaction), the best thing to do would be to build on an ActiveX implementation so that your report is being loaded and printed from an embedded IWebBrowser2 object. With the IWebBrowser2 object there is an option for using a pre-defined print template. This option is NOT for the faint of heart and requires you basically to re-program the whole IE print-preview functionality. However, it's not impossible either, it just takes the time of learning basically how the IE print preview interface works and then adapting it to your application (in this case, landscaped printouts). This is also the ONLY way to change HTML report headers and footers. The print preview interface in IE is written entirely in javascript--you can get details on msdn (search for "print preview templates"). However, there isn't really enough info there to do things with any ease. So....
    If you get to the point where you get an ActiveX container working and want to fool with the IE print preview javascript templates, let me know. I have extracted the entire template and associated images from the windows DLL it is stored in so I could adapt it and change the headers and footers for my reports and things of that nature.
    Now that I mention it, I believe that is the only way also to actually set landscape or portrait--by programmatically changing the printing margins (so it prints 11x8.5 instead of vice versa).
    Anyway, hope that helps...

  • Cannot find printers when printing pdf files

    I cannot find all the printers installed in the PC when printing pdf files.  I have re-installed the printer driver but it still cannot work.  Please help.

    I cannot access 'properties' for my hp1536dnf mfp.

  • Always duplex printing when printing through cups server

    I have about 6 printers which people normally accesses through a cups server running on a Linux box.
    We have always printed through the cups server from the Macs we have - and this has always worked great (they get auto-detected as shared printers and so on).
    But a few months ago something changed on the Macs - they can now ONLY print duplex - nomatter what i tell them to do in the print dialog. When printing first to a postscript file and then sending the postscript file to the printer (via terminal/lpr) everything gets printing correctly - but when using the printing dialog it always prints duplex.
    When printing to the printers directly (many different models) everything works - but going through the cups server - only duplex.
    All our Linux machines prints both duplex and simplex as they should, so the cups server isn't the problem.
    Has anybody else had this problem?
      Other OS  

    Armin,
    You need to do the following to make the duplex printing work for postscript in Oracle Reports.
    You need a printer with duplex option and an appropriate PPD file.
    You also need the Unix tool sed to filter the output file.
    The problem is that duplexing is enabled in the job level set up of the PostScript document but gets reset in the page set up because paper size and printer tray information is generated for every page. The workaround would be to write a script, which removes page level set-up information for the paper size and printer tray set up commands. As a side effect of this - it is no longer possible to switch the printer tray between pages.
    Write a sed script file called 'duplexsed' with the following three lines. This
    /^%%BeginPageSetup/,$ {
    /^%%BeginFeature/,/^%%EndFeature/d
    Copy the file to an appropriate directory, for example $ORACLE_HOME/bin.
    Set the environment variable TK_PRINT:
    TK_PRINT="sed -f $ORACLE_HOME/bin/duplexsed | lpr -l -s -P'%n' -#'%c'"
    export TK_PRINT
    Note that the print command is different for the various kinds of Unix.
    You may need to refer your installation guide and make changes to the lpr command
    Thanks
    The Oracle Reports Team

  • Choosing layout when running a report in the background

    Hi Experts,
    I have the following question: when executing a report in background that doesn't have the layout variant as selection criteria, how can I choose which fields are displayed in the spool?
    I am particularly interested in the logistic reports: ME2N, ME2L, ....
    I am using SAP ECC 6.0.
    Kind regards,
    Francisco Melo

    I believe the process to do this is to:
    1)  Go to transaction SM36 to create a batch job. 
    2)  Enter a job name
    3)  Select "Step", specify the ABAP program name (for ME2M, this is RM06EM00), then type in the variant you wish to use
    4)  Save, then go to Start Condition and specify when you want this batch job to run, along with the frequency
    Edit - nevermind, I misunderstood the issue.  I am unsure of how to have the layout automatically populated.
    Edited by: Andy Slania on Jan 26, 2011 10:28 PM

  • Garbage text prints when printing documents from InDesign

    I am encountering an odd error when printing from InDesign 4.0.4 (CS2) to some HP printers (HP 4650 and 2430n). Some documents print just fine with no problems. But a couple of documents will either never print, or when they do print, they print a line or few of garbage text (black diamonds, smiley faces, etc.) per page, plus some blank pages, and it will run through tons of paper when it does this.
    I've found the following document which describes my problem pretty closely.
    http://h10025.www1.hp.com/ewfrf/wc/genericDocument? docname=c00028613&cc=us&dlc=en&lc=en&jumpid=regR1002USEN
    The problem is that I have set the Graphics to print as ASCII, and this problem still occurs. Could it be a problem with a particular EPS file printing or something? This document (with all of the included text, EPS images, etc) become fairly sizeable, such as 150 MB in size. The HP 4650 has 512 MB of memory, whereas the HP 2430 has 64 MB of memory.
    I printed this same problem document from another computer, with all of the same settings in InDesign, and it printed with no problems.
    Any idea on what is going on here?

    Hello Chad,
    Do you know if the two printers support PostScript? It sounds like they don't and therefore they will be using filters to convert the PS data from InDesign into a format that it understood by the printer. It will be in this conversion process that something will be going astray and that will cause the corrupted output. Try running a Repair Disk Permissions to see if this helps.
    I don't believe the amount of RAM will cause the problem, it should only impact the speed at which the document can be spooled from the Mac. However, if the error is only occuring from InDesign and when working with large files, then it may have something to do with it. But if the other PC is okay then it may rule out the RAM. What print language is the other PC using to print to the HP's?
    Regards,
    Paul

  • Crashes intermittantly ( every other print ) when printing PDF forms

    using a mac osx lion running firefox 10.0.2 and adobe reader pre release 11.0.0 when printing these pdf forms for real estate industry fire fox will intermitantly crash. this happens to all users running adobe 9.x.x - 10.0.1 i have run thourgh firefoxes tests to no avail. any other suiggestions.
    updated plug ins
    checked for osx lion updates
    updated firefox
    staretd in safe mode
    tested in adobe 9 - 11
    tested on PC no issues
    only firefox for mac

    OK
    I debugged further I solved my issue.
    I found that the system crashed when it was reading an include text on the context. The include text was missing on the test case that whent wrong. So I whent to the context and ticked the flag "no error if no text exist" on the include text. Then I got no error and my PDF printed.
    So, I don't think the issue Oscar is having comes from the printer or the RFC connexion. Just check the include texts you are using on the context and mark the "no error..." flag.
    David

  • No black print when printing ...?

    When printing, black text is not or very vaguely appearing (ink cartridge replaced already) + in middle of the page some letters are having stripes through them? Several clean up processes done already. How can I solve this?

    Please read this post then provide some details. What printer model? What operating system?  Is the black cartridge an HP or a reman/refill? 
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • How can I fix a printing problem: message cannot print document: "no pages selected to print" when printing a pdf file.

    I am having problems printing a pdf document. When I select a file to print and try to print it says that "no pages selected to print". The default all pages was selected by me but the message keeps coming up. I recently installed adobe reader version 11. Rebooted the computer but sitll having issues printing docs.
    Jerseyguy

    Hi Pat.
    Yes, both of them lead to the very same error.
    I have a workaround, kind of, where I preview the document and select all the pages that are correct (read showing on the pages preview) as included in the 1st screenshot.
    As you can see in the first screenshot, the 5th page seems to be non-existandt, however as I try to preview it from the 3rdP software, it comes up just fine and from there I can print it individually... just annoying when you have 50 pages and 6 of then are randomly not showing up.
    If I try to print the whole document, it simply gives me the 2nd, 3rd and 4th screenshots.
    As for the 3rdP software, as stated in prior posts, it has been working flawlesly for the last 5 years, and has not been updated in any way, shape of form... As you said, maybe it wouldn't be a bad idea to look into that, however I don't believe the contract for the software maintenance is still in effect...
    Thanks.

  • Can't choose what part of image to print when printing actual size.

    I have a pdf file that needs to be printed out to actual size, since the image is a temlate for a part that I need to cut out. Since the actual size is bigger than the paper size, it shows a purple box in the preview box, indicating what part of the document it's going to print. The first time I printed the image, it let me slide the box or the slider below, left to right to select what part of the document on wanted on the paper. But, now it's just locked in place. I'm not sure what changed. Does anyone know how to fix this?
    I'm using Windows 7 Pro 64bit, Adobe Reader XI. Printer is a Canon MP495.

    Francine, thank you so much for the tips. It took me over two months but I finally got around to trying to take care of this.
    I tried your suggestions in order. Steps 1-3 did not fix the problem, but reinstalling from Pacifist did (thank goodness!). Wish I had tried that from the get-go.
    Thanks again to everyone for all the suggestions.
    There are a couple of things to try:
    1. If you haven't done so lately, try Disk Utility
    and Repair Permissions. Won't hurt, it's quick and
    easy, and there is a remote possibility that it will
    help. It actually does occasionally fix something
    strange like this.
    2. Go to http://www.apple.com/support/downloads/ and
    download the COMBO 10.4.8 updater (it is huge, like
    148MBs) and run it, then Repair Permissions again.
    3. Restart and hold down the Shift key when you hear
    the startup chime. This will force the computer to do
    a Safe boot. When you see the splash screen saying
    "Safe Mode" release the Shift key. The boot will take
    longer than normal as the system repairs the disk,
    empties font caches, and disables startup items. Not
    sure if Image Capture will run correctly with some
    Apple startup items disabled, but you can try it.
    Restart normally afterwards.
    4. You can download Pacifist here:
    http://www.charlessoft.com/
    It will extract things from your Install disk so you
    can install only what you need, in your case Image
    Capture.
    My Image Capture has never had a problem, so I'm
    afraid all I can recommend is these general
    approaches. Hope one of them helps.
    Francine
    Francine
    Schwieder
    g4 laptop Mac OS X (10.4.8)

Maybe you are looking for

  • Lumia 620 Music problem with wired headset

    Sometimes when I start listen music with my Lumia 620 using WH-208 headset (great price/quality ratio),music is only heard from left earpiece. Then I switch power off/on and it plays normally. This has happeded before and after Amber update.

  • How to re-write this self join update using a CTE

    I would like to improve my performance on this update statement and would like to try re-writing using a CTE: UPDATE "usr_sessions" "a" SET "is_ended_at_trustable" = 't'       WHERE (         EXISTS (           SELECT 1           FROM "usr_sessions"

  • Open same file twice

    I m working on a application in which if i open an already opened file (which is minimised), it gets opened in a new window. I want the minimised file to get open. How do i solve this problem. Any code sample will help. Thanks in advance

  • Save for web 12.0.1 filetype option display error

    Hi When I 'save for web and devices' the information panel below the image panel remains stuck on 'GIF' whether I select GIF/jpeg/ping etc in the top right dropdown, The file will save in the correct format, and preview in the correct format (which i

  • None of buttons shown by Gmail or Yahoo Classic Mail works

    Dear Sirs, in Windows XP SP3, using Firefox 7 nor 7.0.1 , none of buttons shown at the top row by Gmail or Yahoo Classic Mail works and even I cannot do a sign out of my email box . I had not this problem when using Mozilla Firefox 6 series and earli