Report on Printer Directly

HI all
I am using oracle 9i reports. I am running a report on the report server that is the same as applicaton server. i can see the report with the      WEB.SHOW_DOCUMENT on the client browser. now i want to send this report directly on the clinet prineter. but i dont know which one printer is attached with that machine. is there any way what i can get the printer dialog box by using oracle forms and get the printer name and can set at run time the property of the printer. or is there any other method that i can use. becase my project is running in dirrerent cities so it is not possible to install one printer on the application or report sever and hard code the name of printer. how i can get the priner name or dialog box so that user can select or i can get the printer name.
thanks in advance
zafar

Printing directly from the application server to the client printer is impossible if the printer is unknown on the app server.
Oracle has a utility called ORARRP that allows direct printing on the client printer. You need some modifications on both the app server and the client.
Download ORARRP from http://otn.oracle.com/software/products/reports/index.html

Similar Messages

  • Windows 2003 reports server. printing direct to printer

    has anyone got any ideas on the best method/practice for allowing database to submit a print job direct to printer.
    we have a forms environment, 10g, and users can run reports which allow them to select parameters, then print to screen, from which point they can then print manually or save, but we also have a need to submit jobs under the bonnet so to speak, ie. trigger event takes place in the database, send print to printer. note, the print being sent is pdf format.
    many thanks
    jb

    I'm exploring options for the same requirement. There appear to be 2 utilities available - Reports J2EE thin client and Reports Remote Printing Utility (orarrp). ORARRP is more for a forms/reports environment. Do a search in Metalink for ORARRP and you'll find several threads with documentation links. Unfortunately both utilities require client installs. Good luck!

  • Very Urgent !! XMLP reports not printing directly from Oracle Apps.

    Hi ,
    We are not able to print XMLP reports directly from Oracle Applications(Concurrent Manager) to the printer.
    We have checked the following setups and they are ok.
    1. Have a Postscript ready printer.
    2. PASTA has been installed and setup.
    3. The printer type "--Pasta Universal Printer Type" is associated with the printer and that the seeded "PDF Publisher" print style and PASTA_PDF printer driver are associated with the printer type. Third party program "pdftops" has been installed in the instance.
    4. pasta_pdf.cfg is present and that it contains an "uncommented" entry as follows:
    preprocess=pdftops {infile} {outfile}
    5. The XMLP Report also has print style as "PDF Publisher".
    Initially, Step 5 was not being followed and the printer was printing the XML data instead of the pdf output.
    Now, after changing it to PDF Publisher, nothing is coming as output to the printer.
    I have checked that both the XML and pdf files are getting generated.
    Does anyone have any idea what could be the problem? Any help is greatly appreciated.
    Regards,
    Satrajit

    Hi Satrajit,
    Please make sure you have pdftops is available on the server and in the PATH.
    Please run following two commands.
    $ which pdftops
    $ which pdf2ps
    Please use one of two commands you found in the server.
    Please review Metalink Note 338990.1 for more details.
    Thanks,
    Shinji

  • Report Print Directly to Client Printer in Linux

    Hi,
    I m doing migration of Forms and Reports from 6i to 10g.
    In this 6i form contain the Direct Report Print to Client Printer.
    But in 10g, How to achive this,
    I don't want to show the report in screen, i want directly report goes to Client Default Printer for Printing Purpose.
    Can any one tel me if you have any solution.
    Thanks
    Gany

    Thanks For you reply,
    I already tried this, But I don't Know ,how to create Java Bean.
    So Any Other Method is there.
    If Any one know any other Solution for Print Directly to Client Printer.
    Thanks,
    Gany

  • Crystal report print directly without crystal viewer

    HI !
    In my addon i use Crystal Report. What would be the code i need to add if i want to print directly instead of having to go thru the crystal viewer.
    The crystal viewer gives me lots of problems with painting the screen when i move the form and it allways opens in the task bar. I cant seem to control the window sizes of the viewer either so unless it's easyer to fix those problem i need help to go and print direct without the viewer....
    Thanks for your time

    Hi John !
    I finnaly made it work... 
    here's what i used
    Dim objAppl As New CRAXDRT.Application
                Dim objReport As CRAXDRT.Report
                objReport = objAppl.OpenReport("C:Program FilesSAPSAP Business OneAddOnsDutiesresultat.rpt")
                objReport.PrintOut(True, 1)
    Thanks alot for your time.
    p.s.: I can i get the print window open on the screen instead of the task bar ??? it did that with the viewer too...
    Thanks again

  • Printing directly to printer in Reporting Services 2008 problem

    We have recently installed a new SQL 2008 server.  I have an application that prints an SSRS report (2005) directly to the printer.  If I change the reference to point to the new SQL 2008 server and run the application, the report is printed but the font size is huge and the report doesn't fit on the paper.  The only change I made in the code is the reference, that is it. Any ideas why this is happening?
    Thanks

    I guess I wasn't clear with my current configuration.  I am using the SOAP interface to print the reports directly to the printer.  I have a web reference (ReportServer) pointing to the new server and here is the code I use to print the report:
    public class ReportPrinter
            //ReportingService rs;
            ReportServer.ReportExecutionService rs;      
            private byte[][] m_renderedReport;
            private Graphics.EnumerateMetafileProc m_delegate = null;
            private MemoryStream m_currentPageStream;
            private Metafile m_metafile = null;
            int m_numberOfPages;
            private int m_currentPrintingPage;
            private int m_lastPrintingPage;
            private string _printer = "";
            public ReportPrinter()
                rs = new ReportServer.ReportExecutionService();
                rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
                PrintDialog dlgPrint = new PrintDialog();
                dlgPrint.PrinterSettings = new PrinterSettings();
                if (Common.gPrinterToUse == "" ||Common.gPrinterToUse == null)
                    if (dlgPrint.ShowDialog() == DialogResult.OK)
                        _printer = dlgPrint.PrinterSettings.PrinterName;
                        Common.gPrinterToUse = _printer;
                    else
                        return;
                else
                    _printer = Common.gPrinterToUse;
            private byte[][] RenderReport(string reportPath, ParameterValue[] reportParameters)
                // Private variables for rendering
                string deviceInfo = null;
                string format = "IMAGE";
                Byte[] firstPage = null;
                string encoding;
                string mimeType;
                Warning[] warnings = null;
                ParameterValue[] reportHistoryParameters = null;
                string[] streamIDs = null;
                Byte[][] pages = null;
                string extension = null;
                string historyID = null;       
                // Build device info based on the start page
                deviceInfo = String.Format(@"<DeviceInfo><OutputFormat>{0}</OutputFormat></DeviceInfo>", "emf");
                ExecutionInfo execInfo = new ExecutionInfo();
                ExecutionHeader execHeader = new ExecutionHeader();
                rs.ExecutionHeaderValue = execHeader;
                execInfo = rs.LoadReport(reportPath, historyID);
                rs.SetExecutionParameters(reportParameters, "en-us");
                rs.Url = "http://hr-sqlsvr3/reportserver/ReportExecution2005.asmx";
                //Execute the report and get page count.
                try
                    // Renders the first page of the report and returns streamIDs for 
                    // subsequent pages
                    //firstPage = rs.Render(
                    firstPage = rs.Render(format, deviceInfo, out extension, out mimeType, out encoding, out warnings, out streamIDs);
                    // The total number of pages of the report is 1 + the streamIDs         
                    m_numberOfPages = streamIDs.Length + 1;
                    pages = new Byte[m_numberOfPages][];
                    // The first page was already rendered
                    pages[0] = firstPage;
                    for (int pageIndex = 1; pageIndex < m_numberOfPages; pageIndex++)
                        // Build device info based on start page
                        deviceInfo =
                            String.Format(@"<DeviceInfo><OutputFormat>{0}</OutputFormat><StartPage>{1}</StartPage></DeviceInfo>",
                            "emf", pageIndex + 1);
                        pages[pageIndex] = rs.Render(format, deviceInfo, out extension, out mimeType, out encoding, out warnings, out streamIDs);
                catch (SoapException ex)
                    Console.WriteLine(ex.Detail.InnerXml);
                catch (Exception ex)
                    Console.WriteLine(ex.Message);
                    MessageBox.Show(ex.InnerException +
                        Environment.NewLine + ex.Message +
                        Environment.NewLine + "Number of pages: " + pages.Length.ToString() +
                        Environment.NewLine + "Report Path: " + reportPath, "Error Printing");
                finally
                    Console.WriteLine("Number of pages: {0}", pages.Length);
                return pages;
            internal bool PrintReport(string report, ParameterValue[] reportParameters, bool landscape)
                this.RenderedReport = this.RenderReport(report, reportParameters);
                try
                    // Wait for the report to completely render.
                    if (m_numberOfPages < 1)
                        return false;
                    PrinterSettings printerSettings = new PrinterSettings();
                    printerSettings.MaximumPage = m_numberOfPages;
                    printerSettings.MinimumPage = 1;
                    printerSettings.PrintRange = PrintRange.SomePages;
                    printerSettings.FromPage = 1;
                    printerSettings.ToPage = m_numberOfPages;
                    printerSettings.PrinterName = _printer;
                    PrintDocument pd = new PrintDocument();
                    m_currentPrintingPage = 1;
                    m_lastPrintingPage = m_numberOfPages;
                    pd.PrinterSettings = printerSettings;
                    pd.DefaultPageSettings.Margins = new Margins(0, 0, 0, 0);
                    pd.DefaultPageSettings.Landscape = landscape;
                    // Print report
                    Console.WriteLine("Printing report...");
                    pd.PrintPage += new PrintPageEventHandler(this.pd_PrintPage);
                    pd.Print();
                catch (Exception ex)
                    Console.WriteLine(ex.Message);
                finally
                    // Clean up goes here.
                return true;
            private void pd_PrintPage(object sender, PrintPageEventArgs ev)
                ev.HasMorePages = false;
                if (m_currentPrintingPage <= m_lastPrintingPage && MoveToPage(m_currentPrintingPage))
                    // Draw the page
                    ReportDrawPage(ev.Graphics);
                    // If the next page is less than or equal to the last page, 
                    // print another page.
                    if (++m_currentPrintingPage <= m_lastPrintingPage)
                        ev.HasMorePages = true;
            // Method to draw the current emf memory stream 
            private void ReportDrawPage(Graphics g)
                if (null == m_currentPageStream || 0 == m_currentPageStream.Length || null == m_metafile)
                    return;
                lock (this)
                    // Set the metafile delegate.
                    int width = m_metafile.Width;
                    int height = m_metafile.Height;
                    m_delegate = new Graphics.EnumerateMetafileProc(MetafileCallback);
                    // Draw in the rectangle
                    // Point destPoint = new Point(0, 0);
                    Point[] destPoint = new Point[3];
                    Point point1 = new Point(0, 0);
                    Point point2 = new Point(width, 0);
                    Point point3 = new Point(0, height);
                    destPoint[0] = point1;
                    destPoint[1] = point2;
                    destPoint[2] = point3;
                    g.EnumerateMetafile(m_metafile, destPoint, m_delegate);
                    // Clean up
                    m_delegate = null;
            private bool MoveToPage(Int32 page)
                // Check to make sure that the current page exists in
                // the array list
                if (null == this.RenderedReport[m_currentPrintingPage - 1])
                    return false;
                // Set current page stream equal to the rendered page
                m_currentPageStream = new MemoryStream(this.RenderedReport[m_currentPrintingPage - 1]);
                // Set its postion to start.
                m_currentPageStream.Position = 0;
                // Initialize the metafile
                if (null != m_metafile)
                    m_metafile.Dispose();
                    m_metafile = null;
                // Load the metafile image for this page
                m_metafile = new Metafile((Stream)m_currentPageStream);
                return true;
            private bool MetafileCallback(EmfPlusRecordType recordType,int flags,int dataSize,IntPtr data,PlayRecordCallback callbackData)
                byte[] dataArray = null;
                // Dance around unmanaged code.
                if (data != IntPtr.Zero)
                    // Copy the unmanaged record to a managed byte buffer 
                    // that can be used by PlayRecord.
                    dataArray = new byte[dataSize];
                    Marshal.Copy(data, dataArray, 0, dataSize);
                // play the record.      
                m_metafile.PlayRecord(recordType, flags, dataSize, dataArray);
                return true;
            internal byte[][] RenderedReport
                get
                    return m_renderedReport;
                set
                    m_renderedReport = value;

  • How we can print directly a report without preview to a local printer in web

    How we can print directly a report without preview to a local printer in web-environment, whith Oracle 9ias Report server release 6i patch 11.
    The user want to print ticket, built by Oracle Report, without previuw on PDF format, in a web three-tier environment.
    Please supply my documentation in detail and sample code if you can.

    Hello,
    Take a look to the example provided in the note :
    Note.253881.1 How to Create a Report With a Frame Only on the Last Page at a Fixed Position
    Regards

  • Delimited output of report that contains frames with Print Direction = 'Across'

    Hello all.
    On the header section of my report, I have a frame with Print Direction = 'Across'.
    On screen the output is :
    Value1 Value2 Value3 Value 4
    I want to export this report to excel, by using DELIMITED option. However the output I'm getting is :
    Value1
    Value2
    Value3
    Value4
    e.g., reports is not generating several columns (one for each field), but separate lines.
    Anyone knows how to accomplish delimited output of frames with Print Direction='Across' ?
    Thanks in Advance,
    Octavio

    If you're not generating both bitmap and delimited data from the same report, try using character mode output rather than "delimited". You can create the report to generate the appropriately delimited values to a text file. This will also give you greater control over aspects such as headings.
    Delimited output simply uses the structure of the layout. It doesn't take into account the across/down repeat directions except in the case of matrix.

  • Hi how can print report     from form directly

    Hi,
    I would like to print report from D2k directly....
    i.e. suppose we pressed a button report has to be generated and printed automatically.... Generating of report is done by Run_product function, but how to give print directly...
    please u send ur valuable suggestions to my mail id also
    [email protected]
    bye!

    When calling the report from form, include 2 more parameters in the parameter list:
    - PARAMFORM=No
    - DESTYPE=Printer
    hth

  • Printer- custom report not printing

    HI,
    Apps 11.5.10.2
    RDBMS 9i
    Am able to get print from appliaction for stanadard reports.
    If i give custom report.. its printing but content is not same as output..
    OUTPUT is coming in one line..
    %PDF-1.1
    1 0 OBJ
    << 0
    /Creator (Developer 2000)
    etc
    Thanks

    HI,
    Am getting output like follwing
    Please run the test in (Note: 264118.1 - 11i : Pasta Pasta Printing Setup Test) to verify that PASTA is configured properly.------------- Test Result Summary -------------
    Total Tests: 1
    Success Count: 0
    Error count: 1
    Test Names Status
    oracle.apps.izu.fnd.diag.FNDPastaDiag Succeeded with Warnings
    ----------- End Test Result Summary -----------
    ============= Test Result =============
    Test Class Name: oracle.apps.izu.fnd.diag.FNDPastaDiag
    Application Code: FND
    Group Name: Setup
    Status: Succeeded with Warnings
    Time: 2010-07-06 11:57:07.0
    Time Consumed: 8154
    Test Version: 115.8
    Tool Version: 115.131
    Install Version: Base: none Upgrade: none
    Mode: 1
    Index: 1
    Tested Class Name Tested Class Version
    oracle.apps.izu.fnd.diag.FNDRequestIDLov 115.4
    oracle.apps.jtf.regress.qatool.base.DBUtility 115.1
    oracle.apps.jtf.regress.qatool.base.DiagBase 115.2
    oracle.apps.jtf.regress.qatool.base.FileUtility 115.1
    oracle.apps.jtf.regress.qatool.base.HRInfo 115.0
    oracle.apps.jtf.regress.qatool.base.OSUtility 115.5
    oracle.apps.jtf.regress.qatool.base.SessionHelper 115.0
    oracle.apps.jtf.regress.qatool.fnd.FNDUtility 115.10
    Input Names Input Values
    Responsibility ID 50300
    Request Id 320444
    Diagnostic Test Executed By SYSADMIN
    Dependent Class Names
    Report:
    Oracle Diagnostics Information Product Installation Status and Patchset Level Parameters
    Generic Tests Language Information Pasta Driver Settings
    Concurrent Node Environment Variables Pasta Viewer Settings to View Bi-Directional Reports Bi-Directional Specific Settings
    Retrieving Log and Configuration Files for Support References
    Database Information [Top]
    Server = rofdbs5
    Version = Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
    Name/SID = STAGE
    Language = AMERICAN
    Character Set = US7ASCII
    Application Information [Top]
    Release = 11.5.10.2
    Application = Projects (275) with status of INSTALLED
    Responsibility = RI_Projects Superuser (50300)
    MultiOrg Flag = Y
    Operating Unit = RI Operating Unit (104)
    Security Group = Standard
    Oracle Diagnostics Information [Top]
    Patch Oracle Diagnostics 2.5 RUP A (5914893) is installed
    Patch Oracle E-Business Suite 11i Diagnostic Tools, Nov 2008 - 8.11 (7530017) is installed
    Metalink Document Id = 264118.1
    Product Installation Status and Patchset Level [Top]
    Application Short Name Id Installation Status Patch Level
    Application Object Library FND 0 Installed 11i.FND.H
    Applications DBA AD 50 Shared 11i.AD.I.6
    System Administration SYSADMIN 1 Installed Not Available
    XML Publisher XDO 603 Not Installed 11i.XDO.H
    4 rows retrieved
    Parameters [Top]
    Username = SYSADMIN
    Responsibility = RI_Projects Superuser (50300)
    Request Id = 320444
    Generic Tests [Top]
    Node Information
    Tiers = Admin, Web, Forms, Concurrent
    Pasta Executable Version
    Version = 3.0.4.0(patch
    Oracle Reports Version
    Detected version 6.0.8.28.0 is >= expected version 6.0.8.18
    Language Information [Top]
    Installed Languages
    Language Code Installed Flag NLS Language
    US Base AMERICAN
    1 row retrieved
    Database Character Set
    Database character set = US7ASCII
    Pasta Driver Settings [Top]
    Printer Name = CD1230
    Printer Style = PORTRAIT
    WARNING - Driver PORTRAITHPLJ3-A4 is not defined for pasta printing
    ACTION - For pasta printing please modify printer driver PORTRAITHPLJ3-A4 to have FNDPSTAX as program.
    Reference: Oracle Applications System Administrator's Guide
    Pasta PrintForms
    The printforms feature is not used. To insert a company logo or background image in a concurrent report please refer to PASTA 3.0 Release Information
    Pasta Configuration File
    The pasta executable chooses the non default configuration file defined as a driver argument '-F' using the following rules (in the following order):
    1. Configuration file associated to the specific printer
    2. Configuration file for all the printers
    Current settings
    The PASTA variable is not set
    The file '/stageAPP/stageappl/fnd/11.5.0/resource/pasta_CD1230.cfg' does not exist
    The file '/stageAPP/stageappl/fnd/11.5.0/resource/pasta.cfg' exists
    Configuration file in use = /stageAPP/stageappl/fnd/11.5.0/resource/pasta.cfg
    Concurrent Node Environment Variables [Top]
    NLS_LANG Variables
    Database = AMERICAN_AMERICA.US7ASCII
    OS environment = AMERICAN_AMERICA.US7ASCII
    Concurrent Request = AMERICAN_AMERICA.US7ASCII
    Pasta Environment Variables
    LANG =
    PASTA =
    IX_PRINTING =
    IX_RENDERING =
    APPLLCSP Environment Variable for Bitmap Report Printing
    APPLLCSP =
    Pasta Viewer Settings to View Bi-Directional Reports [Top]
    Bi-Directional Mime Type
    WARNING - The mime type 'apps/bidi' is missing
    ACTION - Create a new mime type as mentioned in the PASTA Users Guide 3.0. See also PASTA 3.0 Release Information
    Profile Options
    Viewer: Application for Text (FS_MIME_TEXT) = null
    Viewer: Text (EDITOR_CHAR) = Browser
    Bi-Directional Specific Settings [Top]
    The current database character set does not require bi-directional settings
    Retrieving Log and Configuration Files for Support [Top]
    Adding file '/stageAPP/stageappl/fnd/11.5.0/resource/pasta.cfg' to '/stageAPP/stageappl/izu/11.5.0/out/PastaPrinting.zip'
    This test cannot get the IX Library configuration file (ixlib.cfg) because environment variable IX_PRINTING is not set. For more information see note Oracle Reports 6i Setup Guide for Oracle Applications 11i
    This test cannot collect the IX Display configuration file (ixlib.cfg) because environment variable IX_RENDERING is not set. See note Oracle Reports 6i Setup Guide for Oracle Applications 11i
    Adding file '/stageAPP/stageora/8.0.6/guicommon6/tk60/admin/uiprint.txt' to '/stageAPP/stageappl/izu/11.5.0/out/PastaPrinting.zip'
    Adding file '/stageAPP/stageora/8.0.6/guicommon6/tk60/admin/Tk2Motif.rgb' to '/stageAPP/stageappl/izu/11.5.0/out/PastaPrinting.zip'
    Adding file '/stageAPP/stageora/8.0.6/guicommon6/tk60/admin/uifont.ali' to '/stageAPP/stageappl/izu/11.5.0/out/PastaPrinting.zip'
    Adding file '/stageAPP/stageappl/fnd/11.5.0/reports/HPP.prt' to '/stageAPP/stageappl/izu/11.5.0/out/PastaPrinting.zip'
    Adding file '/stageAPP/stagecomn/admin/log/STAGE_rofdbs5/l320444.req' to '/stageAPP/stageappl/izu/11.5.0/out/PastaPrinting.zip'
    Adding file '/stageAPP/stagecomn/admin/out/STAGE_rofdbs5/o320444.out' to '/stageAPP/stageappl/izu/11.5.0/out/PastaPrinting.zip'
    Please upload the generated output file (/stageAPP/stageappl/izu/11.5.0/out/PastaPrinting.zip) when creating the service request
    References [Top]
    Note 239196.1 PASTA 3.0 Release Information
    Note 240864.1 Activating and Configuring IX Library
    Note 189708.1 Oracle Reports 6i Setup Guide for Oracle Applications 11i
    If you are experiencing any issues regarding this diagnostic test, please use Metalink to log an iTAR (Service Request) for product "Support Diagnostics Project" (ID=1332).
    If you have any question related to support diagnostic tools (installation, execution, usage or availability), you can ask us using the Support Diagnostics Project forum on Metalink.
    We would also appreciate your feedback regarding the usefulness of this test, however, there will be no replies to feedback emails.
    Error Message: 0 errors and 2 warnings were found.
    Fix Info: Please review the test summary for more information.
    ============ End Test Result ============

  • Form9i open word and print direct to printer

    I upgraded developer forms 6i to 9i and found problem in case of print direct to printer.
    The report was not create from develop reports but it create from Microsoft Word.
    I generate this report via developer forms call function to generate microsoft word and print it directly not preview but I found the problem when I printed it directly to printer. It didn't have any response from printer although I set up printer at printer server machine already.
    I try to test other printers and do the same but the problem still occur.
    My platform for testing shown as follow :
    ORACLE DBMS 9i
    Develop Form 9i
    Microsoft Word 97, XP
    Windows 98, XP
    Thank you for your suggestion.
    Best Regards,
    Pongsak S.
    Thailand
    [email protected]

    Use DESTYPE=PRINTER.
    http://docs.oracle.com/cd/E14571_01/bi.1111/b32121/pbr_cla005.htm#i637246

  • Printing Directly To Printer Does Not Work

    Dear Friends,
    We have a label report that can only be printed when it has been previewed first.
    However, printing this report directly to the selected printer raises the error message ' Protocol Error' and printing stops.
    What could be the problem and how can that be resolved ?
    Thank you in advance for your help.

    Hello Bhushan,
    Thank you for the reply.
    Version os CR with SP level.
    The report was designed with SAP Crystal Reports 2011 and the version of the runtimes currently deployed is CRforVS_redist_install_32bit_13_0_8.
    Version of VS
    Version of Visual Studion is 2010.
    Win or web app?
    It is a Windows application.
    Report is printed using code or viewer print button?
    The report is printed via code.
    What is the exact error, post the stack trace?
    The exact error is simply 'Protocol Error' on the printer display.
    Does the issue occur on dev or production machine?
    The error occurs on a Production environment.
    Is this printer specific?
    Yes, the exact printer in use is CAB A4+/300.
    Could you print the report to PDF printer or MS XPS writer?
    The report can be printed directly to PDF or MS XPS writer without any error. It's just to this printer where the error occurs.
    I will be glad to provide more information if needed.
    Thank you.

  • Print directly to the printer

    Hi Guys
    Could anyone correct me how can I print directly to the printer from this program ,I am getting short dump error when I select the radio button printer and execute it.
    Rgds
    PE

    oops sorry here it is below
    REPORT  Z_ESLP_ZTCODE LINE-SIZE 132 .
    *TABLES
    TABLES : AGR_TCODES,
    AGR_USERS,
    TSTCT,
    T16FW,
    T16FD.
    type-pools: slis.                                 "ALV Declarations
    CONSTANTS MARK VALUE 'X'.
    TYPES: BEGIN OF  T_DISP,
    AGR_TCODES TYPE AGR_TCODES-TCODE ,             " Transaction code A
    AGR_NAME   TYPE AGR_TCODES-AGR_NAME,           " Role Name B
    AGR_UNAME  TYPE AGR_USERS-UNAME,               " Short User Name B
    TTEXT      TYPE TSTCT-TTEXT,                   " Description Name C
    TEXTC      TYPE USER_ADDR-NAME_TEXTC,          " Long User Name
    SPRSL      TYPE TSTCT-SPRSL ,                  " Language c
    TEL_EXTENS  TYPE USER_ADDR-TEL_EXTENS ,          " Extension
    DEPARTMENT  TYPE USER_ADDR-DEPARTMENT  ,         " Department Name B
    FRGGR      TYPE T16FW-FRGGR,
    FRGCO      TYPE T16FD-FRGCO,
    OBJID      TYPE T16FW-OBJID,
    FRGCT      TYPE T16FD-FRGCT,
    SPRAS      TYPE T16FD-SPRAS,
    END OF t_disp.
    DATA: it_disp TYPE STANDARD TABLE OF t_disp INITIAL SIZE 0,
          wa_disp TYPE t_disp.
    DATA: params like pri_params,
        days(1) type n value 2,
        count(3) type n value 1,
        valid type c.
    *ALV data declarations
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
          gd_tab_group type slis_t_sp_group_alv,
          gd_layout    type slis_layout_alv,
          gd_repid     like sy-repid,
          gt_events     type slis_t_event,
          gd_prntparams type slis_print_alv.
    parameter: p_trigr type c default space.
    SELECTION PARAMETER CRITERIA
    SELECTION-SCREEN BEGIN OF BLOCK BLK WITH FRAME.
    SELECTION-SCREEN BEGIN OF BLOCK BLK1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS:
    P_TCODE FOR AGR_TCODES-TCODE  , "OBLIGATORY, "no-extension no intervals,
    U_NAME FOR AGR_USERS-UNAME,
    R_NAME FOR AGR_USERS-AGR_NAME .
    SELECTION-SCREEN END OF BLOCK BLK1.
    SELECTION-SCREEN BEGIN OF BLOCK BLK2 WITH FRAME TITLE TEXT-002.
    SELECTION-SCREEN END OF BLOCK BLK2.
    SELECTION-SCREEN END OF BLOCK BLK.
    SELECTION-SCREEN BEGIN OF BLOCK radio WITH FRAME.
      PARAMETERS :
      scr   RADIOBUTTON GROUP rbg1 ,
                  Pr   RADIOBUTTON GROUP rbg1 .
      SELECTION-SCREEN END OF BLOCK radio.
    *Start-of-selection.
    START-OF-SELECTION.
    perform data_retrieval.
    perform build_fieldcatalog.
    perform build_layout.
    perform build_events.
    perform build_print_params.
    perform display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    form build_fieldcatalog.
      fieldcatalog-fieldname   = 'AGR_UNAME'.
      fieldcatalog-seltext_m   = 'User'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
    fieldcatalog-do_sum      = 'X'.
    fieldcatalog-no_zero     = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'TEXTC'.
      fieldcatalog-seltext_m   = 'Name'.
      fieldcatalog-outputlen   = 60.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'AGR_NAME'.
      fieldcatalog-seltext_m   = 'Role Name'.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'AGR_TCODES'.
      fieldcatalog-seltext_m   = 'Trans Code'.
      fieldcatalog-col_pos     = 3.
      fieldcatalog-outputlen   = 20.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'TTEXT'.
      fieldcatalog-seltext_m   = 'Description'.
      fieldcatalog-outputlen   = 70.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT  PRINTER SETUP
          PRINTER SETUP
    form printer_setup.
      DATA:L_PARAMS TYPE PRI_PARAMS,
           L_VALID TYPE C.
        CALL FUNCTION 'GET_PRINT_PARAMETERS'
           EXPORTING
             IMMEDIATELY                  = ' '
           LINE_SIZE                    = 220
           RELEASE                      = 'X'
             MODE                         = 'CURRENT'
             NO_DIALOG                    = ' '
           IMPORTING
        OUT_ARCHIVE_PARAMETERS       =
             OUT_PARAMETERS               = L_PARAMS
             VALID                        = L_VALID
           EXCEPTIONS
             ARCHIVE_INFO_NOT_FOUND       = 1
             INVALID_PRINT_PARAMS         = 2
             INVALID_ARCHIVE_PARAMS       = 3
             OTHERS                       = 4.
          IF SY-SUBRC  eq 0.
          ENDIF.
    "But it will take default printer from user settings
          NEW-PAGE PRINT ON   PARAMETERS L_PARAMS NO DIALOG.
           write : 'print is on'.
          NEW-PAGE PRINT OFF.
        DATA: PARAMS   LIKE PRI_PARAMS,
             ARPARAMS LIKE ARC_PARAMS,
             DAYS(1)  TYPE N VALUE 2,
             COUNT(3) TYPE N VALUE 1,
             VALID    TYPE C.
       CALL FUNCTION 'GET_PRINT_PARAMETERS'
             EXPORTING DESTINATION = 'LOCL'
                   COPIES                 = COUNT
                   LIST_NAME              = 'Z_ESLP_ZTCODE'
                   LIST_TEXT              = 'SUBMIT ... TO SAP-SPOOL'
                   IMMEDIATELY            = 'X'
                   RELEASE                = 'X'
                   NEW_LIST_ID            = 'X'
                   EXPIRATION             = DAYS
                   LINE_SIZE              = 79
                   LINE_COUNT             = 120
                   LAYOUT                 = 'X_44_120'
                   SAP_COVER_PAGE         = 'X'
                   COVER_PAGE             = 'X'
                   RECEIVER               = 'SAP*'
                   DEPARTMENT             = 'System'
                   SAP_OBJECT             = 'RS'
                   AR_OBJECT              = 'TEST'
                   ARCHIVE_ID             = 'XX'
                   ARCHIVE_INFO           = 'III'
                   ARCHIVE_TEXT           = 'Description'
                   NO_DIALOG              = ' '
         IMPORTING OUT_PARAMETERS         = PARAMS
                   OUT_ARCHIVE_PARAMETERS = ARPARAMS
                   VALID                  = VALID.
       IF VALID <> SPACE.
         SUBMIT RSTEST00 TO SAP-SPOOL
           SPOOL PARAMETERS PARAMS
           ARCHIVE PARAMETERS ARPARAMS
           WITHOUT SPOOL DYNPRO.
       ENDIF.
    endform.                    " BUILD_LAYOUT
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    form build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    gd_layout-totals_only        = 'X'.
    gd_layout-f2code            = 'DISP'.  "Sets fcode for when double
                                            "click(press f2)
    gd_layout-zebra             = 'X'.
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text       = 'helllllo'.
    endform.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
                i_callback_user_command = 'USER_COMMAND'
               i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
               it_special_groups       = gd_tabgroup
                it_events               = gt_events
                is_print                = gd_prntparams
                i_save                  = 'X'
               is_variant              = z_template
           tables
                t_outtab                = it_disp
           exceptions
                program_error           = 1
                others                  = 2.
      if sy-subrc  EQ 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form lfa1 table and populate itab it_lfa1
    form data_retrieval.
    CASE MARK.
         WHEN scr.
       SELECT AGR_TCODESTCODE AGR_TCODESAGR_NAME AGR_USERSUNAME TSTCTTTEXT USER_ADDR~NAME_TEXTC
      INTO TABLE IT_DISP
      FROM AGR_TCODES
      INNER JOIN AGR_USERS
      ON  AGR_TCODESAGR_NAME = AGR_USERSAGR_NAME
      INNER JOIN USER_ADDR
      ON AGR_USERSUNAME = USER_ADDRBNAME
      INNER JOIN TSTCT
      ON AGR_TCODESTCODE = TSTCTTCODE
      where
      agr_tcodes~tcode in p_tcode
      and
      agr_users~uname in u_name
      and
      agr_tcodes~agr_name in r_name
      and
      TSTCT~SPRSL EQ 'E'.
      WHEN pr.
    perform printer_setup.
    ENDCASE.
    *lifnr
    *between '0000100001' AND '0000150000'.
    endform.                    " DATA_RETRIEVAL
    Release memory no longer required.
    free: it_lfa1 .
    Form  TOP-OF-PAGE                                                 *
    ALV Report Header                                                 *
    Form top-of-page.
    *ALV Header declarations
    data: t_header type slis_t_listheader,
          wa_header type slis_listheader,
          t_line like wa_header-info,
          ld_lines type i,
          ld_linesc(10) type c.
    Title
      wa_header-typ  = 'H'.
      wa_header-info = 'Transaction codes by User and Role Name ' .
      append wa_header to t_header.
      clear wa_header.
    Date
      wa_header-typ  = 'S'.
      wa_header-key = 'Date: '.
      CONCATENATE  sy-datum+6(2) '.'
                   sy-datum+4(2) '.'
                   sy-datum(4) INTO wa_header-info.   "todays date
      append wa_header to t_header.
      clear: wa_header.
    Total No. of Records Selected
      describe table it_disp lines ld_lines.
      ld_linesc = ld_lines.
      concatenate 'Total No. of Transaction Records Selected: ' ld_linesc
                        into t_line separated by space.
      wa_header-typ  = 'A'.
      wa_header-info = t_line.
      append wa_header to t_header.
      clear: wa_header, t_line.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
           exporting
                it_list_commentary = t_header.
               i_logo             = 'Z_LOGO'.
    endform.
          FORM USER_COMMAND                                          *
          --> R_UCOMM                                                *
          --> RS_SELFIELD                                            *
    FORM user_command USING r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
    Check function code
      CASE r_ucomm.
        WHEN '&IC1'.
      Check field clicked on within ALVgrid report
        IF rs_selfield-fieldname = 'TCODES'.
        Read data table, using index of row user clicked on
          READ TABLE it_disp INTO wa_disp INDEX rs_selfield-tabindex.
        Set parameter ID for transaction screen field
         SET PARAMETER ID 'BES' FIELD wa_disp-tcode.
        Sxecute transaction zven, and skip initial data entry screen
         CALL TRANSACTION 'Z' AND SKIP FIRST SCREEN.
        ENDIF.
      ENDCASE.
    ENDFORM.
    *&      Form  BUILD_EVENTS
          Build events table
    form build_events.
      data: ls_event type slis_alv_event.
      call function 'REUSE_ALV_EVENTS_GET'
           exporting
                i_list_type = 0
           importing
                et_events   = gt_events[].
      read table gt_events with key name =  slis_ev_end_of_page
                               into ls_event.
      if sy-subrc = 0.
        move 'END_OF_PAGE' to ls_event-form.
        append ls_event to gt_events.
      endif.
        read table gt_events with key name =  slis_ev_end_of_list
                               into ls_event.
      if sy-subrc = 0.
        move 'END_OF_LIST' to ls_event-form.
        append ls_event to gt_events.
      endif.
    endform.                    " BUILD_EVENTS
    *&      Form  BUILD_PRINT_PARAMS
          Setup print parameters
    form build_print_params.
      gd_prntparams-reserve_lines = '3'.   "Lines reserved for footer
      gd_prntparams-no_coverpage = 'X'.
    endform.                    " BUILD_PRINT_PARAMS
    *&      Form  END_OF_PAGE
    form END_OF_PAGE.
      data: listwidth type i,
            ld_pagepos(10) type c,
            ld_page(10)    type c.
      write: sy-uline(50).
      skip.
      write:/40 'Page:', sy-pagno .
    endform.

  • Print directly to the printer from Oracle 9I

    Please it is possible to print directly to the printer from Oracle 9i without having to show the report on the web.

    Please it is possible to print directly to the printer from Oracle 9i without having to show the report on the web.

  • Report for printing actuals for a fiscal period

    i have a report which prints the actuals for a fiscal year . Its like each country has their own fiscal year representation , The report is currently printing the data based on its own fiscal year representation , i have to modify the report and want it to print based on US(sep-aug) fiscal representation .. like for example for india its printing with may as fiscal period 1 , instead i want to print it with may data as fiscal period 9 and to print the data from sep-aug for all countries. I dont understand how to give the select statement and how to proceed with this. I appreciate if anyone can help me with this.
    Lets load up the yps_costplan table for loading.
    if they didn't specify a project to single load, go get them all.
    if s_objnr is initial.
    if in first fiscal month, "Sept", then get previous years data to
    fill in the last month, month 12.
    if t_t009b-poper = '001'.
    select * from yps_costplan into table i_yps_costplan
    where yyobjnr gt 'PR00000000' and yygjahr ge yprevyear and
    yygjahr lt yplus1year.
    else.
    select * from yps_costplan into table i_yps_costplan
    where yyobjnr gt 'PR00000000' and yygjahr ge p_fiscal and
    yygjahr lt yplus1year.
    endif.
    When getting all, start with 2003, when doing month, use current
    fiscal year only.
    yygjahr between t_yearm1 and t_yearp1.
    else.
    They secified 1 project, go get his data.
    if not s_objnr-LOW cs '*'.
    concatenate s_objnr-low '%' into hold_projn.
    loop at s_objnr.
    if s_objnr-high eq space.
    concatenate s_objnr-low '*' into s_objnr-low.
    s_objnr-option = 'CP'.
    modify s_objnr.
    endif.
    endloop.
    select posid objnr from prps into table t_prps
    WHERE POSID IN S_OBJNR.
    else.
    concatenate s_objnr-low(sy-fdpos) '%' into hold_projn.
    select posid objnr from prps into table t_prps
    where posid like hold_projn.
    WHERE POSID IN S_OBJNR.
    endif.
    if sy-subrc eq 0.
    loop at t_prps.
    if in first fiscal month, "Sept", then get previous years data to
    fill in the last month, month 12.
    if t_t009b-poper = '001'.
    select * from yps_costplan into table h_yps_costplan where
    yyobjnr = t_prps-objnr and yygjahr ge yprevyear and
    yygjahr lt yplus1year.
    else.
    select * from yps_costplan into table h_yps_costplan where
    yyobjnr = t_prps-objnr and yygjahr ge p_fiscal and
    yygjahr lt yplus1year.
    endif.
    if sy-subrc eq 0.
    loop at h_yps_costplan.
    i_yps_costplan = h_yps_costplan.
    append i_yps_costplan.
    endloop.
    endif.
    endloop.
    endif.
    endif.

    Hi Fris,
       You can do this using a process chain and ABAP program.
    1. Create one process chain and create abap program, include in it. Scedule this chain every day.
       Write a code in this ABAP program to check last day of fiscal period and to raise an event to execute 2 process chain or infopackge.
    From system date find currect period
    (Use FM : DATE_TO_PERIOD_CONVERT).
    Find last day of period(Use FM : LAST_DAY_IN_PERIOD_GET)
    Check system date(sy-datum) is equal to last day of period then you can raise an event(Use FM : BP_RAISE_EVENT).
    Use this event to schedule 2nd chains(contains infopackage) or direct scheduling of infopackage.
    You can create event at : SM62.
    Hope it Helps
    Srini

Maybe you are looking for

  • Why has my mac wiped everything off my account?

    I was aiming to delete some accounts that were not needed and were taking up space. Without realising I started to remove the account with everything I use on it. After I clicked cancel, my account still remains but everything on it has been reset. M

  • Config SM Radius Listener LEg

    Someone.... have a config for p3sm.cfg  version SM 41  to NAS :  ( Radius Listener LEG ) User, password  and class  attributes validate on NAS is OK  and is Working  but  SM Listenet LEG not create the subscriber / Ip address /Netmask /Package.  Than

  • NO SOUND output (except for start-up chime) on MacBook Pro

    I've been looking all over the discussion boards but haven't been able to figure this one out. Suddenly for no apparent reason I have no sound output. I've checked all the settings, repaired disk permissions, restarted, etc. with no effect. I DO get

  • Ramdrive set up

    Reading about Ramdrives... now the following commands are for reference only do not run them on your system just to be on the safe side!!!!!!! Did read on forums a simple way to set up ramdrive but I cannot find it... sure it was iphitus :-) Want som

  • Help: Moving contacts from old to new account

    how can l move contacts from old account to new