Convert the report into the Excel Sheet.
Why we have to convert report into Excel Sheet
- Better Manner
- Editable
- Simple Reports are convert into the Excel Sheet.
Eg:
Steps:
- Go to the Report Builder
Go to the Data Model
Select the Sql Query and click on Data Model
Type the Sql Query in it.
SELECT
po_header_id
,segment1
,created_by
,creation_date
,vendor_id
FROM
po_headers_all
- Take 3 placeholder columns 1 Formula Column
First placeholder column CP_1
Name it as CP_Title
Data Type : Char
Size :200
Second placeholder column CP_2
Name it as CP_Col_Headings
Data Type : Char
Size : 600
Third placeholder column CP_3
Name it as CP_Values
Data Type : Char
Size : 500
One Formula column CF_1
Name it as CF_Excel
Data Type : Number
Size : 20
- Go to the property palette of the Formula Column(CF_Excel)
Go to the PL/Sql Formula
In that Write this code depending upon ur sql query
Function CF_EXCELFormula return Number is
Begin
:CP_Title :=’,’||’,’||’,’||’,’||’,’||’Report For Practice on Exports to Excel’;
:CP_Col_Headings := ‘Header Id’||’Po Number’||’Created By’||’Creation Date’||’Vendor Id’;
:CP_Values:=po_header_id||’,’||:segment1||’,’||:created_by||’,’||:creation_date||’,’||:vendor_id;
return 2;
end;
Compile and Close it.
- Go to Layout Model
For Field F_1 press F4 or select the Property palette
Go to the Source =CP_Title
For Field F_2 press F4 or select the Property palette
Go to the Source =CP_Col_Headings
For Field F_3 press F4 or select the Property palette
Go to the Source =CP_Values
And Go to the Vertical Layout
Set Vertial Elasticity = Fixed
Horizontal Elasticity = Variable
For the Repeating Frame press F4
Go to the Source = G_header_id
And Go to the Vertical Layout
Set Vertial Elasticity = Expand
Horizontal Elasticity = Expand
Save the Report with the ‘.txt’ format.
Next Register the Report in the Apps
1. Create Executable
2. Define the Concurrent>Program>Defien
In that OutPut set
Format = HTML
Style = BACS
3. Attach the Concurrent Program in the Request Group.
4. Submit the Request in the View>Request
5. And then go to the Excel Sheet
6. And Click Open and select the report name with ‘.txt’ one.
7. It will ask the Delimiter
Just specify the delimiter i.e., Comma(,) {which we have given in the CP_Title}
No comments:
Post a Comment