Showing posts with label RDF report. Show all posts
Showing posts with label RDF report. Show all posts

Friday, 3 July 2015

Rdf Report Creation Process in oracle apps

Report Builder is one of the Oracle GUI Tool   Graphical user Interface

By using this we can develop simple and Complex reports

There are two ways we can develop the report
ü  Wizard base
ü  Manuval

While developing Report we have two stages.
ü  Data Model
ü  Layout model

Data Model will be used to select the data from Database,
SELECT Statemen and Formulas,Summary functions and so on…….

Layout model will used to displays the datamodel fields in the desired format.

Layout Model Objects:

1)Text : Will be used to display the standard text information
         like titles,prompts,headings,Address……………

2)Frame : Will be used to display the layout objects only one time
           like totals,titles,Headings and so on

3)Repeating Frame: Will be used to display the objects multiple times
           like database columns,Sub Totals,Page Totals…….

4)Field  : Will be used to display the Data base columns,variables and            so on.

                First page :  Employee Information Report

Second Page :  Empno Ename  Sal  hiredate   Comm

Last page  : End of the report

Summary Column : If we want to apply summary functions then we will go for summary columns            like Average,count,min,max and so on.

1)Group level   :               Executed for every record in the group
2)Report Level  :             Executed only once for entire report.


Total    Emp:
Total    Sal:
Min Salary  :
Max Salary  :


Formula Columns : When we want implement some logic and return the  value then we will use formula columns.
It is a PL/SQL Function. where we can write PL/SQL code we can return only one value.
1)Group Level
2)Report Level


Place Holder Columns:

A datatype which stores some value and we can use this across the  report.
It will work lika Global variable in the reports.
If we want to return more than one value from the Formula Columns then it will be used.

Triggers:
Format Trigger
Validation Trigger
Action Trigger
Report Triggers

Format Trigger : To Hide or display the layout objects dynamically it will be used.
layout objects means frame, repeating frame, field,…………

Action Triggers: If we want to develop drill down reports then we will use Action Triggers.
Place the Button in the layout when user press the button we can  execute some PL/SQL code.

Report Triggers: 5 Types which will fired automatically when we run the report.

ü  Before Parameter Form
ü  after Parameter Form
ü  Before report
ü  Between pages
ü  After Report


Before Parameter Form : Will Execute before the parameter form is going to  open.
To assign any default values for the parameter.

After Parameter Form  : After the Parameters are entered in the form and submit it will be executed.To change the Parameter values dynamically And To populate the Lexical parameter values.

Before Report : It will be executed before report is executing and select data from database.

Between Pages : When cursor moves from one page to another page it will be executed .
                It will be executed (n-1) times.

After Report : after completion of the report. once the output is reach the  destination (Printer , file, fax , e-mail) then it will be executed.


Parameters :

ü  System Parameters
ü  User Defined Parameters                        
ü  Bind
ü  Lexical

User Parameters:
Bind parameters will used to pass the the value into the query in the WHERE Clause

Lexical parameters will be used to replace the string in side of the query in any clause.

SELECT * FROM EMP &P_ORDER_BY                       

Ex:
After Parameter Form Trigger

If user pass the deptno then select between that otherwise select all the dept employees data

SELECT *
FROM EMP
WHERE DEPTNO BETWEEN :P _FROM AND :P _TO

If P_from is entered then it should retrieve all dept from the specified dept

if p_to is entered then it whould retireve upto specified deptno.


WHERE DEPTNO>=:P_FROM

WHERE DEPTNO<=:P_TO




Bind
Lexical
ü  To pass the Values into the WHERE Clause.
ü  We will use the symbol “:”
ü  Can be used only in the WHERE Clause.
ü  Any Data Type.
ü  Values will be passed in the Parameter Form.
ü  To Replace the String in the Query.
ü  We will use the symbol “&”
ü  In any Clause we can use this.
ü  Must be Character.
ü  Values will be assigned dynamically form                                     in the After Parameter Form Trigger.



System Parameters:

DESFORMAT     :              Html, pdf…..
DESNAME          :               Name of the Printer, E-mail,Fax,File
DESTYPE            :              File, Screen, Print, Fax, E-mail
MODE                  :               Bitmap, Character


Confine Mode: Lock mode if it is on then we can not take the child object out of the Parent Object. If it is  off then we can take out of the parent.

Flex Mode:       If Flex mode is on . If we Incr/Decr the child object automatically parent object also incr/decr.  If it is off then Only child object will be decr/Incr.

Program Unit :
  Is a PL/SQL objects(Procedures, Functions, Packages) which will be stored in the Report we can use only in the Current Report.


Program units
PL/SQL Objects
ü  Will be stored in the file.
ü  Can be used only in the Current Report.
ü  Improve the Performance.         
ü  Stored in the Database
ü  We can use any report.
ü  It takes more time


Libraries : Group of Program units and Libraries We can attach the Attach the Library to another report and use the Program units.

We can not attach the Program units to another reports directley that’s why we will PL/SQL Library to attach.

.pll  –      Source Code –                    Program Link Library
.plx  –     Executable Code –           Program Link Executable

Report Registration Steps:

1) Develop the report (.rdf) as per client requirement by using Reports  Builder

Step – 1:              select “Built a new Report manually” option and click OK button.

Step -2:  Now you are in Data Model, select SQL query tool and write required query.

Step – 3: Click on OK and connect to apps/apps@VISR12

Step- 4 : As our query is having parameters its creating two bind parameters

Step – 5:  Go to Paper layout and design Frame, then keep Labels and then design Repeating Frame with in Frame and keep  Fields with in Repeating Frames.
Go to Frame Properties                                set Vertical Elasticity as Expand
Go to Repeating Frame Properties           set like following

Go to Field Properties set like below.

Step – 6: Run the form and enter details like below.




2) Move the report from the local machine in to the server by using WINSCP
A. CUS_TOP\11.5.0\reports\US .rdf (or)
Reports Deployment
Note:  Plz notice that as we don’t have CUST_TOP in our server, we are feeling PO_TOP as  CUST_TOP
for our practice. But in real time we will use only CUST_TOP which is named with Client Name.
Step – 1: open Putty and type below commands to know path of Custom top

Step – 2: Open WinSCP to reach the Custom Path through GUI

Step – 3: Deploy the test.rdf into Custom top Location.
3) Select System Administrator
a. Create Executable
b. Executable name
c. Application Name
d. Execution Method
e. Report (.rdf) file name

Step – 4: Create Executable by linking to test.rdf

Executable File name should be Report name which is available in server only.
4) Create Concurrent Program and attach :
concurrent program is Instance of executable file along with input parameters and incompatible programs.  Development of sample report and Move  to oracle apps and execution.
a. Executable
b. Parameters
c. Incompatibilities
Step – 5: Create Concurrent Program, while creating provide Executable name to this.

Step – 6:  Click on Parameters Tab and go to screen to provide details like below screen. Token values should be like parameter from Report Builder.

5) Create Request group and attach Concurrent Programe

Step – 7: Go to Request Group screen , create  group, or open existing group to attach our Concurrent Program Name.

6) Create Responsibility
a. Request Group – Collection of Concurrent Programs
b. Data Group – Collection of User IDs
c. Menu – Collection of forms
Step – 7: Go to Responsibility Screen and create one responsibility and attach our Request Group to this Responsibility.

7) Create user attach Responsibility to the user
Step – 9: Go to User Screen and attach our responsibility to existing Business User.
Run the Report through SRS window.

  1. Go to File —-à switch Responsibility —–à select our responsibility
  2. Go to View—à Request —à find then we can fine below screen.
  3.  
 Click on Submit New Request  button.

 Click on ok button to submit single request. Then call our report to run SRS window.

 Provide the Values for Parameters  before click on OK button.

 Click on No button for not to submit another request.
 Click on Refresh Button to make our report into complete Normal Stage.

  Types of executables : These are programs

Oracle Application supports 12 types of languages
1)      Oracle Reports                  -->   .rdf
2)      Sql * Plus                              -->   .sql
3)      PL/SQL Procedures          -->   .proc
4)      Sql * Loader                       -->   .ctl
5)      Unix shell script                -->   .sh
6)      C – Language                    -->   .C
7)      Pro – C                                   -->   .prc
8)      Java Programs                    -->   .java
9)      Java Serve Pages (OAF)   -->   .jsp
10)   PERL      scripting              -->   .perl
11)   Java Server Faces(ADF      --> .JSF

Default Types
1)      Constant
2)      SQL Statement
3)      Segment
4)      Current Date
5)      Current Time
6)      Profile

These are of 8 types of Validation types
1)      NONE
2)      Dependent
3)      Independent
4)      Table
5)      Translate dependent
6)      Translate Independent
7)      Special
8)      Pair
Request Set:Request set is a collection of report / Programs that you group together and can be submitted to run is a single interaction.
                                                  
Request Id: When submit a request oracle application assigns a request id to the request. We can use this request id to search for request.

Concurrent Manager:    A concurrent manager is a component of concurrent processing that monitors and runs tasks without typing up your computer.

View LOG:Using this we can see the technical details of the concurrent programs.

View Output:Using this we can see the actual result data.

Concurrent Program:     After creation of executable we will create concurrent Program by attachingExecutable, if parameters are there we will attach parameter if incompatibility Programs are there we will add those programs , for single executable we create Multiple concurrent programs with different parameters.

Request Group: After creation of concurrent program we must add the program to the request
Group. Request Group is nothing but collection of Concurrent Programs and Reports.

Responsibility:  It is level of authority where we will combine Data Group, Request Group and
Menu. Request Group is optional, where as menu and data group is mandatory.

Data Group:  Data Group is nothing but collection of applications names and Oracle User
Names based on this Username data will be retrieved from database.

Menu: Menu is nothing but collection of functions (forms) and submenus.

Value Set: values set is nothing but list values. It will be used to validate values while entering the parameters.

Token:   Token is one the field will be used to map concurrent Program parameters with report builder Bind variable. We will enter the Bind variable name in the toke field so that parameters will be passed to the Bind variable.

Required check box:       By using this check box we can make the parameters mandatory or optional

Enabled Check Box:        By using this we can enable or disable the parameter.

Display Check Box:          By using this we can hide or display the parameters in SRS Window.

Range Option:While defining the from and to parameters if we wanted to accept Values in accession order menus from values is low and to value is high we will Select the options called low and high.

Default Types: If we are hiding the parameters user can’t enter the values that Time we can pass default values by using default type and default value filed.

Scheduling the Concurrent program       We can submit the Concurrent program future date or date by using the schedule button in SRS window.

1. As soon as possible: This is default option whenever we submit the request it will submit the as soon as possible

2. Once: It will submit the rest only once for future date.

3. Periodically: WE can specify the from_date and to_date to submit program periodically no of. Days months, hours, minutes and so on.

4. Specific Days: If we want submit concurrent program in the specific days we write select this option

5. Save this Schedule: This check box will be used to save the schedule and apply same schedule to other concurrent programs by selecting the button called ‘Apply save schedule’

Thursday, 29 May 2014

Query to find Parameters and Value Sets associated with a Concurrent Program

SELECT
        fcpl.user_concurrent_program_name "Concurrent Program Name",
        fcp.concurrent_program_name "Short Name",
        fdfcuv.column_seq_num "Column Seq Number",
        fdfcuv.end_user_column_name "Parameter Name",
        fdfcuv.form_left_prompt "Prompt",
        fdfcuv.enabled_flag " Enabled Flag",
        fdfcuv.required_flag "Required Flag",
        fdfcuv.display_flag "Display Flag",
        fdfcuv.flex_value_set_id "Value Set Id",
        ffvs.flex_value_set_name "Value Set Name",
        flv.meaning "Default Type",
        fdfcuv.DEFAULT_VALUE "Default Value"
 
FROM
        fnd_concurrent_programs fcp,
        fnd_concurrent_programs_tl fcpl,
        fnd_descr_flex_col_usage_vl fdfcuv,
        fnd_flex_value_sets ffvs,
        fnd_lookup_values flv
 
WHERE
        fcp.concurrent_program_id = fcpl.concurrent_program_id
        AND    fcpl.user_concurrent_program_name = :conc_prg_name
        AND    fdfcuv.descriptive_flexfield_name = '$SRS$.'
                 || fcp.concurrent_program_name
        AND    ffvs.flex_value_set_id = fdfcuv.flex_value_set_id
        AND    flv.lookup_type(+) = 'FLEX_DEFAULT_TYPE'
        AND    flv.lookup_code(+) = fdfcuv.default_type
        AND    fcpl.LANGUAGE = USERENV ('LANG')
        AND    flv.LANGUAGE(+) = USERENV ('LANG')
 
ORDER BY fdfcuv.column_seq_num;

Thursday, 22 May 2014

Compile Oracle Report/RDF in UNIX

rwconverter userid=apps/apps_password batch=yes source=file_name
stype=rdffile DTYPE=rdfFILE compile_all=yes OVERWRITE=yes


logfile=log.txt dest=outfile_name

Thursday, 2 May 2013

How to integrate a report (RDF) with Oracle Apps

Once you have developed the report in Oracle Report builder, you need to integrate it with Oracle Applications, so that users could run it as a concurrent program request.

I am assuming that you have created the report (RDF), so lets start integrating with Oracle.


1) Navigation: System Administrator --> Concurrent --> Program --> Executable


How to integrate a report (RDF) with Oracle Apps


Executable: Name of the executable file name of your choice. It is not referenced anywhere in the system.
Short Name: This name is referenced when we define the report and its parameters. This name is also referenced when we register XML report with Oracle. See below.
Application: Name of the application, preferably you should create a custom schema.
Execution Method: Oracle Reports
Executable File Name: The file name which is placed at server.


2) Navigation: System Administrator --> Concurrent --> Program --> Define

How to integrate a report (RDF) with Oracle Apps


Program: Name of the concurrent program which will be shown to user, when one tries to run it.
Short Name: This name is not used anywhere for reference. so your choice. Usually we give it same as Executable short name.
Application: Name of Application.
Executable-> Name: Short Name of the Report Executable we defined in Step 1.
Output-> Format: XML if you want report in XML Format, else select any of your requirement.
Style: Portrait, Landscape, whichever is best suited to your report dimension.

Preferably we go with default values. If your requirement is different, select your relevant option. Save the form and press Parameters button.

Here is some detail before you define parameters.

Sequence

Choose the sequence numbers that specify the order in which your program receives parameter values from the concurrent manager.

Enabled

Disabled parameters do not display at request submission time and are not passed to your execution file.

Argument Detail

You specify information about your parameter almost exactly as you define a flexfield segment.

Value Set

Enter the name of the value set you want your parameter to use for validation. You can only select from independent, table, and non-validated value sets.

The maximum size of your value set is 240 characters.

Attention:  If you are using a value set of dates, this value set should have a format type of either Standard Date or Standard DateTime if you are using the Multilingual Request feature.

Default Type

If you want to set a default value for this parameter, identify the type of value you need.


  • This default value for your parameter automatically appears when you enter your parameter window. 
  • You determine whether the default value is a constant or a context-dependent value by choosing the default type.
  • Your default value should be a valid value for your value set. Otherwise you see an error message when you enter your parameter window on the Run Request window and your default value does not appear.
Valid values for each default type include: 

Constant:    The default value can be any literal value.

Profile:        
  • The default value is the current value in the user profile option defined in the Default Value field. 
  • Use the profile option name, not the end-user name. You do not need to include $PROFILE$.
SQL Statement: 

        The default value is determined by the SQL statement you defined in the Default Value field.

Segment:  The default value is the value entered in a prior segment of the same parameter window.

Enable Security

If the value set for this parameter does not allow security rules, then this field is display only. Otherwise you can elect to apply any security rules defined for this value set to affect your parameter list.

Range

Choose either Low or High if you want to validate your parameter value against the value of another parameter in this structure.

Display

Indicate whether to display this parameter in the Parameters window when a user submits a request to run the program from the Submit Requests window.

Display Size

Enter the field length in characters for this parameter.

Description Size

Enter the display length in characters for the parameter value description.

Prompt

A user sees the prompt instead of the parameter name in the Parameters window of the Submit Requests window.

Concatenated Description Size

Enter the display length in characters for the parameter value description

The user sees the parameter value in the Parameter Description field of the Submit Requests and View Requests forms. 

The Parameter Description field concatenates all the parameter values for the concurrent program. 



Token

For a parameter in an Oracle Reports program, the keyword or parameter appears here. The value is case insensitive. For other types of programs, you can skip this field. 

How to integrate a report (RDF) with Oracle Apps


At this point, no user will be able to execute this concurrent program request.
So what we need to do so is, to attach this report to a request group, which is specified on the responsibility. Eventually, Users to which responsibility is attached, will be able to run the report.
So navigate to
Navigation: System Administrator --> Security --> Responsibility --> Request

How to integrate a report (RDF) with Oracle Apps
After doing this step, relevant users will be able to run the concurrent program request.

Reports Builder and the Report Wizard

When you invoke Reports Builder, the Welcome dialog box gives you the option of using the Wizard to build a new report. The Report Wizard provides an easy step-by-step interface to create a new report.
The Report Wizard opens with a Welcome page. To suppress this page, clear the “Display at startup” check box. You can reinstate this page in the same way as the Welcome dialog box in Reports Builder; select the Wizard tab in the Preferences dialog box and then select Report Wizard Welcome Page.
Each page of the Report Wizard asks you for information to help you create your initial report. Step through the wizard pages, selecting Next and Back, until you are satisfied with the initial information that you have entered. On the last page, select Finish.
Welcome to Reports Builder
Report Wizard

Step 2: Choosing the Layout Type

Here you have to specify the type of layout you want the Wizard to generate. The available options are:
  • Web and Paper Layout 
  • Web Layout only 
  • Paper Layout only

Report Layout Type
 Step 3: Choosing a Report Style
This page of the Report Wizard shows the various styles of reports. Select Tabular and then click Next.
Report Style

Step 4: Selecting the Data Source Type

Next, you have to define the data source type for your report. Through the implementation of the Pluggable Data Source (PDS) feature in Oracle Reports, the data for your report can come from any source you choose. Reports Builder provides interface definitions that act as a translator between Reports Builder and a PDS by redefining Reports Builder’s requests in terms your data source uses.
Oracle Express Server, OLAP, JDBC, Text and XML pluggable data sources are shipped with Oracle Reports. You can also define your own data source.
Data Source Type

Step 5: Building a Query using Query Builder

Building your query with the Query Builder GUI saves you time and increases the ease of use for developers not familiar with building SQL statements or with the application tables.
To build a query using Query Builder:
  1. Select Query Builder from the Query page in the Report Wizard.
  2. Enter your username, password, and alias in the Connect dialog box that appears if you have not already connected to the database. 
  3. Select the data tables to build the query. 
  4. Click Include. The tables appear in the selection area. 
  5. Click Close to close the Select Data Tables window. 
  6. In each table, double-click the column names that you want in the query, or use the check boxes. To select all columns, double-click the Table title bar.
  7. Click OK.
Query Builder copies the query syntax into the Report Wizard. You can modify the query by reentering Query Builder or by modifying the SQL query statement text.
Note: If you prefer to write your own SQL statement, enter the syntax directly in the SQL query statement area of the Query page. Alternatively, you can import the contents of a file by clicking Import SQL Query.
Query Builder

Step 6: Selecting Displayed Fields

In the Field page, select each field from the Available Fields list and click >. The selected fields move to the Displayed Fields list. To display all fields, click >>.
You can alter the sequence of displayed fields by dragging one field above or below another in the list. The sequence of fields in this list determines how the fields appear in the report output. In a tabular report, the fields appear in sequence from left to right across the page.
Fields that remain in the Available Fields list are available for you to reference in your report definition as hidden fields or in PL/SQL trigger code.
In the report output, the user sees only those fields that you transfer to the Displayed Fields list.
Displayed Fields

Step 7: Totals and Labels

In the next two pages of the Report Wizard, you can create totals based on any of the displayed fields and modify the labels and width of the displayed fields.
Totals: Standard SQL aggregate functions are provided for creating totals in your report.
Total Fields
Labels: The field label is displayed on one or more lines in the report output. In a tabular report, the labels appear above the field values.
  • If the initial label is wider than the field, Reports Builder allows enough space for the label, or displays it on multiple lines.
  • If you increase the number of characters in the label text in the reentrant Wizard, the label can appear truncated in the report output.
Labels

Step 8: Selecting a Report Template

Report Templates enforce corporate standards as well as create professional-looking paper reports easily.
Select a template from the list of predefined template names. In a template, the fonts, styles, and colors are already selected for designated objects. A variety of templates are available with the standard Reports installation.
To select a predefined template:
  1. Select the Predefined Template option button, if it is not already selected.
  2. Select a template from the Template list.
  3. Click Finish.
Report Template

Step 9: Viewing the Paper Report Output

When you finish creating your report in the Report Wizard, the output appears in the Paper Design view of the Report Editor.
Magnifying the Output
The Paper Design view contains a Magnify tool in the vertical toolbar. This provides a view of the area of layout you want to see. You can also use the View menu to magnify or reduce the size of the output. Select View > Zoom to see your options.
Viewing Different Pages
The Paper Design toolbar contains four buttons, and the specific page option, with which you can scroll through the pages of your report.
Report Output

Step 10: Saving the Report Definition

Remember to save the report frequently by selecting Save in the toolbar, or by using the File > Save menu option. The recommended format for storing paper reports is with an .rdf extension.
If you want to make a copy of the report definition in a different filename, use the menu option File > Save As. There is no toolbar button for the Save As option.