How to print a report on local/network printer(Sample Code)

Hi forms Gurus,
I'm looking for sample code witch allow to print report on local/network printer from Forms builder.
Plz help! it's very important.
TYAG.

Armand,
for Forms and Reports 9i, the only chance is to configure the printer as a network printer that is accessible to the Reports Server. In this case pass the printer's network name as desname and destype=printer as the Reports destination (e.g. desname=\network\printername destype=printer).
Alterantively, there exist an unsupported utility orarrp that you can get from the otn.oracle.com/products/forms web page.
Frank

Similar Messages

  • How Can I print Oracle Report 9i directly To Printer on the local network?

    Dear All;
    How Can I print Oracle Report 9i directly To Printer on the local network?
    or to any other computer ? or to my default printer without prevoiues know the printer name i mean found it in my connected printer?
    plear help me?
    Best Wishes

    1. Check documentation for DESNAME and DESTYPE
    2. See 1 as long as they are a shared resource
    3. Think you must know the name, but please check or documentation
    Regards,
    Martin
    PS. There's a Reports Forum here which would be a better option for posting this question

  • How does one print to a Large Format Network Printer in Adobe Reader X?

    I have just installed Adobe Reader X on a machine that previously had Adobe Reader 9 (I had to format the hard drive so this is a fresh installation).  When attempting to print to a large format Printer (36x24) across the network I cannot change the paper size.  Despite attempting to change the paper size to a number of different configurations Adobe X will not print anything but 8.5"x11.0" (which is the default paper size on the local printer).  I have tried making the network printer the default printer and that does not make any difference.  Everything worked fine with Adobe Reader 9 but not X.  Can anyone offer any suggestions?
    Also, I can print to both the local printer and the large format network printer fine through other applications.
    Thanks.
    Ben

    Just finished testing 10.10 printing via a Windows 2008 R2 print share. I also found that when trying to add the printer using CUPS I would get an authentication error. But if I added the printer using the Windows section of the Add printer pane, then I was able to print fine.
    So with you mentioning that using the Windows section of the Add printer window has never worked (which is interesting because it's always worked for me) I want to suggest another approach to adding the printer, still using the Add printer window. With this window open you can right-click on the toolbar and select Customize Toolbar. You can then drag the Advanced icon to the toolbar. Then when you select this, you can set the Type menu to "Windows via spoolss" and then enter the URL as smb://servername/sharename. Select the supporting driver and click Add to complete.
    Then when you select to print for the first time using this printer you will be prompted to authenticate. Enter the account details, set the save to Keychain option and OK to send the print job.
    This worked fine for me and creates the same queue as using the Windows add printer setting. Curious to hear if this gets your co-worker printing again.

  • Can anyone tell me how to install a network printer driver without having the network printer online?

    Can anyone tell me how to install a network printer driver without having the network printer online? It doesn't matter what manufactors make the network printers. Is a netwaork printer(with network card) has to have that printer on line to be able to install
    the driver? This is the point of my question!
    I've ask a same type of question previously, but I can't either get good answer nor reply on the response.

    DP
    The computer (and driver) have to handshake with the printer, QED it has to be either online or physically connected and if it is physically connected it wont work on the network so yes it does.
    Wanikiya and Dyami--Team Zigzag

  • How to save the report file in network drive

    Hi experts,
    Can any one of you pls tell me how can  save the report file in network drive.
    My requirement:
    by running a report i wll get daily data into a list.SO, i want to keep this in a common drive (network drive:Z) where every one can acces the txt file.
    I want the code in SAP to design this.
    Awaiting for an early reply.

    Is the Z drive in the application or presentation server ?
    make sure the server has write access to the required folder
    for presentation server
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename              = 'c:\test_xls.xls'
        filetype              = 'ASC'
        write_field_separator = 'X'
      TABLES
        data_tab              = itab.
    for the application server, use
    data: outfile(120).
      OPEN DATASET outfile FOR APPENDING IN TEXT MODE ENCODING DEFAULT.

  • Printing from iPad - Why do I need third party app to print to a local network printer??

    Why do I need to pay for a third party app to print to ALL local network printer?? I understand that only some printers are compatable with iPads, but yet application like "iCanPrint" allow me to print just fine to a printer connected to my network. Why can't Apple include this as one of its features? Technology is apparently there?

    For that, and the many other apps to work, you need to be running a pc or Mac on the network.  The answer is drivers.  Every printer in the world needs a driver.  There simply is not enough space on a pad to load every possible printer driver that might be in play.  in the pc world, the operating system comes preloaded with hundreds of common drivers, and when you buy and install a new printer, you download the new drivers for that new printer.
    That all just will not work on a pad or phone.  So apple flipped the issue upside down, and said...'here is the printer driver we will make standard for its devices.  We call it AirPrint.  Include this in your printer'.    A lot of manufacturers have, and more printers are enabled each month.   
    So your choice is pretty basic.  You can buy an AirPrint enabled printer and print directly to it, or buy a non AirPrint printer, or use the one you have, and rely on your pc to act as the translation device to manage the print job.

  • Print a report to a specific printer from Forms

    I have a form from where i want to print a report to a specific printer (not the default printer). Is there any way to do this from Forms 9i. Im using the Orarrp but it pops up the printer dialog and shows the default printer. Is there any way to harcod the printer name. the printer is on the network..

    If i go to my control pannel and see the list of printers i take the printer name from there. should i put the path of the printer? i kno the port of the printer .it come like ip_192.1.11.1_p1 ..how do i define the printer name? if i dnt give the printer name shouldnt if fire to the default printer ..my code is as follows
    declare
    REPID REPORT_OBJECT;
    V_REP VARCHAR2(100);
    REP_STATUS VARCHAR2(20);
    BEGIN
    REPID := FIND_REPORT_OBJECT('CUS_PRINT');
    SET_REPORT_OBJECT_PROPERTY(REPID,REPORT_EXECUTION_MODE,BATCH);
         SET_REPORT_OBJECT_PROPERTY(REPID,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(REPID,REPORT_DESTYPE,PRINTER);
         SET_REPORT_OBJECT_PROPERTY(REPID,REPORT_SERVER,'test');
    SET_REPORT_OBJECT_PROPERTY(REPID,REPORT_OTHER,'P_CUSREF='||:CTRL01.CUSREF||' PARAMFORM=NO');
         MESSAGE('SET REPORT PROP');
    V_REP := RUN_REPORT_OBJECT(REPID);
    REP_STATUS := REPORT_OBJECT_STATUS(V_REP);
    MESSAGE('RAN REPORT');
    WHILE REP_STATUS IN ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP
         REP_STATUS := REPORT_OBJECT_STATUS(V_REP);
    END LOOP;
         IF REP_STATUS = 'FINISHED' THEN
              IF NVL('TEST',' ') <> ' ' THEN
              GEN_ALERT('NULL_ALERT','TEST');
              END IF;
              ELSE
         GEN_ALERT('NULL_ALERT','Error when running report');
         END IF;
    END;
    what should the desformat of the report should be..when im trying to run this it gives me 'no data found' error...why???

  • Firefox crashes on Windows 7 when printing to a Windows 7 network printer.

    On Windows 7 running Firefox 3.6.10, I cannot print to a Windows 7 network printer. Firefox crashes every time as soon as I hit print.
    However, the situation is very specific. I can print from Windows XP using Firefox 3.6.10 to a Windows 7 network printer. I can also print from Windows 7 using Firefox 3.6.10 to a Windows XP network printer. The only situation that doesn't work is using Firefox and printing from Windows 7 machine to Windows 7 machine.
    Firefox is also the only program that does not print. I can print using Internet Explorer, Google Chrome, MS Word, MS Excel, and every other application just fine. Firefox is exclusive in that it is the only program that crashes and refuses to print. The drivers that are being used a PostScript drivers.
    I have tried multiple versions of Firefox from older ones to the Firefox 4 beta and the program crashes every time.
    Again, the only time it crashes is printing from a Windows 7 client computer to a Windows 7 network printer. Printing from XP to Windows 7 and from Windows 7 to XP works.
    Any help would be greatly appreciated. The only program I've noticed the problem with is Firefox, so I'm assuming it's a problem at the application level.

    Here is the Crash Report for a user more experienced at reading Crash Reports than I am: <br />
    http://crash-stats.mozilla.com/report/index/45f47e99-ea8e-449f-aa1e-6399e2101014
    Here's a search for that particular Signature - [http://crash-stats.mozilla.com/report/list?product=Firefox&query_search=signature&query_type=exact&query=OPBinaryCookedPortWrite&date=10%2F14%2F2010%2014%3A00%3A00&range_value=1&range_unit=weeks&hang_type=any&process_type=any&plugin_field=&plugin_query_type=&plugin_query=&do_query=1&admin=&signature=OPBinaryCookedPortWrite OPBinaryCookedPortWrite] <br />
    Looks like a Windows problem, but not restricted to Win7 or 3.6.10 - there's one on Vista SP2 with Firefox 3.6 and another with 4.0b6 on Win7.

  • How to Change Crystal Report database name from visual basic code?

    Hi all,
    I have created a Crystal Report (CR)  with .NET VB. I also have developd some UDTs for that pusrpose and everything is OK.
    However I cannot use the same CR in another Company which has the same UDTs. I have not found how Connect to Company (in other words change the DB the report reads).
    Any Idea?
    Thanks,
    Vangelis
    Edited by: Vangelis Kanellopoulos on Jul 19, 2008 6:07 PM
    Edited by: Vangelis Kanellopoulos on Jul 20, 2008 10:27 AM
    Edited by: Vangelis Kanellopoulos on Jul 20, 2008 10:28 AM

    Hi Vangelis,
    Here's a simple VB class that has functions for setting the login details for the report and passing parameters.
    Option Strict Off
    Option Explicit On
    Public Class CrystalFunctions
        Enum ParamType As Integer
            Int
            Text
        End Enum
        Public Shared Sub SetCrystalLogin(ByVal sUser As String, ByVal sPassword As String, ByVal sServer As String, ByVal sCompanyDB As String, _
               ByRef oRpt As CrystalDecisions.CrystalReports.Engine.ReportDocument)
            Dim oDB As CrystalDecisions.CrystalReports.Engine.Database = oRpt.Database
            Dim oTables As CrystalDecisions.CrystalReports.Engine.Tables = oDB.Tables
            Dim oLogonInfo As CrystalDecisions.Shared.TableLogOnInfo
            Dim oConnectInfo As CrystalDecisions.Shared.ConnectionInfo = New CrystalDecisions.Shared.ConnectionInfo()
            oConnectInfo.DatabaseName = sCompanyDB
            oConnectInfo.ServerName = sServer
            oConnectInfo.UserID = sUser
            oConnectInfo.Password = sPassword
            ' Set the logon credentials for all tables
            For Each oTable As CrystalDecisions.CrystalReports.Engine.Table In oTables
                oLogonInfo = oTable.LogOnInfo
                oLogonInfo.ConnectionInfo = oConnectInfo
                oTable.ApplyLogOnInfo(oLogonInfo)
            Next
            ' Check for subreports
            Dim oSections As CrystalDecisions.CrystalReports.Engine.Sections
            Dim oSection As CrystalDecisions.CrystalReports.Engine.Section
            Dim oRptObjs As CrystalDecisions.CrystalReports.Engine.ReportObjects
            Dim oRptObj As CrystalDecisions.CrystalReports.Engine.ReportObject
            Dim oSubRptObj As CrystalDecisions.CrystalReports.Engine.SubreportObject
            Dim oSubRpt As New CrystalDecisions.CrystalReports.Engine.ReportDocument
            oSections = oRpt.ReportDefinition.Sections
            For Each oSection In oSections
                oRptObjs = oSection.ReportObjects
                For Each oRptObj In oRptObjs
                    If oRptObj.Kind = CrystalDecisions.Shared.ReportObjectKind.SubreportObject Then
                        ' This is a subreport so set the logon credentials for this report's tables
                        oSubRptObj = CType(oRptObj, CrystalDecisions.CrystalReports.Engine.SubreportObject)
                        ' Open the subreport
                        oSubRpt = oSubRptObj.OpenSubreport(oSubRptObj.SubreportName)
                        oDB = oSubRpt.Database
                        oTables = oDB.Tables
                        For Each oTable As CrystalDecisions.CrystalReports.Engine.Table In oTables
                            oLogonInfo = oTable.LogOnInfo
                            oLogonInfo.ConnectionInfo = oConnectInfo
                            oTable.ApplyLogOnInfo(oLogonInfo)
                        Next
                    End If
                Next
            Next
        End Sub
        Public Shared Sub SetCrystalParams(ByVal sFieldName As String, ByVal iDataType As ParamType, ByVal sVal As String, ByRef oRpt As CrystalDecisions.CrystalReports.Engine.ReportDocument)
            Dim oFieldDefs As CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinitions
            Dim oFieldDef As CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinition
            Dim oParamVals As CrystalDecisions.Shared.ParameterValues
            Dim oDiscreteVal As CrystalDecisions.Shared.ParameterDiscreteValue
            oFieldDefs = oRpt.DataDefinition.ParameterFields
            oFieldDef = oFieldDefs(sFieldName)
            oParamVals = oFieldDef.CurrentValues
            oParamVals.Clear()
            oDiscreteVal = New CrystalDecisions.Shared.ParameterDiscreteValue()
            Select Case iDataType
                Case ParamType.Int
                    oDiscreteVal.Value = System.Convert.ToInt32(sVal)
                Case ParamType.Text
                    oDiscreteVal.Value = sVal
            End Select
            oParamVals.Add(oDiscreteVal)
            oFieldDef.ApplyCurrentValues(oParamVals)
        End Sub
    End Class
    And here's how you would use them:
    ' Create an instance of the Crystal report
    _rptCrystal = New CrystalDecisions.CrystalReports.Engine.ReportDocument()
    _rptCrystal.Load(_oSBO.AddonPath + "\Reports\MyReport.rpt")
    ' Call SetCrystalLogin to see the logon information for all report tables
    CrystalFunctions.SetCrystalLogin(sUser, sPassword, _oSBO.SboCompany.Server, _oSBO.SboCompany.CompanyDB, _rptCrystal)
    ' Set my report parameter value
    CrystalFunctions.SetCrystalParams("MyParam", CrystalFunctions.ParamType.Int, 999, _rptCrystal)
    ' Print the report straight to the printer                          
    _rptCrystal.PrintToPrinter(1, False, 0, 0)
    The other way to approach this solution would be to base your Crystal report on a .NET dataset rather than a database connection. However, as you've already written your report, the code above is going to be simpler to implement.
    Kind Regards,
    Owen

  • Print a report directly to the printer

    I need to print a report directly to the printer in Oracle Forms and Report 11g without a preview in the browser

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

  • Not able to take print a report directly to the printer

    Hi All,
    Can anyone help me to print a report directly to the printer?. Currently, I am viewing the reports in the screen and then taking print of that report. If anyone knows the solution for this, please give me the feedback immediately. It is very urgent.

    HI ALL
    i have the same problem plz tel me som solution 4 it
    thanx in advance

  • Can't print the report directly on the printer?

    Dear All,
    My client encounter a problem of printing a report directly to the printer. He is using developer 6i with OAS. His application is going to deploy on the web. He wants the report printed out directly on the "HP Laser Jet Printer" after the user has made the selection and clicked the "Print" button from the forms 6i. However, he got the error saying that
    "Oracle Report Server OWS Cartridge - Report Job has terminated with error
    Report Server Replies:
    Rep-0713: invalid printer name 'HP4050' specified by parameters DESNAME."
    And here is the parameter string passing into the report server:
    http://epmsdevs2.eway:9002/rwows/rwows60?report=epms1271.rdf+userid=epmsdev/epmsdev@dev+desformat=landscape+destype=printer+desname=HP4050+server=RepServer
    Is there anyone can show me some light on it?!
    Any help and idea is appreciated in advance!!!
    sheeta

    Hi!
    If reports are run in web env. then
    you can print reports directly on
    printer defined on m/c where report server
    is running, not on client m/c. If you want
    to print on client m/c then define that
    printer on report sever m/c and make sure
    report server can access that printer.
    Nirali

  • Problems Printing Invoice Duplicate in a network printer

    Good Morning.
    I'm having a problem in a client, printing Invoices.
    Every time I send an invoice to the network printer (HP LaserJet M1522 MFP Series PCL6), in the first page (only in that one) of the duplicate, all the text labels have boxes. But if I send it to the printer directly connected to the pc (HP Laserjet P1505), everything is printed as it should be.
    Can anyone help me with this situation, because the client really want to print the invoices to the network printer. Could this be originated by some kind of error with drivers (because I've checked everything in SAP, an it's OK)?
    Best Regard,
    Marta Silva

    Hi Marta Silva,
    The network printer you are using is one of the worst reputation printer in the market.  You could try different drivers to see if the problem goes away.  Other than that, I don't think there are other solutions.
    Thanks,
    Gordon

  • Print Oracle report into a network folder

    Hello,
    I was trying to print an Oracle report in PDF format to a network folder. I can do this directly from the url by pasting the url below on the browser, but when I try to do the same from a database trigger, I get "Rep 51002 bind to report server failed" error. I would appreciate any help that you can provide.
    Here is my code
    DECLARE
    req utl_http.req;
    resp utl_http.resp;
    value VARCHAR2(1024);
    BEGIN
    req := utl_http.begin_request('http://appserver.biosys.com/reports/rwservlet?server=rptserver&module=QueryIDResponse.rdf&userid=testuser/pwd@oracledb&destype=file&desformat=pdf&desname=c:/Query_Response_Report/245237new.pdf&P_QUERY_ID=123457&P_SERVICE_ID=6&P_SITE_ID=12501');
    utl_http.set_header(req, 'User-Agent', 'Mozilla/4.0');
    resp := utl_http.get_response(req);
    LOOP
    utl_http.read_line(resp, value, TRUE);
    dbms_output.put_line(value);
    END LOOP;
    utl_http.end_response(resp);
    EXCEPTION
    WHEN utl_http.end_of_body THEN
    utl_http.end_response(resp);
    END;
    Thanks
    Sani

    Thank you so much for your help. I used event driven pulishing and needed to install SRW package on my infra database and it is working good now.
    One thing I am struggling with sending pdf reports to another server. I could create a pdf at runtime, but needed to send to another server for storage. I could set up the desname parameter to store the pdf in the same report server by using the following code
    PORTAL.srw.add_parameter(myPlist, 'DESNAME', 'c:\Report\abcd');
    but to store in a different server I don't know how to do that. Any help would be appreciated
    Thanks

  • How to send a report DIRECTLY to the printer (Linux App. Svr.)?

    Here is the problem:
    -- We have Windows clients / Linux App Server / Forms 10g R2.
    -- Printers are attached to the Windows clients.
    -- When we want to send DIRECTLY to the printer, we have to write data into a text file (using TEXT_IO) &
    -- print the same using command HOST('lp -d '||<printer IP of logged in user>t||' '||<file name>,NO_SCREEN).
    -- Our normal reports are displayed as PDFs.
    Is there a way to directly send the PDF to the printer without having to re-write the report to a text file?? Then we can just use the PDF output and don't have to do any code changes (i.e. redo every report).
    Edited by: user12240205 on May 16, 2011 5:59 AM
    Edited by: user12240205 on May 16, 2011 5:59 AM

    InoL wrote:
    Use destype=printer.
    The printer on the Windows client has to be defined as a network printer and be known on the Linux server.
    Other options:
    - use the orarrp utility
    - if you call your Reports from Forms, you can use a Java bean
    http://forms.pjc.bean.over-blog.com/article-6621538.html
    Thank you for the quick response. Can u please tell us how to make the printer "known" as a Linux server?? Will a normal network admin know how to do this or is it an Oracle developer's task?

Maybe you are looking for