Reports 6i pdf output as an attachment

I am using Reports 6i to create a vendor report card. We are then using Oracle ERP 11.5.9 apps to run the report card as a concurrent request. I need to figure out how to send the output of the concurrent request as a pdf email attachment.
One possibility I'm working on is to use a 3rd party reporting software called Optio which can be used to send the email as an attachment if I can direct Optio to the report output.
The problem is that the output (Desname) seems to be hard-coded in the apps. If I change the system parameter Desname in my rdf, the changes don't seem to take effect in the apps. Is it possible to change the Desname for one rdf and have that Desname honored when running the rdf as a concurrent request?

if your output file is less than 32kb then you can use the following code in your after report trigger
function AfterReport return boolean is
begin
SRW.USER_EXIT('FND SRWEXIT');
DECLARE
   vinhandle   UTL_FILE.file_type;
   rfile       RAW (32767);
   flen        NUMBER;
   bsize       NUMBER;
   ex          BOOLEAN;
   vrec        VARCHAR2 (30)      := '[email protected]';  --receiver's email id
   vsender     VARCHAR2 (30)      := '[email protected]';  --sender's email id
   vsubj       VARCHAR2 (50)      := 'subject';                   --subject
   vmesg       VARCHAR2 (4000);
   vmtype      VARCHAR2 (30)      := 'text/plain; charset=us-ascii';
BEGIN
   vmesg := 'Please print and complete attachment';      --message
   UTL_FILE.fgetattr ('CTEMP',                                     --name of the directory
                      'o' || :p_conc_request_id || '.out',            --name of the file
                      ex,
                      flen,
                      bsize
   vinhandle :=
             UTL_FILE.fopen ('CTEMP', 'o' || :p_conc_request_id || '.out',
                             'R');
   UTL_FILE.get_raw (vinhandle, rfile, flen);
   UTL_FILE.fclose (vinhandle);
   utl_mail.send_attach_raw (sender            => vsender,
                             recipients        => vrec,
                             subject           => vsubj,
                             MESSAGE           => vmesg,
                             attachment        => rfile,
                             att_inline        => FALSE,
                             att_filename      =>    'o'
                                                  || :p_conc_request_id
                                                  || '.out'
-- where CTEMP is a directory with path as $APPLCSF/out
END;
  return (TRUE);
end;
if you need to send attachments greater than 32kb see metalink doc 357385.1
hope this helps

Similar Messages

  • Oracle Reports in PDF output

    Hi everyone ,
    We are using Oracle 11g.
    I have a custom Oracle report in PDF output. In some cases the value is changed. For example, when i run a query in toad i get a value 0.13, then I run my report, check the XML output - the value is still 0.13....but when I check the report output that is in the PDF format, the value is changed to 0.14. Do you have any ideas why it happens? Do I need a special coad in the rtf tag?
    Thank you

    What command did you type in to run your report in Unix? Did you give the full path of your rdf file. I guess that the system may not be find your rdf file correctly.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by guest2000:
    Hi all,
    Anybody currently running Oracle Reports in unix platform and the output is generated in pdf format & display in browser?
    Can you please advise on what are all the environment variables that I have to set in order to get the report runs?
    Besides, what are the specific printer setting that I have to set? as well as priviledge on directory if necessary.
    My reports are created in PC with RDF format. When run in unix, can the RDF still be used or it has been to recompile? If recompile, how is this done?
    I always get the following error but do not what is the cause:
    REP-0110: Unable to open file 'myreport.rdf'. REP-1070: Error while opening or saving a document. REP-0110: Unable to open file 'myreport.rdf'.
    Please advise.
    Hope to receive your reply asap.
    Great thanks in advance.<HR></BLOCKQUOTE>
    null

  • £ and € are printing as # and ? in Reports 6i PDF output

    hi all
    £ and € are printing as # and ? in Reports 6i PDF output, can some one please tell me the solution.
    Thanks in Advance

    It depends on Acrobat's Fonts, you have to see which font PDF reader use.
    Open PDF report , File then Property and Fonts Tab.
    Hope helps you

  • Embedding Fonts in Oracle Reports with PDF output

    I've read in the data sheet for Oracle reports that you can embed font in the PDF output, but I cannot seem to find any documentation on how this is done. Current we have PDF reports being generated using reports server on Compaq (Alpha based) server running TRUE64 UNIX. The reports server uses the fonts install on the Compaq to figure out the layout (we use auto-sized fields). When the PDF is displayed on a Windows client the fonts are substituted and the labels and fields overlap. I want to embed the UNIX fonts into the PDF so that the output is reproduced as it was generated.

    You need to export as PDF (Interactive) and you also need to view the PDF in Reader or Acrobat 9 or later.
    Bob

  • Unable to display Crystal Reports 2008 PDF output on smart phones

    Hi Folks,
    I'm not sure if this is the proper forum, but here goes. I am just finishing a large ASP.NET web app which makes extensive use of Crystal Reports 2008 and a CrystalReportViewer control.  My users routinely e-mail the reports in PDF format. This works great, except now they tell me that when the recipient of the e-mail tries to open the PDF on an iPhone or Blackberry, it will not open. The PDF's open fine on desktop computers.
    Here is the code which generates the PDF and attaches it to the e-mail msg.
    //  export to PDF, then mail that
    SmtpClient client = new SmtpClient();
    MailAddress from = new MailAddress(ConfigurationManager.AppSettings["ReportMailFrom"].ToString());
    MailMessage message = new MailMessage();
    message.From = from;
    message.SubjectEncoding = System.Text.Encoding.UTF8;
    message.Subject = "E-mail BackOffice report: " + strReportName;
    MemoryStream memStream = (MemoryStream)rptDoc.ExportToStream(ExportFormatType.PortableDocFormat);
    Attachment data = new Attachment(memStream, MediaTypeNames.Application.Pdf);
    ContentDisposition disposition = data.ContentDisposition;
    disposition.CreationDate = DateTime.Now;
    disposition.ModificationDate = DateTime.Now;
    disposition.FileName = strReportName + ".pdf";
    disposition.DispositionType = DispositionTypeNames.Attachment;
    message.Attachments.Add(data);
    client.Send(message);
    Any ideas on what is happening here and how to make these PDF's visible to smart phones?
    Thanks.
    Dan

    Hi Dan,
    What happens if you export from Crystal Reports designer?
    I just tried if and BlackBerry tells me I am about to download a file that cannot be viewed on the phone. It doesn't say why though.
    Going through the Platforms file it doesn't mention smart phones so it would indicate we don't support them in that format.
    HTML worked but not pretty. You'll have to see what Blackberry does support. I found this one kbase article from them:
    http://www.blackberry.com/btsc/search.do?cmd=displayKC&docType=kc&externalId=KB11245&sliceId=SAL_Public&dialogID=206744335&stateId=1%200%20206742756
    I'm testing more but I believe this is a blackberry limit and not CR.
    Seems they do support it but very limited.
    Thank you
    Don

  • How to generate custom report with PDF output?(Payables)

    Hi All,
    we are using some custom reports in payables modual production server the reports are working fine .
    my question is i need creat same reports in test server i have done following activities.
    1. copied rdf file from prod server and pasted into test server
    2.given excutable name in system administrator modual(concurrent-progrem-excutable)
    3.define report in system administrator modual(cocurrent-program-define) output selected PDF and given parameters.
    4. switch to payables moduale run the report ,following error showing in log file plese help how to resolve it we don,t have any custom reports in test server this is first time to creat the report.
    APPLLCSP Environment Variable set to :
    XML_REPORTS_XENVIRONMENT is :
    /APPS/dkvuatora/8.0.6/guicommon6/tk60/admin/Tk2Motif_UTF8.rgb
    XENVIRONMENT is set to: /APPS/dkvuatora/8.0.6/guicommon6/tk60/admin/Tk2Motif_UTF8.rgb
    Current NLS_LANG and NLS_NUMERIC_CHARACTERS Environment Variables are :
    American_America.UTF8
    Spawned Process 2707514
    X connection to oraclefinof1:0.0 broken (explicit kill or server shutdown).
    Report Builder: Release 6.0.8.25.0 - Production on Wed Nov 18 16:06:17 2009
    (c) Copyright 1999 Oracle Corporation. All rights reserved.
    Enter Username:
    Start of log messages from FND_FILE
    End of log messages from FND_FILE
    Program exited with status 1
    Concurrent Manager encountered an error while running Oracle*Report for your concurrent request 339487.
    Review your concurrent request log and/or report output file for more detailed information.
    Executing request completion options...
    Finished executing request completion options.
    Concurrent request completed
    Current system time is 19-NOV-2009 16:24:52
    ---------------------------------------------------------------------------

    Hello.
    Have a look to Metalink Doc ID 252715.1
    You have to login to server and issue the 'xhost +' command.
    Hope this helps.
    Octavio

  • Custom Report in PDF output, blurred after printing in concurrent

    Hi,
    We have a customized report which is the output is in PDF. We tried to print it in concurrent, but the output is blurred and not clear enough. The following are the setup made.
    1. Server OS -> Linux 5(OEL5)
    2. Printer -> EPSON, Dot Matrix
    3. Driver ->Landscape
    Please help.
    Thanks and Regards,
    Peopsquik

    Please post the details of the application release, database version and OS.
    We have a customized report which is the output is in PDF. We tried to print it in concurrent, but the output is blurred and not clear enough. The following are the setup made.
    1. Server OS -> Linux 5(OEL5)
    2. Printer -> EPSON, Dot Matrix
    3. Driver ->LandscapeWhat about the concurrent request output file itself? Or the output file that is generated on the server under $APPLCSF/$APPLOUT directory? Can you download this file and view the contents to verify if the issue with generating the report or with printing?
    If the issue with printing only, can you reproduce the issue with other printers? What if you print the out file using the lp command?
    Thanks,
    Hussein

  • R12.1.3 - Reports 10g PDF Output not opening from SRS window

    Gurus,
    Your help will be highly appreciable for the below context.
    While trying to open a report output, following error occurs and won't show the PDF format correctly.
    "There was an error processing a page. There was a problem reading this document(135)".
    Object Type : Reports 10g with graph
    Conc Program Output Type : PDF
    Note: Currently issue happening only in DEV instance not in UAT/Prod instance.
    Thank You.

    Hi,
    When you click View Output, press the Control key and see if you get an open/save dialog. If one is displayed, save the document and try opening it directly from the PDF reader.
    If this does not resolve the issue, post a screenshot of the error.
    Regards,
    Bashar

  • Web report in PDF output differently with different  parameter string delimiter.

    Hi guys.
    Thanks for the two reply to my previous question regarding matrix report.
    I have another question,
    I invoke a report in web browser, so I put
    http://web-server/cgi-bin/rwcgi60.exe?server=aquarium+report=salmon.rdf+userid=salmon/fish@seaworld+desformat=PDF+destype=cache+paramform=no+p_fishid="123"+p_exp="01-JAN-2002"+p_exp2="01-APR-2002"
    The above results an empty PDF report output, i.e., no data.
    But if I do this,
    http://web-server/cgi-bin/rwcgi60.exe?server=aquarium+report=salmon.rdf+userid=salmon/fish@seaworld+desformat=PDF+destype=cache+paramform=no+p_fishid='123'+p_exp='01-JAN-2002'+p_exp2='01-APR-2002'
    Then the report will work.
    The ONLY difference, is that my parameters values for the first (error) URL I uses " and for the second (successful) I uses ' to delimit it.
    This only happens when DESFORMAT=PDF, I tried using Text or HTML, both worked fine with both string delimiters (" and ').
    Help.

    Hi, thanks for answering.
    But if I use double quotes, no data is shown in the PDF. Just an empty report format. Is there any work around this?
    I am using Oracle Report 6i running on Windows NT 4 and Oracle 8i database.
    Please advice.

  • Changing font in Oracle Report in PDF output

    Hi,
    I have created reports using dev10g(report builder). I can run report from client side in pdf format but I want to change the font (i.e from courier to Arial narrow).
    How can I do this?
    Is there anyone who can help me?
    my unifont.ali file is:
    # $Header: uifont.ali@@/main/22 \
    # Checked in on Tue Jan 8 15:32:42 PST 2002 by idc \
    # Copyright (c) 1999, 2004, Oracle. All rights reserved.
    # $
    # $Revision: tk2/admin/uifont.ali#0 $
    # Copyright (c) 1994, 2004, Oracle. All rights reserved.
    # All Rights Reserved.
    # DESCRIPTION:
    # Each line is of the form:
    # <Face>.<Size>.<Style>.<Weight>.<Width>.<CharSet> = \
    # <Face>.<Size>.<Style>.<Weight>.<Width>.<CharSet>
    # The <Face> must be the name (string/identifier) of a font face. The
    # <Style>, <Weight>, <Width>, and <CharSet> may either be a numeric
    # value or a predefined identifier/string. For example, both US7ASCII
    # and 1 are valid <CharSet> values, and refer to the same character set.
    # The <Size> dimension must be an explicit size, in points.
    # The following is a list of recognized names and their numeric
    # equivalents:
    # Styles Numeric value
    # Plain 0
    # Italic 1
    # Oblique 2
    # Underline 4
    # Outline 8
    # Shadow 16
    # Inverted 32
    # Overstrike 64
    # Blink 128
    # Weights Numeric value
    # Ultralight 1
    # Extralight 2
    # Light 3
    # Demilight 4
    # Medium 5
    # Demibold 6
    # Bold 7
    # Extrabold 8
    # Ultrabold 9
    # Widths Numeric value
    # Ultradense 1
    # Extradense 2
    # Dense 3
    # Semidense 4
    # Normal 5
    # Semiexpand 6
    # Expand 7
    # Extraexpand 8
    # Ultraexpand 9
    # Styles may be combined; you can use plus ("+") to delimit parts of a
    # style. For example,
    # Arial..Italic+Overstrike = Helvetica.12.Italic.Bold
    # are equivalent, and either one will map any Arial that has both Italic
    # and Overstrike styles to a 12-point, bold, italic Helvetica font.
    # All strings are case-insensitive in mapping. Font faces are likely to
    # be case-sensitive on lookup, depending on the platform and surface, so
    # care should be taken with names used on the right-hand side; but they
    # will be mapped case-insensitively.
    # See your platform documentation for a list of all supported character
    # sets, and available fonts.
    # BUGS:
    # o Should accept a RHS ratio (e.g., "Helv = Arial.2/3").
    #===============================================================
    [ Global ] # Put mappings for all surfaces here.
    # Mapping from MS Windows
    "arial narrow" = "Arial Narrow"
    Arial = helvetica
    "Courier New" = courier
    "Times New Roman" = times
    Modern = helvetica
    "MS Sans Serif" = helvetica
    "MS Serif" = times
    "Small Fonts" = helvetica
    # Mapping from Macintosh
    "New Century Schlbk" = "new century schoolbook"
    "New York" = times
    geneva = helvetica
    #===============================================================
    [ Printer ] # Put mappings for all printers here.
    #===============================================================
    [ Printer:PostScript1 ] # Put mappings for PostScript level 1 printers here.
    # Sample Kanji font mappings
    ...UltraLight..JEUC = "Ryumin-Light-83pv-RKSJ-H"...Light..JEUC
    ...UltraLight..SJIS = "Ryumin-Light-83pv-RKSJ-H"...Light..SJIS
    ...ExtraLight..JEUC = "Ryumin-Light-83pv-RKSJ-H"...Light..JEUC
    ...ExtraLight..SJIS = "Ryumin-Light-83pv-RKSJ-H"...Light..SJIS
    ...Light..JEUC = "Ryumin-Light-83pv-RKSJ-H"...Light..JEUC
    ...Light..SJIS = "Ryumin-Light-83pv-RKSJ-H"...Light..SJIS
    ...DemiLight..JEUC = "Ryumin-Light-83pv-RKSJ-H"...Light..JEUC
    ...DemiLight..SJIS = "Ryumin-Light-83pv-RKSJ-H"...Light..SJIS
    .....JEUC = "GothicBBB-Medium-83pv-RKSJ-H"...Medium..JEUC
    .....SJIS = "GothicBBB-Medium-83pv-RKSJ-H"...Medium..SJIS
    # Mapping from MS Windows
    Roman = palatino
    Script = "itc zapf chancery"
    FixedSys = courier
    System = helvetica
    # Mapping from Macintosh
    "Avant Garde" = "itc avant garde gothic"
    # Mapping from Motif display
    fixed = courier
    clean = times
    lucidatypewriter = courier
    lucidabright = times
    #===============================================================
    [ Printer:PostScript2 ] # Put mappings for PostScript level 2 printers here.
    # Sample Kanji font mappings
    ...UltraLight..JEUC = "Ryumin-Light-83pv-RKSJ-H"...Light..JEUC
    ...UltraLight..SJIS = "Ryumin-Light-83pv-RKSJ-H"...Light..SJIS
    ...ExtraLight..JEUC = "Ryumin-Light-83pv-RKSJ-H"...Light..JEUC
    ...ExtraLight..SJIS = "Ryumin-Light-83pv-RKSJ-H"...Light..SJIS
    ...Light..JEUC = "Ryumin-Light-83pv-RKSJ-H"...Light..JEUC
    ...Light..SJIS = "Ryumin-Light-83pv-RKSJ-H"...Light..SJIS
    ...DemiLight..JEUC = "Ryumin-Light-83pv-RKSJ-H"...Light..JEUC
    ...DemiLight..SJIS = "Ryumin-Light-83pv-RKSJ-H"...Light..SJIS
    .....JEUC = "GothicBBB-Medium-83pv-RKSJ-H"...Medium..JEUC
    .....SJIS = "GothicBBB-Medium-83pv-RKSJ-H"...Medium..SJIS
    # Mapping from MS Windows
    Roman = palatino
    Script = "itc zapf chancery"
    FixedSys = courier
    System = helvetica
    # Mapping from Macintosh
    "Avant Garde" = "itc avant garde gothic"
    # Mapping from Motif display
    fixed = courier
    clean = times
    lucidatypewriter = courier
    lucidabright = times
    #===============================================================
    [ Printer:PCL5 ] # Put mappings for PCL 5 printers here.
    helvetica = univers
    times = "cg times"
    clean = "antique olv"
    fixed = courier
    lucida = univers
    lucidabright = "cg times"
    lucidatypewriter = courier
    "new century schoolbook" = univers
    terminal = "line printer"
    #===============================================================
    [ Display ] # Put mappings for all display surfaces here.
    #===============================================================
    [ Display:Motif ] # Put mappings for Motif displays here
    # Fix for bug no 778937 DO NOT MOVE!
    Roman.....sjis = lucida.....jeuc
    Script.....sjis = lucidabright.....jeuc
    FixedSys.....sjis = fixed.....jeuc
    System.....sjis = lucida.....jeuc
    .....sjis = .....jeuc
    # Mapping from MS Windows
    Roman = lucida
    Script = lucidabright
    FixedSys = fixed
    System = lucida
    # Mapping from Macintosh
    "Avant Garde" = helvetica
    "Bookman" = times
    #===============================================================
    [ Display:CM ] # Put mappings for all CM displays here.
    # These are DEC-specific, and may need localization
    *..Blink = Blinking
    *..Inverted+Underline.Bold = ReverseBoldUnderline
    *..Inverted+Underline. = UnderlineReverse
    *..Underline.Bold = UnderlineBold
    *..Inverted.Bold = ReverseBold
    *...Bold = Bold
    *..Underline = Underline
    *..Inverted = Reverse
    * = Plain # The font of last resort
    # Oracle Report PDF sections
    # Three new sections have been added:
    # [ PDF ] - Used for font aliasing and Multibyte language support
    # [ PDF:Embed ] - Used for Type 1 font embedding
    # [ PDF:Subset ] - Used for True Type Font subsetting
    [ PDF ]
    "helvetica narrow" = "Arial Narrow"
    # This example shows how to rename helvetica font to Courier font
    # helvetica = Courier
    # You can Alias specific styles of font as below
    # helvetica.12..Bold.. = Courier.14....
    # "Lucida Bright".12..Bold = "New Century Schoolbook"
    # Support for Far Eastern Languages:
    # PDF section can be additionally used to enable Multibyte language support
    # built into Reports. To use this feature with Adobe (r) Acrobat (c), you
    # need to install the Asian font pack available online at the Adobe web site.
    # .....SJIS = "HeiseiKakuGo-W5-Acro"
    # A Japanese report run with Shift-JIS character set is replaced to
    # HeiseiKakuGo-W5-Acro CID font.
    [ PDF:Embed ]
    # This example shows how to embed Type 1 helvetica font into the PDF file:
    # helvetica = "helvetica.afm helvetica.pfa"
    # You need to specify the .afm file before the .pfa file.
    # The font files must exist in one of the folders specified in REPORTS_PATH.
    [ PDF:Subset ]
    "arial narrow" = "Arialn.ttf"
    # This example shows how to subset Arial True Type font into the PDF file:
    # helvetica = "Arial.ttf"
    # The True Type font files must exist in any one of the folders specified in
    # REPORTS_PATH.
    # Subsetting TrueType Collection fonts:
    # Typically, a TTC font contains several fonts in one file. For example,
    # the TTC file, msgothic.ttc consists of three fonts in the order -
    # MS Gothic, MS PGothic and MS UI Gothic. To subset MS PGothic, the
    # entry in the PDF:Subset section of uifont.ali would be:
    # "MS PGothic" = "msgothic.ttc,1"
    # NOTES ON PRECEDENCE OF PDF SECTIONS:
    # If you have entries for a same font in many PDF sections, then Font
    # Aliasing entry will take precedence over Font Subsetting entry. Entries
    # in Font Subsetting will take precedence over the entries in Font Embedding
    # section.
    # Generic entries for a font must follow more specific entries for the same
    # font. For instance, if you want to subset helvetica Plain, helvetica Bold,
    # helvetica Italic and helvetica Bold-Italic fonts, your entries must be:
    # [ PDF:Subset ]
    # helvetica..Italic.Bold.. = "Arialbi.ttf"
    # helvetica...Bold.. = "Arialb.ttf"
    # helvetica..Italic... = "Ariali.ttf"
    # helvetica..... = "Arial.ttf"
    # If helvetica..... entry appears in the top of the list, all the styles of
    # helvetica font in the layout will be subset as helvetica Plain font.
    Thanks,
    Rafikul

    Welcome to OTN
    Check the two link..
    1. Re: Oracle Reports 10g Fonts issue
    2. Re: Adding new font to my Reports Setup
    Hope this will help you
    Hamid
    If someone's response is helpful or correct, please mark it accordingly.

  • Convert SMARTFORM report to PDF and send as an email attachment

    Hi
    I am using the CONVERT_OTF function module to convert a SMARTFORM report in the "spool" to a PDF file. When I use the DOWNLOAD function module, the resulting file can be opened in acrobat.
    I would like to email the report in PDF format as an attachment. I am using the function module SO_NEW_DOCUMENT_ATT_SEND_API1 to create an attachment however the attached file is not being created correctly and When try to open, it gives 'File is damaged and could not be repaired' error message. I believe that somehow I am not using the SO_NEW_DOCUMENT_ATT_SEND_API1 function module correctly.
    Please help me to correct this
    Thanks
    Rohitha
    see my code below,
    I_OTF[] = W_RETURN-OTFDATA[].
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          FORMAT                = 'PDF'
          MAX_LINEWIDTH         = 132
        IMPORTING
          BIN_FILESIZE          = V_LEN_IN
        TABLES
          OTF                   = I_OTF
          LINES                 = I_TLINE
        EXCEPTIONS
          ERR_MAX_LINEWIDTH     = 1
          ERR_FORMAT            = 2
          ERR_CONV_NOT_POSSIBLE = 3
          OTHERS                = 4.
      IF SY-SUBRC <> 0.
      ENDIF.
      LOOP AT I_TLINE.
        TRANSLATE I_TLINE USING '~'.
        CONCATENATE WA_BUFFER I_TLINE INTO WA_BUFFER.
      ENDLOOP.
      TRANSLATE WA_BUFFER USING '~'.
      DO.
        I_RECORD = WA_BUFFER.
        APPEND I_RECORD.
        SHIFT WA_BUFFER LEFT BY 132 PLACES.
        IF WA_BUFFER IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
      REFRESH:  I_RECLIST,
                I_OBJTXT,
                I_OBJBIN,
                I_OBJPACK.
      CLEAR WA_OBJHEAD.
      I_OBJBIN[] = I_RECORD[].
      I_OBJTXT = 'PDF Attachment'.
      APPEND I_OBJTXT.
      DESCRIBE TABLE I_OBJTXT LINES V_LINES_TXT.
      READ TABLE I_OBJTXT INDEX V_LINES_TXT.
      WA_DOC_CHNG-OBJ_NAME = 'Smartform_to_PDF'.
      WA_DOC_CHNG-EXPIRY_DAT = SY-DATUM + 10.
      WA_DOC_CHNG-OBJ_DESCR = 'Smartform to PDF'.
      WA_DOC_CHNG-SENSITIVTY = 'F'.
      WA_DOC_CHNG-DOC_SIZE = STRLEN( I_OBJTXT ) + ( ( V_LINES_TXT - 1 ) * 255 ) .
      CLEAR  I_OBJPACK-TRANSF_BIN.
      I_OBJPACK-HEAD_START = 1.
      I_OBJPACK-HEAD_NUM = 0.
      I_OBJPACK-BODY_START = 1.
      I_OBJPACK-BODY_NUM = V_LINES_TXT.
      I_OBJPACK-DOC_TYPE = 'RAW'.
      APPEND I_OBJPACK.
      I_OBJPACK-TRANSF_BIN = 'X'.
      I_OBJPACK-HEAD_START = 1.
      I_OBJPACK-HEAD_NUM = 1.
      I_OBJPACK-BODY_START = 1.
      DESCRIBE TABLE I_OBJBIN LINES V_LINES_BIN.
      READ TABLE I_OBJBIN INDEX V_LINES_BIN.
      I_OBJPACK-DOC_SIZE = V_LINES_BIN * 255 .
      I_OBJPACK-BODY_NUM = V_LINES_BIN.
      I_OBJPACK-DOC_TYPE = 'PDF'.
      I_OBJPACK-OBJ_NAME = 'ATTACHMENT'.
      I_OBJPACK-OBJ_DESCR = 'test'.
      APPEND I_OBJPACK.
      CLEAR I_RECLIST.
      I_RECLIST-RECEIVER = 'my email address u2019.
      I_RECLIST-REC_TYPE = 'U'.
      APPEND I_RECLIST.
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          DOCUMENT_DATA              = WA_DOC_CHNG
          PUT_IN_OUTBOX              = 'X'
          COMMIT_WORK                = 'X'
        TABLES
          PACKING_LIST               = I_OBJPACK
          OBJECT_HEADER              = WA_OBJHEAD
          CONTENTS_BIN               = I_OBJBIN
          CONTENTS_TXT               = I_OBJTXT
          RECEIVERS                  = I_RECLIST
        EXCEPTIONS
          TOO_MANY_RECEIVERS         = 1
          DOCUMENT_NOT_SENT          = 2
          DOCUMENT_TYPE_NOT_EXIST    = 3
          OPERATION_NO_AUTHORIZATION = 4
          PARAMETER_ERROR            = 5
          X_ERROR                    = 6
          ENQUEUE_ERROR              = 7
          OTHERS                     = 8.
      IF SY-SUBRC <> 0.
        WRITE:/ 'Error ', SY-SUBRC.
      ELSE.
        WRITE:/ 'Mail sent'.
      ENDIF.

    Hi rohitha.wijewardena ,
    Please find the below code which i followed and succeed ,
    CALL FUNCTION 'WFMC_PREPARE_SMART_FORM'
        EXPORTING
          pi_nast       = nast
          pi_country    = lv_dlv-land
          pi_addr_key   = lv_addr_key
          pi_repid      = sy-repid
          pi_screen     = lc_x
        IMPORTING
          pe_returncode = gv_retcode
          pe_itcpo      = lv_itcpo
          pe_device     = lv_device
          pe_recipient  = lv_recipient
          pe_sender     = lv_sender.
      IF gv_retcode = 0.
    *moving the data to composer and control parameters for output
        MOVE-CORRESPONDING lv_itcpo TO lv_composer_param.
        lv_control_param-device      = lv_device.
        lv_control_param-no_dialog   = lc_x.
        lv_control_param-preview     = lc_x.
        lv_control_param-getotf      = lv_itcpo-tdgetotf.
        lv_control_param-langu       = nast-spras.
        lv_composer_param-tdnoprint = space.
      ENDIF.
    *Getting the Smartform Function module using Standard Function module
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname                 = lv_formname           "Smartform Name
       IMPORTING
         fm_name                  = lv_fm_name
       EXCEPTIONS
         no_form                  = 1
         no_function_module       = 2
         OTHERS                   = 3
      IF sy-subrc <> 0.
        gv_retcode = sy-subrc.
        PERFORM protocol_update.
        PERFORM add_smfrm_prot.
      ENDIF.
    **Smartform function module to get the output
      CALL FUNCTION lv_fm_name
        EXPORTING
       control_parameters         = lv_control_param
       mail_recipient             = lv_recipient
       mail_sender                = lv_sender
         output_options             = lv_composer_param
         user_settings              = ' '
          is_bil_invoice             = lv_bil_invoice
          gt_header                  = gt_header
       IMPORTING
         job_output_info            = gv_job_output
        TABLES
          gt_item                    = gt_item
       EXCEPTIONS
         formatting_error           = 1
         internal_error             = 2
         send_error                 = 3
         user_canceled              = 4
         OTHERS                     = 5
      IF sy-subrc <> 0.
        gv_retcode = sy-subrc.
        PERFORM protocol_update.
        PERFORM add_smfrm_prot.
      ENDIF.
      IF nast-nacha = lc_mail.
        gt_otfdata[] = gv_job_output-otfdata[].
    *           Converting Smartform to PDF                          *
        CALL FUNCTION 'CONVERT_OTF'
          EXPORTING
            format                = lc_pdf
            max_linewidth         = 10
          IMPORTING
            bin_filesize          = gv_binfilesize
            bin_file              = gv_pdf_xstring
          TABLES
            otf                   = gt_otfdata[]
            lines                 = gt_pdftab[]
          EXCEPTIONS
            err_max_linewidth     = 1
            err_format            = 2
            err_conv_not_possible = 3
            err_bad_otf           = 4
            OTHERS                = 5.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    *           Sending PDF to Email  using Class                     *
        IF NOT lv_email IS INITIAL .
          TRY.
             gv_send_request = cl_bcs=>create_persistent( ).
              gv_pdf_content = cl_document_bcs=>xstring_to_solix( gv_pdf_xstring ).
              gv_document = cl_document_bcs=>create_document(
                    i_type    = lc_pdf
                    i_hex     = gv_pdf_content
                    i_length  = gv_pdf_size
                    i_subject = lc_subject ).            "Subject for Email
              gv_send_request->set_document( gv_document ).
             gv_recipient = cl_cam_address_bcs=>create_internet_address( lv_email ).
              gv_send_request->add_recipient( gv_recipient ).
              gv_sent_to_all = gv_send_request->send( i_with_error_screen = lc_x ).
              COMMIT WORK.
              IF gv_sent_to_all IS INITIAL.
                MESSAGE i500(sbcoms) WITH lv_email.
              ELSE.
                MESSAGE s022(so).
              ENDIF.
            CATCH cx_bcs INTO gv_bcs_exception.
              MESSAGE i865(so) WITH gv_bcs_exception->error_type.
          ENDTRY.
        ENDIF.

  • Storing oracle-reports generated pdf-report onto a blob

    Hey ppl,
    I have this requirement:
    I basically generate a report from Jdev using a remote servlet call to oracle reports, which very neatly generates the pdf document for me and stores it locally. The problem is immediately storing this onto the DB as a blob once the report is generated. I know how to store the pdf as a blob onto the DB. I know how to make the call to oracle-reports and generate my pdf. What I don't know is to sequentially first generate the local pdf report and only once that has been generated proceed to store it onto my DB.
    I want it to be done within the scope of a single request. As in, the entire process should be complete through one cycle. I don't want to keep a day end sort of procedure that inserts into the db at the end of the day.
    As soon as the report has been requested by the user, I want the pdf file(which is generated by the reports) to also be stored onto the DB.
    My problem (which i apologize has been repeated already 2wice above) is that I basically lose control once redirected through the servlet to the report call. There is no way i can instruct Jdev, from the reports side, that the pdf has been generated and now has to be stored onto the DB, as i have lost the session context by redirecting to a different servlet.
    Any help would be GREATLY appreciated.
    Cheers
    K

    Hi,
    its quite some time ago that I a looked Oracle Reports, however, I think that the event mechanism is quite complex to achieve
    I want it to be done within the scope of a single request.
    Which means that if Oracle Reports hangs, the user session follows.
    As in, the entire process should be complete through one cycle.
    Unfortunately you don't control how long reports run, which means that there is no sense in stopping the page lifecycle for this
    I don't want to keep a day end sort of procedure that inserts into the db at the end of the day.
    Fair enough, but as far as I remember there is an eventing in Reports that would allow you to have the Oracle Reports Server triggering the upload
    So I think, the architecture I would go for is:
    - user requests report
    - report generates PDF output
    - reports uploads to DB
    - reports_processing table holds user ID and reports ID plus flag to update when report is done
    - If using JSF, you could use af:poll to check frequently for the report to be finished.
    This here may help: http://www.oracle.com/technology/documentation/reports.html
    Frank

  • Creating pdf-output in Germany

    Hello,
    I have created a report with Developer 6.08 on a Windows NT 4.0-Client.
    The report creates pdf-output.
    The compiled report is run with rwrun60 on several PC with also NT 4.0.
    On some PC the output file is correct and can be read by the Acrobat Reader. On others the numbers in the created
    output file have a (german?) comma as decimal seperator.
    These files cannot be read by the Acrobat Reader.
    The regional settings on all PC are set to "Deutsch(Deutschland)".
    The NLS_LANG is set to AMERICAN_AMERICA.WE88ISO59P1 and the "decimal"-variable in the report is a dot.
    There must be some difference between the PC, but where is it?
    Thanks, Birgit

    Birgit,
    There was a bug with some german printer drivers where if you printed a report to that driver, afterwards you would see this behaviour with PDF output. This was fixed in an earlier 6i patch set. I would suggest that you download the latest 6i patchset from metalink and install that.
    Regards,
    Danny

  • My Concurrent Program PDF output is in Russia instead of in English.  Why?

    I have selected Format as PDF and Style as "Landscape" and I am using English version as many others. Why am i getting Russian(or its some other language I really dont know that script) characters when I run the report?
    I am using
    RDBMS : 10.2.0.2.0
    Oracle Applications : 11.5.10.2
    Oracle Forms Version : 6.0.8.27.0
    Application Object Library : 11.5.0
    Please suggest me to get English font in my PDF output file.
    I forgot to mention that I am able to see output in english when I run the report with Format as "Text".

    Since your characterset is set to UTF8, generating any report in PDF format (with or without printing) is not supported. Oracle Reports 6i cannot generate PDF output with multi-byte characters. In Oracle Applications 11i with Oracle Reports 6i, PDF output is supported for only Latin-1 character sets such as US7ASCII, WE8ISO8859P1 or WE8MSWIN1252.
    Under UTF8, generating PDF via the XML Publisher is supported and it can be done. Alterative workaround is to use another format like Postscript (Assuming that PASTA is already installed and configured).

  • PDF Output is moving one column to the middle of page (Prod Issue Urgent!)

    Hi All,
    I have a very funny thing and i could not get any solution.
    I have a report that is printing data in 6-7 pages. This is very simple and tabular report.
    1. I have created one big table with two columns (A and B).
    2. Then i have created another two table under first column (A) and i am using second column (B) as a single column for the address.
    When i run this report in PDF output then PDF report is shoing seond column (B) in the middle of the report.
    Can anyone tell me solution for this.
    Thanks
    Jack

    Hi,
    Can you send over your rtf template, some sample XML and the pdf output from the report?
    [email protected]
    I will take a look and see what I can make of it.
    Regards,
    Cj

Maybe you are looking for