Question regarding outputing results of query to pdf file

Is there a way in which we can output the results of the query to a PDF file in PLSQL?
Thanks much,
Madhu

I have a situation where there needs to be emails sent to the customers on a daily basis.Right now there is scheduled bat file on a particular machine which calls the Form which has the logic to generate the pdf file using Oracle Reports for each of the customer,which is then mailed using Outlook(OLE in form).But now this is kind of a problem as they are constant network problems which hinder the timely sending of the reports.
I am trying to look for a solution so that we can do everything on database end instead of relying on the newtork.
Thank you for any suggestions you have regarding implementing this.
Madhu

Similar Messages

  • Output of SQ01 Query to a file in background

    Hello,
           I have created a SQ01 query for a certain specific outpur from my SAP system. I need to get the output of this query to a file. While i have tried executing this report from the frontend; it works smoothly, and based on the variant it creates the output and writes to a file at a remote location. But while i am trying to process the same query using background job, it creates a spool request and doesnt export the data to a file.
           Can someone please help me in getting me right in case i am doing anything wrong.
    Regards,
    V

    Hi,
    SAP have created a standard program RSTXPDFT4 to convert your Sapscripts spools into a PDF format.
    Specify the spool number and you will be able to download the sapscripts spool into your local harddisk.
    It look exactly like what you see during a spool display.
    Please note that it is not restricted to sapsciprts spool only.  Any reports in the spool can be converted using the program 'RSTXPDFT4'.
    Regards,
    Pavan

  • Procedure to save the output of a query into excel file or flat file

    Procedure to save the output of a query into excel file or flat file
    I want to store the output of my query into a file and then export it from sql server management studio to a desired location using stored procedure.
    I have run the query --
    DECLARE @cmd VARCHAR(255)
    SET @cmd = 'bcp "select * from dbo.test1" queryout "D:\testing2.xlsx;" -U "user-PC\user" -P "" -c '
    Exec xp_cmdshell @cmd
    error message--
    SQLState = 28000, NativeError = 18456
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user 'user-PC\user'.
    NULL
    Goel.Aman

    Hello,
    -T:
    Specifies that the bcp utility connects to SQL Server with a trusted connection using integrated security. The security credentials of the network user,
    login_id, and password are not required. If
    –T is not specified, you need to specify
    –U and –P to successfully log in.
    -U:
    Specifies the login ID used to connect to SQL Server.
    Note: When the bcp utility is connecting to SQL Server with a trusted connection using integrated security, use the
    -T option (trusted connection) instead of the
    user name and password combination
    I would suggest you take a look at the following article:
    bcp Utility: http://technet.microsoft.com/en-us/library/ms162802.aspx
    A similar thread regarding this issue:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/b450937f-0ef5-427a-ae3b-115335c0d83c/bcp-connection-error-sqlstate-28000-nativeerror-18456?forum=sqldataaccess
    Regards,
    Elvis Long
    TechNet Community Support

  • Saving result from query into CSV file

    Hi folks,
    in our application we're generating pages source using general packages (like htp, owa_util, ...). and in this part I'm a really beginner.
    I want to modify source one of our page, I want to add functionality to enable save result from query (cursor) into CSV file, to enable user choose place where generated file will be created and also change file name.
    I searched this forum and I found procedure, that could be useful:
    procedure p_getcsv is
    cursor cur is
           select 'a1' col1, 'b1' col2, 'c1' col3 from dual
       union  select 'a2' col1, 'b2' col2, 'c2' col3 from dual
       union  select 'a3' col1, 'b3' col2, 'c3' col3 from dual;
       begin
            -- Set the MIME type
            owa_util.mime_header( 'application/octet', FALSE );
            -- Set the name of the file
            htp.p('Content-Disposition: attachment; filename="test.csv"');
            -- Close the HTTP Header
            owa_util.http_header_close;
            -- Loop through all rows in EMP
            for x in cur
            loop
                -- Print out a portion of a row,
                -- separated by commas and ended by a CR
                 htp.prn(x.col1||','|| x.col2||','||x.col3|| chr(13));
            end loop;        
       end;What peace of code should I add to procedure that is generating web page to enable calling this procedure and whole saving process?
    Can anybody help me with this?
    Many thanks,
    Tomas
    Message was edited by:
    Tomeo

    Hi Marc,
    thanks for reply, problem is that I'm not using APEX application, I'm just generating web page code straight using oracle general packages.
    But I found this solution (maybe some tunning will be good):
    In page where I want to display Download i have
      begin
             htp.anchor2 (
                           curl  =>  ... .p_getcsv'||'?term=2005&crn=123,
                           ctext => 'Download Class List'
             HTP.br;
          end;
    ...si I'm calling p_getcsv procedure:
      procedure p_getcsv( term  IN stvterm.stvterm_code%TYPE DEFAULT NULL,
                           crn   IN sirasgn.sirasgn_crn%TYPE DEFAULT NULL) is
       v_length      NUMBER;
       v_file_name   VARCHAR2 (2000);
       temp_blob  blob;
       line RAW(32767);
       begin
             DBMS_LOB.CREATETEMPORARY(temp_blob, TRUE);
             FOR i IN 1..6  LOOP
                line := UTL_RAW.CAST_TO_RAW(i||','||term||','||crn||',AAA,BBB,CCC'||chr(10));
                DBMS_LOB.WRITEAPPEND(temp_blob, LENGTH(UTL_RAW.CAST_TO_VARCHAR2(line)), line);
             END LOOP;
              v_file_name := 'ClassList.csv';
              v_length  := DBMS_LOB.getlength (temp_blob);
              -- set up HTTP header
                 -- use an NVL around the mime type and
                 -- if it is a null set it to application/octect
                 -- application/octect may launch a download window from windows
               OWA_UTIL.mime_header (NVL ('csv', 'application/octet'), FALSE);
               -- set the size so the browser knows how much to download
               HTP.p ('Content-length: ' || v_length);
               -- the filename will be used by the browser if the users does a save as
               HTP.p (   'Content-Disposition:  attachment; filename="'
                  || REPLACE (REPLACE (SUBSTR (v_file_name,
                                               INSTR (v_file_name, '/') + 1
                                       CHR (10),
                                       NULL
                              CHR (13),
                              NULL
                  || '"'
                 -- close the headers
                 OWA_UTIL.http_header_close;
                -- download the BLOB
                 WPG_DOCLOAD.download_file (temp_blob);
                 -- release temporary blob
                 dbms_lob.freetemporary(temp_blob);  
       end;Regards,
    Tomas

  • Can we set the output to be saved as pdf file?

    Hi Guru,
    We need to have a soft copy of the output, for example, the picking list or commercial invoice, when we create these output, they can printed out, but if we can have a pdf format soft copy from the SAP at the same time?
    thnaks,

    And can we develop a Z program with a logic to make it possible to automatically save the output file as pdf file by batch, by user name and by dates?
    Thank you very much,

  • 2 questions regarding output to offset printing

    I am using CS4 to work on pictures I have taken and will be used for postcards. The sizes can be 105*148 or 120*170 mm. some cards will have more then one picture in which case there may be samller inserts, maybe as small as 25*25mm
    In relation to this work I have basically 2 questions:
    1) I will be using Indesign to size the pictures down to final size and also for the small inserts. My question is regarding sharpening. Do I need to size the photos in Photoshop and possibly adjust the sharpening there, or do I not need to worry about this?
    2) Should I convert my photos to CMYK in Photoshop, or can I leave this to Indesign? I will be sending the pictures to the printers as PDF.
    Much appreciate any help and comments on this,
    Tolli Birgisson

    Tolli_Birgisson wrote:
    I am using CS4 to work on pictures I have taken and will be used for postcards. The sizes can be 105*148 or 120*170 mm. some cards will have more then one picture in which case there may be samller inserts, maybe as small as 25*25mm
    In relation to this work I have basically 2 questions:
    1) I will be using Indesign to size the pictures down to final size and also for the small inserts. My question is regarding sharpening. Do I need to size the photos in Photoshop and possibly adjust the sharpening there, or do I not need to worry about this?
    2) Should I convert my photos to CMYK in Photoshop, or can I leave this to Indesign? I will be sending the pictures to the printers as PDF.
    Much appreciate any help and comments on this,
    Tolli Birgisson
    You can use InDesign to resize the images. When you select an image you can go to Window>Info and it shows you two things
    Actual PPI
    Effective PPI
    Actual PPI shows what resolution the image is itself.
    Effective PPI shows you what resolution the image is at it's current scaled size. The larger you make the picture the lower the ppi (or the bigger you make the picture the further the pixels separate and therefore the less PPI (pixels per inch). The same is applied when making the image smaller. The further you reduce the picture, the closer the pixels get to each other, therefore you have more pixels per inch, which is a higher PPI.
    The advantage of doing this in InDesign is that you have no second party software to rely on. You just resize.
    The disadvantage is that InDesign doesn't apply any sharpening or other filters to the image, it uses Bicubic Smoother (I think?) to resample the image.
    When you export to PDF you can choose what way you want to resample images and to what resolution you want images above say 450 ppi to be resampled to 300 ppi.
    It would be better to use photoshop to make them the images the correct size at the correct resolution and place the image at 100%. You can then apply sharpening etc. to the image in photoshop. You can turn off resampling the images in Export to PDF in InDesign and turn off compression.
    If you are going to resample the images in Photoshop then you should be aware of file types. If they're all jpgs then you don't want to resave your images as JPG, you'd be better of resampling and resizing and then saving the image as a tiff, as it's a lossless format.
    You can use CS4 to relink to another folder
    Now for question 2
    You can convert your images to CMYK in photoshop, why not? Well make sure your Color Settings are set up similar to that of InDesign. If your images are going to be for print only then you can Assign Profile of whatever profile you want. You should check with your printers what profile they use. It could be:
    Coated or Uncoated Fogra
    US Sheetfed
    Euroscale (coated or uncoated)
    US Web Press
    etc.
    You need to check that with prepress.
    Of course you can convert your images to a profile when exporting to PDF straight from InDesign. In which case don't convert to CMYK in photoshop - sort of. It's a rather complex answer.
    But if you choose the profile Colour Conversion of Convert to "Destionation Preserve Numbers"
    Select your Destination (profile, which will be Coated or Uncoated Fogra or US SHEETFED or US WEB Press or whatever was recommend by your prepress in what they use).
    As I said it's a rather complex answer so perhaps this will clear up anything else for you, if not just ask http://www.peachpit.com/articles/article.aspx?p=1324238

  • A question about output result

    i want to print the query result of a database table into the screen. but i found it difficult to align the results. listed below is an example
    Mary F 28
    Alexandra M 30
    i usd the listed command to print above results:
    System.out.println("\t" + name + "\t" + gender + "\t" + age);
    i had planed to use '\t' to align the output, but i found length of data are different. like "Mary", it is less 8 characters, while "Alexandra" requires 9 characters. this leads to the output is not aligned. the expected result would be like this:
    Mary F 28
    Alexandra M 30
    anyone knows how can i align the output ? thanks a lot!

    by writing something like
    public static String leftAlign( String string, int length)
    StringBuffer buffer = new StringBuffer( length);
    if( string.length() < length)
       buffer.append(string);
       for ( int idx = string.length(); idx < length; ++idx)
         buffer.append( ' ');
    else
       buffer.append( string.substring(0,length);
    return buffer.toString();
    System.out.println( leftAlign( "", 9) + leftAlign( name, 30) + leftAlign( gender, 5) + leftAlign( age, 5) );

  • Question regarding the size of a rendered DVD file?

    Hi all,
    I just finished my first home video using Premiere Pro CS4 and Encore CS4. My source is a consumer HD camcorder. When I created the PP project, I selected AVHCD format to keep it the highest quality possible. So Iimported the files in PP, applyed some transition effects and a few title. Then I sent the sequence to Encore via Dynamic link. When creating the project in encore, I selected Blu ray. So I created a menu and all the navigation, added a subtitle and a background music. At first, I wanted to created a DVD of my video to give to family members, so I go to created disc, select DVD output and render the video. Now here comes my problem: the DVD folder created is 7GB, and my footage is only 1h45min. I always thought that a single layer 4.7GB could hold about 2h of video? My source being HD but me selecting DVD output, shouldn't it be converted to SD and fit a 4.7GB disc? What am I doing wrong?
    Thanks for your help.
    Bruno

    When you transcode (convert from edit to DVD) you may select the bit rate you want
    A higher bit rate results in a larger file (and better quality)
    You said you select BluRay in Encore, then talk about DVD... you can't have both
    With a lower bit rate (may show motion artifacts during movement) you may fit more on a DVD
    What are your EXACT settings?

  • Plug-in PDF, Internet Explorer, unable to open a pdf file from web site. Question mark

    Hello,
    A computer where Acrobat 9 Standard and Acrobat Reader 9 have been installed.
    When I try to read a pdf file from a web site and read it in IE, I get a popup whith a question mark and no text.
    The pdf file is not open.
    I have try to reinstall the last reader but the problem is not solved.
    Thanks for your help.
    fabrice

    Any ideas how to solve this issue?
    Try using Protected Mode Off.  Then you will be at the same level of security that those other programs are running at.  You could also try elevating the iexplore.exe task.  That would turn off Protected Mode in that task automatically but then
    you would be running also with Administrator level authority which might be excessive.
    Robert Aldwinckle

  • Regarding the storing of the pdf files

    hi,
    The requirement is that all the pdf files  that are present in the application server for the day must be saved to presentation server at the end of the day.
    Thnaks in advance.

    In Pages you have the option to export to Pdf and can choose between good, better and best versions. Beware though it is often the images that will lose in resolution. This is what the Pages User Guide says:
    If you’re exporting to PDF, you must choose an image quality (a higher image quality results in a larger PDF file):
    Best: Image resolutions are not scaled down.
    Better:          Images are downsampled to 150 dpi. Images without transparency (alpha
    channel) are JPEG-compressed by 0.7.
    Good:          Images are downsampled to 72 dpi. Images without transparency (alpha channel) are JPEG-compressed by 0.9.

  • R/3 spool on pdf file

    Hi forum,
    is it possibile in R/3 to generate a pdf file for each spool into a particular file system ? I would to create a pdf file in directory for each delivery spool output.
    Regards.
    Ganimede Dignan.

    Hi,
    Actually for manual PDF file generation there is a program called RSTXPDFT2. You need to make an ABAP program to make it "automatic" conversion for particular spools. Technically, if you need it for every spool, then we need to little workaround:
    1. Install SAPGUI to a PC, to have SAPLPD on it installed in the correct way.
    2. Create a printer on the PC and the result should be a PDF file. It is something like "print to PDF file". You may need a third party program.
    3. Create a printer type 'U' on SAP, pointing to the PC host and the "print to PDF file" printer.
    4. The spools that need to be converted to PDF should have this output device as the destination.
    Bare in mind that SAPLPD on the PC host must be active.
    Regards,
    Agoes

  • Print pdf file

    Hello everybody.
    I have installed Oracle Database 10.2.1, Http server that comes with its companion cd, APEX 3.0.1, OC4J Standalone and Apache FOP, all in one computer. Now all good except by ORMI server that dont work enough good. All this in Linux Red Hat ES/AS 4.
    I have done a report and I HAVE MY FIRST PDF REPORT, but in screen and first I must to do a normal Apex Report and from this lunch the FOP. I think that must have a mistake in this.
    ¿What I want to do ? easy , call the FOP from a buttom, it generate a PDF file, I take this and print in the printer of my custom with javascrip or any other tool.
    Questions ,
    1º) How I can generate the PDF file without first must to show the first page of it.
    2º) From where I can take the PDF file generated by FOP?
    Any idea wellcome.
    Thanks & Regards to everybody.

    Hi!
    You need to use application level items instead of page level items. Application items can be populated from page items or thru a computation or a page process or an application process, etc.
    You will need to check the SQL of your report and change it to use the application items instead of page items.
    I have set up application items for things like report begin and end dates, etc.
    Another option is to pass them in the URL you are using to run the report. See the documentation on f?p.
    Let me know if you need more info.
    Dave Venus

  • Is there a way to merge Static PDF files and PDF Forms

    Hi All,
    The issue I am facing is this: 1200+ PDF forms that employees
    will need to sign. The docs are being created in MS Word, and all
    have a standard signature block. We have prototyped using LiveCycle
    Designer 8 to add fields to static PDF files (print Word files into
    Acrobat, import into LiveCycle and paste in fields) but this is
    pretty labor-intensive to use with a minimum of 1200 forms per
    quarter.
    The employee forms go into a CF8/Oracle library app (stored
    as BLOBs) and served up for 7,000 or so employees to sign. Posted
    data goes back into database.
    Here is the issue:
    Does anyone know any way to use some combination of cfpdf /
    cfpdfform / cfdocument that will allow us to create ONE generic
    signature block form, 1200 static PDF files, and merge them on the
    fly?
    <cfdocument> apparently does not allow PDF data to be
    included with a <cfpdfform>, as I have tried outputting PDF
    variables, toBinary(PDF variable), PDF served by <cfcontent>
    and various other combinations.
    (If the non-form data were HTML, we could easily output in a
    <cfdocumentsection> of the cfdocument, and add the
    <cfpdfform source="#genericForm#" action="populate"> and be
    done with it. But, we can't.)
    <cfpdf action="merge"> with a combination of a static
    PDF file and a populated form results in a flattend PDF file with
    no form data.
    I am acutely aware that LiveCycle 8 uses the XFA schema, and
    regular PDF documents use a different schema. And, this may
    prohibit what we want to do.
    If anyone has experience with CF8 PDFs and PDF forms, or has
    any helpful thoughts, I would be appreciatively gross. Needless to
    say, this is a six month project that must be live at the end
    November.
    Thanks!
    Jim Bates
    Verizon Business

    As I mentioned on the other thread, the forms need to be
    flattened. CFPDF cannot flatten LiveCycle forms, only Acrobat
    Forms. The suggested solution was to use LiveCycle ES
    http://www.adobeforums.com/webx/.3c052176

  • How to create PDF file from bypassing the Save as Dialogue box in Adobe XI

    I am from powerbuilder development team. I want to save the output of the datawindow to PDF file using Adobe PDF printer but should not as for saving the file. The program should save the file to location mentioned in the registry key.
    I want to know which Adobe XI registy key I need to update to mention the file name and the location.

    You need to post this question to the Acrobat SDK Forum:  Acrobat SDK

  • Printing issues from InDesign CS4 pdf file

    Good morning,
    Could you help explain and possibly resolve an issue I'm having with an InDesign CS4 pdf file where the text and image drop shadows (40%) are printing as solid black blocked shapes from a large format printer. The file encompasses 1 overall image, 1 image with drop shadow, 3 text frames with drop shadow effect applied to the text and 1 group set of simple rectangular and ellipse objects with a glow.
    My colleagues in graduate school experienced the same with their files and the output bureau's rasterized the pdf file in Photoshop where it printed out with good resolution. Shouldn't this be resolved first in InDesign rather than rasterizing the file?
    I appreciate any help and insight you could offer myself and my colleagues.
    Thank you, Kathryn

    The printing service uses Acrobat 8 Pro and HP large format printer. My InDesign CS4 document is in the color mode of RGB and color type as Process. I saved it as a pdf file using the standard settings as follows: Preset: High Quality Print, Standard: None and Compatibility: Acrobat 4 (PDF 1.3). Are there options I should be paying more attention to when creating the PDF file? Also, I was reading up on Peter Spier's response links.
    This brings me to the next question...I'm creating a photo book for grad school with approximately 40 pages of images (RGB, 300dpi) with feathered drop shadows. What would be the best settings to use when exporting as a pdf file for printing services?
    Thank you for your help.
    Kathryn

Maybe you are looking for

  • Opening and closing 3rd party applications ??

    Does opening and closing 3rd party applications with the click of the home button actually close the application, or, does it continue running in the back ground ? I noticed most of the 3rd party application don't have a close/exit option, and wonder

  • Drivers for Lexmark x5150

    I am trying to download the drivers for a hand-me-down Lexmark x5150. http://downloads.lexmark.com/static/229-1-0-133.html When I download the: Description: Driver for Mac OS 9.x.x and Mac OS X OS: Mac OS X Filename: X5100 Series Installer" It comes

  • How to install Win 7 pro 64-bit on new SSD in WWAN slot?

    I tried two generic Win 7 installation disks and get the error code 0x80070570 for 64-bit installs.   Did a lot of searching and reading, unplugged everything, did a memory check and just can't get past that error.  32-bit installs ok on the SSD in t

  • Moving all records- old  code (G/L/Cust/Vend) to new code (G/L/Cust/Vend)

    Hi Friends, I have created a customer code (say for e.g. C001 for  ABC LTD.), and did some SD & FI transactions (data entry) using that code. After few days, I realized that this above stated customer code (C001) is not correct. So I blocked this cus

  • Why do Hebrew language characters show as question marks?

    On my office web, when an email from Israel is posted , the title is shown as question marks. When I respond or forward a Hebrew text it also comes up as question marks