Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Using Oracle Reports6i to create export file

Re: Using Oracle Reports6i to create export file

From: <browe_at_fleetcor.com>
Date: Mon, 25 Jun 2001 16:30:08 -0000
Message-ID: <tjepogoevdou30@corp.supernews.com>

browe wrote:
>
> I am calling a Report from a Form via the below code:
>
> -- Create parameter lists and load with values, If a parameter
> -- list already exists then destroy it.
> V_Paramlist_Id := GET_PARAMETER_LIST(V_Listname);
> IF NOT ID_NULL(V_Paramlist_Id) THEN
> DESTROY_PARAMETER_LIST(V_Paramlist_Id);
> END IF;
> V_Paramlist_Id := CREATE_PARAMETER_LIST(V_Listname);
>
> Add_Parameter(V_Paramlist_Id,'PARAMFORM', TEXT_PARAMETER, 'NO');
> Add_Parameter(V_Paramlist_Id,'DESTYPE', TEXT_PARAMETER, 'FILE');
> Add_Parameter(V_Paramlist_Id,'DESNAME', TEXT_PARAMETER,
 V_Export_FileName);
> Add_Parameter(V_Paramlist_Id,'DESFORMAT',TEXT_PARAMETER,'delimited');
> Add_Parameter(V_Paramlist_Id,'DELIMITER',TEXT_PARAMETER,'TAB');
> Add_Parameter(V_Paramlist_Id,'P_MONTH',TEXT_PARAMETER,P_Month);
> Add_Parameter(V_Paramlist_Id,'P_YEAR',TEXT_PARAMETER,P_Year);
> Add_Parameter(V_Paramlist_Id,'P_Name',TEXT_PARAMETER,:Parameter.P_Name);
> Add_Parameter
> (V_Paramlist_Id,'P_EMAILTO_ADDRESS',TEXT_PARAMETER,V_EmailTo_Address);
>
> IF ID_NULL(V_Paramlist_Id) THEN
> Message('Error creating parameter list: '|| V_Listname);
> RAISE Form_Trigger_Failure;
> END IF;
>
> -- Run report(EXPORT_REPORT) to create the export file
> RUN_PRODUCT(REPORTS,'EXPORT_REPORT',
> ASYNCHRONOUS,
> RUNTIME,
> FILESYSTEM,
> V_Paramlist_Id);
>
> The report is TABULAR.
> What I want to do is when a developer runs the report for testing and/or
> changes while in report builder the column labels should print above
 their
> respective columns and when called from the form when in production it
> should create a tab delimited file with the column labels omitted.
>
> I've been able to get the column labels NOT to appear at the beginning
> of each row by specifying a format trigger on the group:
>
> -- This format trigger disables the column labels from appearing
> -- if the report output is NOT to the Screen, Printer or Preview
> -- destination type otherwise the column labels appear.
>
> FUNCTION SUPPRESS_LABELStrig RETURN BOOLEAN IS
> BEGIN
> If :DESTYPE != 'Screen' and
> :DESTYPE != 'Printer' and
> :DESTYPE != 'Preview'
> then
> return (FALSE);
> Else
> return (TRUE);
> end if;
> END;
>
>
> The problem is even though the labels do NOT appear, it is still
> reserving space before each row for the labels by placing a
> TAB(the column delimiter) before the first column of data, and I
> know this is what's happening because I can delete the format trigger
> and the labels will appear again before each row?
>
> How can I remove the TAB that is being inserted for the column headings?
>
> TIA
>

I have determined that the solution is to use an undocumented feature, by passing another system parameter to the called report(DELIMITED_HDR=NO). You have to be at patch 3, reports version 6.0.8.12.

--
Posted via CNET Help.com
http://www.help.com/
Received on Mon Jun 25 2001 - 11:30:08 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US