Send 10g reports directly to the default printer of the client machine

Hello..
We are using Oracle DS10g and Forms & Reports service 10g. When the user clicks on the report button I want to send the report directly to the default printer installed in the client machine. In this case the printer name may vary and I cannot parameterize the DESNAME parameter. How do i know what is the default printer? Any clue as to how can achieve the desired result?
Thanks

If you use webutil in your shop. You can use the CLient_win_api_environment.read_registry to get the default printer. In the run_report_object, desname gets set to the default printer.
This can also be found in metalink.
               V_PRINTER := CLIENT_WIN_API_ENVIRONMENT.READ_REGISTRY('HKEY_CURRENT_USER\software\Microsoft\Windows NT\CurrentVersion\Windows','Device',TRUE);
               V_PRINTER_LENGTH := LENGTH(V_PRINTER);
               V_PRINTER_BLANK :=     INSTR(V_PRINTER, ',');
               IF V_PRINTER_LENGTH > 0 AND V_PRINTER_BLANK = 0 THEN
                    :P_OUTPUT_FILE := V_PRINTER;                    
               ELSIF V_PRINTER_LENGTH > V_PRINTER_BLANK THEN
               :P_OUTPUT_FILE := SUBSTR(V_PRINTER, 0 , (INSTR(V_PRINTER, ',')-1 ));                    
               END IF;

Similar Messages

  • How can I retrieve the IP address of the default printer from the windows registry

    I am using LabVIEW 7 on windows NT4 computers.
    I have a SubVI that I use to ping the network printer to make sure that the printer is on line prior to sending a print at the end of testing a unit.
    If LabVIEW does not get a reply to its ping data is saved locally and the user informed.
    I would like to modify the VI that pings the printer to ping the default printer of the computer on which the VI is running.
    I would be grateful if anyone can show me how to retrieve the default printers IP address.

    Hi Stuart,
    The registry entries for User's Default Printer are:
    Win 9x:
    [HKEY_CURRENT_USER\Software\Microsoft\Windows\Curr​entVersion\Windows]
    NT/XP:
    [HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows]
    "Device"="Printer Name"
    The device is the name used to represent the printer in the registry. The name can be found in the [HKEY_CURRENT_USER\Printers\Settings] key.
    Machine name is part of the "Printer Name," which you can use to ping directly (i.e., w/out having to look-up its IP address).
    Hope this helps.
    Regards,
    Khalid

  • Problems with sending a report to a non-default printer

    When sending Escape-codes to a non-default Windows printer the printer doesn't accept them.
    For example sending a report to a fax-printerdriver which is not set as default doesn't seem to work.
    It's therefor also not possible to send a report to a non-local printer (non-default) which contains invoicepaper and that needs it's paperlength to be adjusted.
    I hope someone can help me to solve this problem.
    Gijs van Kooten

    hello,
    it is kind of hard to determine your exact problem without any further information.
    however, it might be a good idea afterall to contact oracle support services in this matter.
    regards,
    the oracle reports team --pw                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Outlook 2010 only pick up the default printer, ignore the manually selected printer.

    when I want to print paper through word or excel, I select printer-A, I got the paper from printer-A, which is fine. but in Outlook 2010, I did the same selection of Printer-A, and the outlook show the printer-A had been selected, but the paper was came
    out from printer-B, which is default printer in the windows 7...
    is anyone having this problem?

    Hi,
    I've seen some add-ins caused this issue, please start Outlook in Safe Mode to print:
    Press Win + R, type "outlook.exe /safe" in the blank box, press Enter.
    If then there's no problem selecting the printer to print, disable the suspicious add-ins to verify which caused the problem.
    Regards,
    Melon Chen
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • How to print a report directly on to a printer on the client machine

    Hi,
    Could anyone let me know how to print a report directly on to the clients default printer in oracle forms 10g with OAS?.
    Regards,
    Prasad.

    Hello,
    <p>You can use this Java Bean</p>
    Francois

  • How do I change the default printer in the newest version of adobe reader?

    Just downloaded the newest version of adobe reader and am unable to link it to my cannon printer

    Hi fldiva,
    Do I understand correctly that your Canon printer doesn't show up in the Printer drop-down menu in Reader's Print dialog box? Does it show up in other applications?
    Best,
    Sara

  • Pages does not select the default printer.

    I have an IMac, 2.8 GHz, running version 10.6.5 connected to a Canon MX860. Under Print & Fax preferences, I list two printers. The first is Canon MX860 USB and the second is Canon MX860 Wireless. The default is set for the wireless. On all applications except "Pages", the default printer is the one selected. But, PAGES always selects the USB one. Is this a bug in PAGES, or is there something I can do?

    Yvan, not wishing to incur your ire... I have a similar problem and went through pages of discussions generated by the search function. I cannot find a thread matched with exactly with what I believe to be the issue here. My default print setting is wireless and all apps respect that including Pages (Version 09) generic templates. However, when I print from a Pages template that I created, it always defaults to the USB connection of my printer - and I do not leave the USB cable plugged in. I have tried to modify the template by opening it, File, Page Setup, Attributes, Format for wireless printer - save template.... Yet it still defaults to the unconnected USB version of my printer. Even doing page set up and then trying to print immediately, it defaults to the USB version. My printer is HP Photosmart C4585.
    Yvan if you know of the right thread, apologies but could you point me to it please?
    Many thanks for your patience

  • When changing the default printer in windows vista why doesn't the default printer change in firefox (firefox was running when the default printer was changed)?

    I am not sure whether or not this is a bug or a feature, but I was running firefox on my laptop. I then went to add a new printer and set it as a default printer. When I went back to firefox to print, it did not automatically choose that new default printer as the printer of choice. I then had to choose the new printer manually to print to. This is merely a convenience issue but thought I would bring it to the attention of Mozilla in case.

    Hello bradleesargent
    as i can see the note in the kb article ([https://support.mozilla.org/en-US/kb/how-print-websites#w_print-window-settings Print window settings]) ''The default printer is the Windows one. When a web page is printed with the selected printer, it becomes the new default printer.''
    do you have your previous printer also, or you uninstall the previous printer and then install the new one and make it default ?
    I think firefox must be closed when you set up a new printer. Do you have it open when set up the new printer ?
    thank you

  • Why doesn't printing use the default printer?

    I have two main printers to use at home and whenever I print a web page, Firefox automatically prints using the non-default printer. If I select the default printer from the drop down list, it works fine. I shouldn't have to select the default printer every time I want to print.

    Note that NONE of the replies answer the original question.
    The key word in the question is "'''Why'''" and "default printer" refers to the system's default printer.
    Why does Firefox behave differently than any other Win app when it comes to printing, ALWAYS use the system's default printer UNLESS the user changes it (''and NOT memorize the choice'').
    To put it another way, '''Firefox should NOT always use the last printer selected'''.
    '''This non-standard printing behavior should be changed.'''

  • How do you send report to a file & a printer at the same time?

    I need to run a 10g form that will get the filename that the user wants to save the report as and also a printer that the user would like to print the report to at the same time. I've tried using the distribution option with an xml destination file, but I keep getting errors when try to use variables in the xml file. Anyone know how to do this?

    I'm not sure which variables with which you're having troubles, but the following distribution file format accomplishes what you requested here (ver 9.0.4.2 running on Windows 2003-YMMV), provided that the Report Server can see and has rights to:
    1) The specified printer.
    2) The specified destination directory.
    <destinations>
    <printer id="p1" name="\\myprintqueue\my_valid_priner_name">
    <include src="report"/>
    </printer>
    <file id="f1" name="\\MyFileserver\ASubdir\DestSubdir\MyFilename.PDF" format="pdf">
    <include src="report"/>
    </file>
    </destinations>
    Paul Sturgis

  • How to send a file top the default printer?

    Hello,
    I have generated, using Java code, a certain HTML file and wrote it to a certain location on my local machine. I would like now to automatically send this file for the default printer for printing, this way the user won't have to manually open the file and select
    file->print from the browser window and then print it.
    How can I acomplish this?

    hi
    good
    how can you identify which file you r going to print and which file you r going to print.if you r going to print all the file from that particular location than you can do it through jsp, but i dont think it can be done automatically, the user has to select the particular location where you have stored the file in you hard disk and i will go for printing.
    Thanks
    mrutyun

  • Print reports directly in a local printer

    Hello buddies,
    Well, i wanna know if exists some way to print a reports directly in a local printer when using forms 9i ...
    the procedure built-in "PRINT", open a dialog box to choose the printer to send the printscreen... maybe exists a way to make it for the reports...
    thx a lot.
    Regards,
    Prado

    This will work for you.
    DECLARE
    pl_id ParamList ;
    Repid Report_Object ;
    Rep_Status Varchar2(20) ;
    Tag Varchar2(20) ;
    BEGIN
    :Global.Printer := '\\Pc Name\Printer Name';
    -- printer_name is the name of the printer on your local machine
    -- The printer should be a whole name like 'HPCOLOR6L'
    -- The printer should be shared, and should not have blanks or other special chars
    Pl_Id := Get_Parameter_List (Tag) ;
    IF NOT Id_Null (Pl_Id) THEN
    Destroy_Parameter_List (Pl_Id) ;
    END IF ;
    Pl_Id := Create_Parameter_List (tag) ;
    add_parameter (Pl_Id , 'paramform' , Text_Parameter , 'NO') ;
    Repid := Find_Report_Object('rep010_bpass') ; -- name of the report where it should be definded in the report section of the Oracle forms builder
    Set_Report_Object_Property(Repid,REPORT_FILENAME,'Report path with report name') ;
    Set_Report_Object_Property(Repid,REPORT_EXECUTION_MODE,RUNTIME) ;
    Set_Report_Object_Property(Repid,REPORT_COMM_MODE,SYNCHRONOUS) ;
    Set_Report_Object_Property(Repid,REPORT_DESTYPE,Printer) ;
    Set_Report_Object_Property(Repid,REPORT_DESNAME,Global.Printer ) ;
    Set_Report_Object_Property(Repid,REPORT_SERVER,'Report server name') ;
    IF Rep_Status = 'FINISHED' THEN
    NULL ;
    ELSE
    MESSAGE ('Error Running report ...') ;
    MESSAGE ('Error Running report ...') ;
    END IF ;
    END ;

  • How to send a report directly to spool..?

    Hi guyz !
       How do i send a normal report directly to spools at execution.
       Please advise .
    Thanks in adv.
    jahan

    hi,
    The easiest way of printing a list while creating it, is for the user to choose Execute + print on the report's selection screen. The user can choose between displaying the list on the screen (choosing Execute) or printing it directly without displaying it (choosing Execute + print).
    use this function module <b>SET_PRINT_PARAMETERS'</b> to send a report directly to spool.
    <b>sample program.</b>
    REPORT SAPMZTST NO STANDARD PAGE HEADING LINE-COUNT 0(2).
    PARAMETERS P TYPE I.
    INITIALIZATION.
      CALL FUNCTION 'SET_PRINT_PARAMETERS'
           EXPORTING
                ARCHIVE_MODE   = '3'
                COPIES         = '5'
                DEPARTMENT     = 'BASIS'
                DESTINATION    = 'LT50'
                EXPIRATION     = ' '
                IMMEDIATELY    = 'X'
                LAYOUT         = 'X_65_132'
                LINE_COUNT     = 54
                LINE_SIZE      = 20
                LIST_NAME      = 'Test'
                LIST_TEXT      = 'Test for User''s Guide'
                NEW_LIST_ID    = 'X'
                RECEIVER       = 'KELLERH'
                RELEASE        = ' '
                SAP_COVER_PAGE = 'X'.
    START-OF-SELECTION.
      DO P TIMES.
        WRITE / SY-INDEX.
      ENDDO.
    TOP-OF-PAGE.
      WRITE: 'Page', SY-PAGNO.
      ULINE.
    END-OF-PAGE.
      ULINE.
      WRITE: 'End of', SY-PAGNO.
    <b>or</b>
    Printing Lists
    You can send a list from a called program directly to the spool system instead of displaying it on the screen. To do this, use the TO SAP-SPOOL addition in the SUBMIT statement:
    <b>SUBMIT... TO SAP-SPOOL print-parameters.</b>
    <b>follow this link for more information.</b>
    http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dba54635c111d1829f0000e829fbfe/content.htm
    regards,
    Ashokreddy.

  • Is there a way to change the default print tray on an HP LaserJet 500 color M551 Printer

    Hi
    Is there a way to setup the default print tray for a HP LaserJet 500 color M551 printer to be tray 2 printing both online and direct?
    If so what would be the best way to go about implementing it?
    Thanks
    This question was solved.
    View Solution.

    Usually, you can change the default paper trays through the control panel and through the Embedded Web server (EWS).
    Check the settings on your control panel. Here is a link to the User Guide, check out page 94 and see if that helps you out.
    m551 User Guide
    For the EWS, put the printer IP address into your browser, then go to the tab that would list tray settings. Not sure exactly which tab has it for this printer series, but on other printer series it is on the system tab under paper setup.
    I am an HP employee.
    Say Thanks by clicking the Kudos Star in the post that helped you.
    Please mark the post that solves your problem as Accepted Solution

  • CR XI R2 Sp6 - How do you change the default printer used by the Viewer?

    CR XI R2 Sp6
    .NET
    VS2005, C++
    The app selects printer for the job as m_Report->PrintOptions->PrinterName = ss_Device;
    This works nicely for printouts to the printer, but is ignored by the viewer. There, the machine default printer is always selected when I hit the print button.
    Found this which is sortof similar:
    http://forums.sdn.sap.com/thread.jspa?threadID=1275149
    Is there any way to fix this? If no, then is it fixed in more recent versions of CR?

    All of that above can be changed at runtime, but you'd somehow need to figure out what the default printer driver is on each machine and then assign it to the report.
    Yes,but that is exactly what I do. The app normally uses the Windows default printer just as any C++/MFC app will do. On the file menu there is an option to select printer which calls CWinApp::OnFilePrintSetup(); which sets the application default printer setup.
    In the app there is a function to retrieve the default printer:
    CString CLpApp::GetDefaultPrinter()
         PRINTDLG     pd ;
         CString          printer("Failed") ;
         pd.lStructSize = (DWORD)sizeof(PRINTDLG) ;
         BOOL bRet = GetPrinterDeviceDefaults(&pd) ;
         if (bRet)
              // protect memory handle with ::GlobalLock and ::GlobalUnlock
              DEVMODE *pDevMode = (DEVMODE*)::GlobalLock(m_hDevMode) ;
              printer = pDevMode->dmDeviceName ;
              ::GlobalUnlock(m_hDevMode) ;
         return printer ;
    When I print, I do:
    void CSkrivDlg::StartReport(CLpReportJob^ jobb)
         jobb->SelectPrinter("",theApp.GetDefaultPrinter(),"");
         if(m_tillSkrivare)
              jobb->OutputToPrinter(1);
         else
              jobb->OutputToWindow("Fönsternamn", 0, 0, 200, 200, 0, NULL, NULL);
    This works correctly for OutputToPrinter(1);, but not for OutputToWindow() which are simply wrappers for the CR functions:
    bool CReportJob::OutputToPrinter(int nCopies)
         bool rc = true;
         try
              m_Report->PrintToPrinter(nCopies,true,0,0);
         catch (Exception ^e)
              TRACE("
    %s",e->Message);
              m_LastError = e->Message;
              rc = false;
         return rc;
    // OutputToWindow()
    // a,b,c,d = Fönsterkoordinater eller noll för default
    // style = flaggor för fönsterposition
    // window = fönster efter vilket vi dyker upp
    // child = rapportfönstrets handle om vi vill ha den
    bool CReportJob::OutputToWindow(CString Namn, int a, int b, int c, int d, int style, CWnd* window, CWnd **child)
         bool rc = 0;
         CString title="Dummy1";
         title = m_Report->SummaryInfo->ReportTitle;
         CFloaterDlg *Floater = new CFloaterDlg(NULL);               // TODO: Get window
         Floater->Create(IDD_FLOATER_DLG, NULL);
         if(Floater != NULL)
              m_Report->ExportOptions->ExportFormatType = CrystalDecisions::Shared::ExportFormatType::PortableDocFormat;
              Floater->m_Viewer->ReportSource = m_Report;
              Floater->m_Viewer->Zoom(theApp.m_ScreenZoom);
              // Sätt fönsterrubrik från rapporten
              Floater->SetWindowText(title);
              // Puffa på så att den kan ändra storlek på Crystal-kontrollen
              Floater->Size();
              // Visa fönstret om det är stängt
              if(!Floater->IsWindowVisible())
                   Floater->ShowWindow(SW_SHOW);
              rc = true;
              if (child!=NULL) *child=Floater;
         else
              AfxMessageBox("Kunde inte skapa fönster för utskrift",MB_OK);
              rc = false;
         return rc;
    Floater is simply a dialog that holds the Viewer control.
    For some reason does the Viewer not obey the printer selection done in the report

Maybe you are looking for

  • Need code for sql update

    HI All, i have table with data like this select '[email protected]' mgr, null mgr1,null mgr2,null mgr3,'[email protected]:[email protected]:[email protected]'mgrfull from dual; 1)mgrfull column have with : sepreated email ,here last email split and u

  • Very frustrated with frequent crashings

    I am very fed up with my 2.3 dual G5 i bought this right after new year of 06, and for about the past month, it crashes programs on me, will not open software updates, and sometimes the ENTIRE SYSTEM CRASHES!! ive tried rebooting, i reinstalled the o

  • Determine which version of producer tools to download

    In Adobe folio builder panel my version is: 12.3.1.20120730_m_695362 7.5.5.20 We are using adobe InDesign cs 5.5 I am on a mac and my co-worker is on a PC. I need to find the correct link to the folio producer tools that is v20 so we stay compatiable

  • Passing a string as an object name...how?

    I've searched all over the place for a solution to this to no avail. I have a program that reads input from a text file. The text file holds information on student IDs, so it look something like this: "ID_1234" "ID_1235" "ID_1236" So, every line of t

  • How do I downgrade to gcc 3.3.3?

    I suspect that some of my problems with mythtv may be caused by gcc 3.4.3. Is there a good way to downgrade? When I simply downgrade the gcc package, I get errors left and right. I can't start up most progs, and I can't compile anything.