Utl file in report

hai all,
I have to develop a report using utl file.
Like when the report is given a parameter some four columns are displayed, at the same time i want to write the data in a text file in the server path /usr/tmp.
used formula column for utl file open , putline etc.
While running i am getting the error
REP-1401:'cf_1formula', Fatal PL/SQL error occured.
ORA-00600:internal error code , argument :[kghal02],[oxo],[],[],[],[],[]
can anyone suggest me a solution for this or there is any other solution for using utl file in oracle reports.
I am in urgent need of it.
Thamks and regards,
aaditya

Make sure that the directory you use with UTL_FILE is writable. For example, if you use /abc/xyz, then both directories (abc and xyz) should be writable.

Similar Messages

  • UTL FILE or SQLLDR??

    I need some opinions about this, I need to load a big file more than 600 fields into a table and I am trying to decide what will be the best method, (sqlldr or UTL_FILE?) I have good luck with sqlldr, I like the report that the CTL file generates, but I am curious about the UTL_FILE, i never done this way but I have good examples that I can follow, I just want to ask you guys before I start coding.
    The example of the UTL FILE willl be something like this:
    BEGIN
             v_path     :=        'MIDD_DATA' ;
          ---v_path :=         '/u02/sct/dat_files';
          v_file_in1 := UTL_FILE.fopen (v_path, 'finaid.idoc', 'r', '3806');
          w_record_count := 0;
          w_load_date := TRUNC (SYSDATE);
          w_recno := 0;
          BEGIN
             LOOP
                g_bad_ssn_ind := FALSE;
                w_recno := w_recno + 1;
                UTL_FILE.get_line (v_file_in1, v_record);
                w_college_code := RTRIM (SUBSTR (v_record, 0001, 4));
               w_academic_year_code := RTRIM (SUBSTR (v_record, 0005, 2));
                w_idoc_id_number := RTRIM (SUBSTR (v_record, 0007, 7));
                w_student_notification_date := RTRIM (SUBSTR (v_record, 0014, 8));THEN i will insert the variables in the table

    If you are loading a file, use SQL*Loader or external tables. There is no reason to write, debug, and maintain all the UTL_FILE code when SQL*Loader and external tables already have it for you.
    Justin

  • Problem writing to excel file using report generation toolkit

    hello everyone, i have this report generation toolkit... and i want to output DAQmx Analog I/P data on to an excel sheet. the DAQmx is programmed to collect 
    data at 3samples/sec. however, when i see the excel file that Report Generation Toolkit generates, the time stamp is updated every second instead of every 0.33sec. 
    can anyone please help me?  i am using the MS Office Report Express VI. 
    Now on LabVIEW 10.0 on Win7

    @All, I got rid of the express VI, decided to work on the custom low level VIs instead. however, i have a new problem now... 
    I have a case statement wherein, the user selects if he wants to start generating a report. once the program enters tat loop, the program speed reduces! 
    can anyone please tell me why is it happening? i ahve attached the vi... also another question.. in this VI, i am capturing the unwanted data into the graph as I am indexin the graph input. how can i make a logic 
    that the graph captures the data only when I am switching the CREATE REPORT button (which is in the while loop). is there a way that I can append the data to the graph without creating a new graph every iteration? please let me know
    thanks
    Now on LabVIEW 10.0 on Win7
    Attachments:
    Untitled 7.vi ‏75 KB
    Untitled 7.JPG ‏99 KB

  • Report Builder 1.0 .RDL Files on Report Builder 3.0

    My group has developed a lot of .rdl files using Report Builder 1.0 over the years and we're finally upgrading to Report Builder 3.0 with SQL Server 2014.  Will our old .rdl files still work on the new version?

    Hi ericvanburen,
    According to your description, you want to know if the .rdl file created in Report Builder 1.0 can be available in Report Builder 3.0. Right?
    Report Builder 3.0 is used to create reports in a familiar, Microsoft Office-like authoring environment. It has backward compatibility. You can customize and update all existing reports, regardless of whether they were created in Report Designer or in the
    previous versions of Report Builder.
    Reference:
    What's New in Report Builder 3.0
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • How can i create  excel sheet with multiple tabs using utl file?

    how can i create excel sheet with multiple tabs using utl file?
    any one help me?

    Jaggy,
    I gave you the most suitable answer on your own thread yesterday
    Re: How to Generating Excel workbook with multiple worksheets

  • Is there a way on maxdb to force netbackup to use different initSID.utl fil

    (This thread refers to a question that was posted to a blog and where the proper location to handle it is this forum)
    Is there a way on maxdb to force netbackup to use different initSID.utl files ? I have try to do it with different bsi.env file . But if i start the backup it keep on asking for the default bsi.env file in /sapdb/data/wrk/SID directory . I have set the variable BSI.ENV to the new file but it looks like it ignore it. Its on a sun solaris operating system
    Due to security reasons the DBM server process does no longer inherit environment variables from its caller, e.g. dbmcli.
    see PTS 1155045, as especially in the area of external backup tools inheriting environment settings seem to be rather common.
    Idea is to add BSI_ENV to the dbm.cfg file with a command like:
      dbmcli -d ... -u ... dbm_configset BSI_ENV
    For further information please refer to this documentation section
    or for Backint also here 
    Best regards
    Jörg

    Hi Jörg,
    hmmm. I'd guess there are some problem with for which user the environment variables have been defined...
    Anyhow, usually it's easier not to use the environment variables but to provide the dbm-server it's own runtime variables via dbm_configset.
    Check the old thread archive_stage and archive_stage_repeat to different NSR_POOLs for an example application of this.
    regards,
    Lars

  • Cretaion of UTL.File in Oracle 10G and directory entry in Ora.ini file

    Hi,
    Kindly advise me if:
    (!) we can create a directory and log file in this directory on some other server instead of creating it in the file system of the server where the Oracle 10G database is residing?
    Created directory in Oracle using create or replace directory command.
    My package will be creating a log file using UTL.File in the above directory.
    I want to create this directory on some other server to save my log file/s. Is this possible?
    (2) Also, let me know in Oracle 10G, do we need to add the directory entry (mention above in #1) in the Ora.ini file on the Oracle 10G server?

    Hi,
    1) utl_dir are different from directory object
    2) you cannot create directory on remote server and there is no need to write directory entry on oracle init file (not ini..)
    Acr

  • Error using UTL File

    Hi,
    I am using UTL file to export data to an external file and getting an error which i am unable to reslove... Can anyone help me with this
    SQL> create or replace
    2 procedure MEXICO_NAFTA_CERTIFICATE_EXT (
    3 f_org_id varchar2,
    4 f_customer_nbr_base varchar2,
    5 f_customer_nbr_sufx varchar2,
    6 f_year VARCHAR2)
    7 is
    8 output_file utl_file.file_type;
    9 o_filename VARCHAR2(50):= 'MEXICO_NAFTA_CERTIFICATE_EXT.txt';
    10 o_DataDir CONSTANT VARCHAR2 (30) := '/d014/oradata/temp';
    11 v_CERTIFICATE_NBR fta.SAP_CERTIFICATES_EXTRACT_VIEW.CERTIFICATE_NBR%type;
    12 v_PART171 fta.SAP_CERTIFICATES_EXTRACT_VIEW.PART171%type;
    13 v_INACTIVE_IND fta.SAP_CERTIFICATES_EXTRACT_VIEW.INACTIVE_IND%type;
    14 v_HTS_CDE fta.SAP_CERTIFICATES_EXTRACT_VIEW.HTS_CDE%type;
    15 v_ORIGINATING_IND fta.SAP_CERTIFICATES_EXTRACT_VIEW.ORIGINATING_IND%type;
    16 v_ISO_COUNTRY_CDE fta.SAP_CERTIFICATES_EXTRACT_VIEW.ISO_COUNTRY_CDE%type;
    17 v_BASIS_CDE fta.SAP_CERTIFICATES_EXTRACT_VIEW.BASIS_CDE%type;
    18 v_PRODUCER_CDE fta.SAP_CERTIFICATES_EXTRACT_VIEW.PRODUCER_CDE%type;
    19 v_CERT_CDE fta.SAP_CERTIFICATES_EXTRACT_VIEW.CERT_CDE%type;
    20 v_REGIONAL_VALUE_CONTENT_CDE fta.SAP_CERTIFICATES_EXTRACT_VIEW.REGIONAL_VALUE_CONTENT_CDE%type;
    21 v_PART_NBR fta.SAP_CERTIFICATES_EXTRACT_VIEW.PART_NBR%type;
    22 v_EFFECTIVE_DATE fta.SAP_CERTIFICATES_EXTRACT_VIEW.EFFECTIVE_DATE%type;
    23 v_EFFECTIVE_FROM_DATE fta.SAP_CERTIFICATES_EXTRACT_VIEW.EFFECTIVE_FROM_DATE%type;
    24 v_EFFECTIVE_TO_DATE fta.SAP_CERTIFICATES_EXTRACT_VIEW.EFFECTIVE_TO_DATE%type;
    25 v_TRANSACTION_DATE fta.SAP_CERTIFICATES_EXTRACT_VIEW.TRANSACTION_DATE%type;
    26
    27
    28 CURSOR Cert_ext IS select certificate_nbr ,
    29 part171,
    30 inactive_ind,
    31 hts_cde,
    32 originating_ind,
    33 iso_country_cde,
    34 basis_cde,
    35 producer_cde,
    36 cert_cde,
    37 regional_value_content_cde,
    38 part_nbr,
    39 effective_date,
    40 effective_from_date,
    41 effective_to_date,
    42 transaction_date
    43 from fta.SAP_CERTIFICATES_EXTRACT_VIEW
    44 where org_id= f_org_id AND
    45 customer_nbr_base= f_customer_nbr_base AND
    46 customer_nbr_sufx = f_customer_nbr_sufx AND
    47 to_char(effective_from_date, 'yy') = f_year AND
    48 to_char(effective_to_date, 'yy') = f_year;
    49
    50 begin
    51
    52 output_File := UTL_FILE.FOPEN (o_DataDir, o_FileName, 'w');
    53
    54 OPEN Cert_ext;
    55 loop
    56
    57 fetch Cert_ext into v_CERTIFICATE_NBR ,
    58 v_PART171 ,
    59 v_INACTIVE_IND,
    60 v_HTS_CDE ,
    61 v_ORIGINATING_IND ,
    62 v_ISO_COUNTRY_CDE ,
    63 v_BASIS_CDE ,
    64 v_PRODUCER_CDE ,
    65 v_CERT_CDE ,
    66 v_REGIONAL_VALUE_CONTENT_CDE ,
    67 v_PART_NBR,
    68 v_effective_date,
    69 v_effective_from_date,
    70 v_effective_to_date,
    71 v_transaction_date ;
    72
    73 UTL_FILE.PUT_LINE (output_File, v_CERTIFICATE_NBR || ' '||
    74 v_PART171 || ' '||
    75 v_INACTIVE_IND || ' '||
    76 v_HTS_CDE || ' '||
    77 v_ORIGINATING_IND || ' '||
    78 v_ISO_COUNTRY_CDE || ' '||
    79 v_BASIS_CDE || ' '||
    80 v_PRODUCER_CDE || ' '||
    81 v_CERT_CDE || ' '||
    82 v_REGIONAL_VALUE_CONTENT_CDE || ' '||
    83 v_PART_NBR || ' '||
    84 to_char(v_EFFECTIVE_DATE, 'mm-dd-yy') || ' '||
    85 to_char(v_EFFECTIVE_FROM_DATE, 'mm-dd-yy') || ' '||
    86 to_char(v_EFFECTIVE_TO_DATE, 'mm-dd-yy') || ' '||
    87 to_char(v_TRANSACTION_DATE, 'mm-dd-yy'));
    88
    89 UTL_FILE.FCLOSE (output_File);
    90 DBMS_OUTPUT.PUT_LINE ('Data Extracted');
    91 end loop;
    92 close Cert_ext;
    93 END MEXICO_NAFTA_CERTIFICATE_EXT;
    94 /
    Procedure created.
    SQL> declare
    2 begin
    3 MEXICO_NAFTA_CERTIFICATE_EXT('0048', '00254101', '11', '03');
    4 end;
    5 /
    Data Extracted
    declare
    ERROR at line 1:
    ORA-29282: invalid file ID
    ORA-06512: at "SYS.UTL_FILE", line 774
    ORA-06512: at "FTA_SOURCE.MEXICO_NAFTA_CERTIFICATE_EXT", line 72
    ORA-06512: at line 3

    what is the datatype of your column org_id for the table fta.SAP_CERTIFICATES_EXTRACT_VIEW? also try to put this exceptions to see what might be the exact cause of the error.
      EXCEPTION
        WHEN utl_file.invalid_mode THEN
          RAISE_APPLICATION_ERROR (-20051, 'Invalid Mode Parameter');
        WHEN utl_file.invalid_path THEN
          RAISE_APPLICATION_ERROR (-20052, 'Invalid File Location');
        WHEN utl_file.invalid_filehandle THEN
          RAISE_APPLICATION_ERROR (-20053, 'Invalid Filehandle');
        WHEN utl_file.invalid_operation THEN
          RAISE_APPLICATION_ERROR (-20054, 'Invalid Operation');
        WHEN utl_file.read_error THEN
          RAISE_APPLICATION_ERROR (-20055, 'Read Error');
        WHEN utl_file.internal_error THEN
          RAISE_APPLICATION_ERROR (-20057, 'Internal Error');
        WHEN utl_file.charsetmismatch THEN
          RAISE_APPLICATION_ERROR (-20058, 'Opened With FOPEN_NCHAR But Later I/O Inconsistent');
        WHEN utl_file.file_open THEN
          RAISE_APPLICATION_ERROR (-20059, 'File Already Opened');
        WHEN utl_file.invalid_maxlinesize THEN
          RAISE_APPLICATION_ERROR(-20060,'Line Size Exceeds 32K');
        WHEN utl_file.invalid_filename THEN
          RAISE_APPLICATION_ERROR (-20061, 'Invalid File Name');
        WHEN utl_file.access_denied THEN
          RAISE_APPLICATION_ERROR (-20062, 'File Access Denied By');
        WHEN utl_file.invalid_offset THEN
          RAISE_APPLICATION_ERROR (-20063,'FSEEK Param Less Than 0');
        WHEN others THEN
          RAISE_APPLICATION_ERROR (-20099, 'Unknown UTL_FILE Error');

  • Want to display a .bmp file in reports

    Hello there
    I am trying to display a .bmp file on reports which I think is simple.the main problem is that After making changes to report we transfer the report file to Unix and then generate the report in unix and print it and in that process the report stops printing.
    Thanks in advance.
    Jha

    make sure SOURCE FILENAME is valid in your LINK FILE pointing to the image.bmp
    Report compiles nicely even with wrong source filename, only when opening layout editor an error message will appear.

  • Getting INVALID_OPERATION  while using UTL file

    Hi,
    I have a procedure which makes different UTL files i.e data file, error file and log file for a Purchase order. These 3 sets of files are made for every purchase order.
    So suppose in a cursor i find that there are 10 Purchase orders to process, then it should create 30 UTL files 10 sets of 3 files.
    But when i run this procedure, after processing 3 PO's i.e after creating 9 files i get INVALID_OPERATION error.
    So lets say i have 10 PO's 1 to 10 , i run for first time PO 1,2 and 3 utl files are created and then i get error. Then when i run it again processes PO number 4 to 6 and then again error...
    So i want to know is there any restriction on number of UTL files you can create in a single procedure. i want urgent help, appreciate ur quick replies on this matter.
    thanks,
    Dipin

    Hi,
    There could be several reasons for this...
    1. In inti ora file, what utl file directory was specified? is it 'C:\PLXML\DBDOM'? if not check.
    2. Do u have C:\PLXML\DBDOM\Testfile.txt in your directory?
    3. If you have above file in that directory and you have opened that file for writing purpose, close that.
    Ur program looks ok. Also, dbms_output.put_line will display 255 charcters only(at least in 7.3).
    Koti.
    null

  • Can we dynamically change the file name in dst file in Report 6i, Urgent!

    I am calling dst file to generate file with diffenet format.
    but name of the pdf file should generate dynamically everytime i call dst file,
    is there anyway to set the desname in dst file in Report 6i? Any solution,
    Thanks for your help

    Hi Roshan,
    Create two RKF's one for Normal Invoices and another for canceled invoices, for doing this you should have some characteristics or some status value which will identify the normal and canceled invoice.
    In the Normal Invoice RKF simply restrict the key figure with status restriction as Normal and pull the invoice amount as key figure. And in case of Canceled key figure you will set the status restriction as "canceled" and pull the invoice amount, now for canceled invoice key figure to show the negative value do the following,
    Go to RKF properties of canceled invoice and mark the check box +/- Reverse sign, which will show the negative amount.
    Regards,
    Durgesh.

  • Problem with UTL FILE COPY

    Hi,
    I am facing one small problem in UTL FILE COPY package. We have an automated scheduled batch process. As a daily batch process it moves the files from one folder to other. During movement, it first copies the file from source folder to destination folder using FILE COPY package and then removes the file using FILE REMOVE package from the source folder.
    Few cases are found that the file when files are copied they are copied as 0 bytes in destination folder but the source file had 1 MB file size. The interesting part is I am unable to replicate the issue. Means when i try to run once again the package its working properly and files are copied with correct size. This kind is issue is occuring very rarely though as once in month but the question is why FILE_COPY package is not working properly sometimes.. I am unable to understand.
    Thanks a lot for going through this. Any suggestions.
    Regards,
    Ashish

    Anyhow make sure that the copy will start after the full generation of files.
    You can think like a spool file generation with huge data. In that case initially spool file available with 0 byte only. After finish of query only it shows its actual size.

  • Attaching a text/pdf file in report builder

    i have develop account package for that i want to attach a text file in report builder. each account have its seprate text file.should it is possible? How?
    please give me reply on [email protected]
    thank you
    Message was edited by:
    user561602

    Hi (datasci),
    You can create a linked server in SSMS, then create a procedure to join three sheets. Then you can call the procedure in a dataset.
    As we tested in our environment, we create a linked server and the procedure like below:
    --linked server
    EXEC sp_addlinkedserver
    @server = 'ExcelServer',
    @srvproduct = 'Excel',
    @provider = 'Microsoft.ACE.OLEDB.12.0',
    @datasrc = 'c:\Book3.xls.xlsx', -- the path in the server where SQL server locates
    @provstr = 'Excel 12.0;IMEX=1;HDR=YES;'
    EXEC sp_addlinkedsrvlogin 'ExcelServer', 'false'--, 'sa', 'Admin', null
    go
    --procedure
    CREATE PROC proce2
    as
    SELECT a.Name,a.Amount,b.PtNo,b.value,c.Gender
    FROM ExcelServer...[Sheet1$] as a
    left join ExcelServer...[Sheet2$] as b on a.Name =b.Name
    left join ExcelServer...[Sheet3$] as c on c.PtNo =b.PtNo
    Then we call the procedure in the dataset, we get the expected result:
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • Problem with utl file

    Hi to all,
    I have tried the UTL file concept as per the oracle documentation
    I have created a directory name read_flat_file and granted read, write permission to the whm user. I am trying to executing the below code as in Oracle Documentation, but I am getting this below error.
    DECLARE
    V1 VARCHAR2(32767);
    F1 UTL_FILE.FILE_TYPE;
    BEGIN
    F1 := UTL_FILE.FOPEN('READ_FLAT_FILE','HMI PO','R',256);
    UTL_FILE.GET_LINE(F1,V1,32767);
    UTL_FILE.FCLOSE(F1);
    END;
    Error I am getting is
    F1 UTL_FILE.FILE_TYPE;
    ERROR at line 3:
    ORA-06550: line 3, column 4:
    PLS-00201: identifier 'UTL_FILE' must be declared
    ORA-06550: line 3, column 4:
    PL/SQL: Item ignored
    ORA-06550: line 5, column 1:
    PLS-00320: the declaration of the type of this expression is incomplete or
    malformed
    ORA-06550: line 5, column 1:
    PL/SQL: Statement ignored
    ORA-06550: line 6, column 19:
    PLS-00320: the declaration of the type of this expression is incomplete or
    malformed
    ORA-06550: line 6, column 1:
    PL/SQL: Statement ignored
    ORA-06550: line 7, column 17:
    PLS-00320: the declaration of the type of this expression is incomplete or
    malformed
    ORA-06550: line 7, column 1:
    PL/SQL: Statement ignored
    I tried this code from system user but I got the same error.
    When I am trying the same code with the SYS User I got this error.
    declare
    ERROR at line 1:
    ORA-29283: invalid file operation
    ORA-06512: at "SYS.UTL_FILE", line 475
    ORA-29283: invalid file operation
    ORA-06512: at line 5
    I dont understand the UTL_FILE package is granted to PUBLIC role by default.
    In sys user the handler is throwing the error perfectly that invalid file operation. then why this is not occuring with other users.
    Please let me know why this is happening
    Thanks and Regards,
    Vijay

    Hi Vijay,
    There are two problems here...
    The first is that your user doesn't appear to have execute privs on the procedure. As you say, it is usually granted to public, but it doesn't look like it is for you. Check the privileges with:
    select *
    from dba_tab_privs
    where table_name like 'UTL_FILE'
    This will list who has permissions on the package. If you get nothing, grant execute to either public or to your user:
    grant execute on sys.utl_file to <user/public>;
    The second problem is a syntax error on line 5 of your procedure. Remove the ',256' bit - it shouldn't be there.
    F1 := UTL_FILE.FOPEN('READ_FLAT_FILE','HMI PO','R');
    Cheers,
    Andy Barry
    http://www.shutdownabort.com

  • Issue with utl file

    Hi,
    I am using UTL file to export records from table with fixed delimiter to a text file.
    It works fine except that I see an additional character @ at the end of the file in the last line.
    Can anyone let me know why are we getting this and how can we delete it..
    Thaks in advance..

    I assume, as you are saying you can see the file ok in notepad/wordpad that you are creating a text file.
    So a) what are you using to view the file in unix and b) how did you transfer the file to unix?
    When you transfer files from Windows/DOS based operating systems to unix based operating systems you have to be aware that Windows uses a CR/LF pair of characters to terminate a line (a 'newline') and unix just uses a single LF character (character 10 in the ascii table) to terminate a line.  So when you transfer the files you need to convert the CR/LF pairs into just LF characters.
    Typically this is done if you transfer the files using FTP and specify the 'mode' to be ASCII rather than BINARY.
    c:\>ftp testserver
    Connected to testserver.mycompany.com.
    220 sunny2 FTP server ready.
    User (testserver.mycompany.com:(none)): myuser
    331 Password required for myuser.
    Password:
    230 User myuser logged in.
    ftp> ascii
    200 Type set to A.
    ftp>
    This tells the FTP software that you are transferring text files and that it needs to convert newline characters, if necessary, when transferring between Windows and Unix operating systems.
    And for reference, if it's not a text file, then you must transfer in BINARY mode to ensure the files remain byte for byte the same...
    ftp> bin
    200 Type set to I.
    ftp>
    If you don't transfer text files, between different operating systems, in ASCII mode, then those files will either be missing characters or have additional characters that aren't wanted.

Maybe you are looking for