Sie sind auf Seite 1von 14

Smart Report framework

Smart report framework which helps in creating simple reports which can be generated instantaneously, scheduled and executed on condition. The report can be sent as a formatted html in an electronic email. Features currently working: 1. 2. 3. 4. 5. 6. 7. 8. 9. A Single report created in framework can be used to generate reports instantaneously as well as scheduled to be sent as email attachments. Security to limit reports available to a person can be controlled. (Profile: Unity : Smart Report
Group)

Reports can be conditionally generated Framework also can be used to created search only forms. This is useful for management to instantaneously generate report from the instance. Report output can be downloaded to excel Report parameters can be defined and the parameters can also have list of Values. This would help AD team to build simple reports declaratively for business users. Reports can be scheduled to run at specific times on specific days of the week. Report Output will be sent as email attachment. Up to 6 different email addresses can receive the output of the scheduled email report.

10. Queries written here can have access to all objects (GV$ views etc).

Groups
A group is a Collection of reports. A group defines a set of reports which can be run by a user. A group is defined for a user in profile Unity : Smart Report Group. Use the Report Groups screen to define
groups.

Setup Reports
A report is a Query which can be queried adhoc on screen , exported to excel and also sent as email attachment. It can have parameters and LOVs to pick parameters. Framework has a limitation of 20 Select Columns and 10 Parameters. Parameters can be VARCHAR2, Number, Date or have a LOV. Use the reports Setup screen to define Reports

The Screen above is the first screen in report Setup. You will reach this screen when you click the Report Setup link from menu. Query for reports you want to edit. If you want to create you can do so by clicking on Add Another Row Button. Click on Update Report to enter /update the report definition. Please save the details before you click on Update Report

The above form provides the ability to create or Update report definition. A report has 3 sections 1. Report Select columns columns which need to be printed on the report 2. From and Where clause

3. Parameters The parameters which need to be bound to the query before execution Lets take an example : I want to have a report which prints me out all the values which are defined in system (at site, application, resp, and user level) for a given Profile Name

SELECT SUBSTR(e.profile_option_name,1,30) PROFILE, DECODE(a.level_id,10001,'Site',10002,'Application',10003,'Responsibility',10004,'User') profile_Level, DECODE(a.level_id,10003,(select responsibility_name from apps.fnd_responsibility_vl where responsibility_id = a.level_value ) , 10001,(a.level_value ), 10002,(select APPLICATION_NAME from apps.fnd_application_vl where application_id = a.level_value ), 10004,(select user_NAME from apps.fnd_user where user_id = a.level_value ) , a.level_value ) profile_level_value , profile_option_value FROM apps.fnd_profile_option_values a , apps.fnd_profile_options_vl e WHERE a.profile_option_id = e.profile_option_id AND e.profile_option_name LIKE '&PROFILE_OPTION_NAME'

There are 2 ways to create this report in this System. You can choose a style which suits you.

STYLE 1: Write your query in toad and create a wrapper to in reports . You can see example of this approach in screen shots above. Select Columns Column Sequence 1 2 3 4 Column Name Profile profile_level profile_level_value Profile_option_value Column Title Profile Name Profile Level Profile Level Value Profile Option Value

FROM and WHERE clause ( SELECT SUBSTR(e.profile_option_name,1,30) PROFILE, DECODE(a.level_id,10001,'Site',10002,'Application',10003,'Responsibility',10004,'User') profile_Level, DECODE(a.level_id,10003,(select responsibility_name from apps.fnd_responsibility_vl where responsibility_id = a.level_value ) , 10001,(a.level_value ), 10002,(select APPLICATION_NAME from apps.fnd_application_vl where application_id = a.level_value ), 10004,(select user_NAME from apps.fnd_user where user_id = a.level_value ) , a.level_value ) profile_level_value , profile_option_value FROM apps.fnd_profile_option_values a , apps.fnd_profile_options_vl e WHERE a.profile_option_id = e.profile_option_id AND e.profile_option_name LIKE :1) Please use numbered bind parameters. Named bind parameters are not supported Sequen ce 1 Parameter Name PROFILE_OPTION_ NAME Title Paramet er Type Require d Y LOV Require d Y Parameter LOV Query select PROFILE_OPTION_NAM E value, USER_PROFILE_OPTION _NAME Description from fnd_profile_options_vl

Profile Varchar Name 2

Parameter LOV Query can only have two columns and have to aliases Value and Description. Value will be bound to the report Query.

The above approach is easier as you can do a copy paste from Toad and encapsulate in braces ( and )

STYLE 2 : Break your query into parts and define in reports system. You can see the example of that in screen shot below.

Select Columns Column Sequence 1 2 Column Name RESPONSIBILITY_NAME RESPONSIBILITY_KEY Column Title Responsibi lity Name Responsibi lity Key

FROM and WHERE clause fnd_responsibility_vl WHERE menu_id IN (SELECT menu_id FROM ( SELECT * FROM fnd_menu_entries_vl START WITH function_id IN (SELECT function_Id FROM fnd_form_functions WHERE function_name LIKE :1) CONNECT BY PRIOR menu_id = sub_menu_id) ) Please use numbered bind parameters. Named bind parameters are not supported Sequence 1 Parameter Name Function Title Function Parameter Type Varchar2 Required Y LOV Required Y Parameter LOV Query select FUNCTION_NAME Value , USER_FUNCTION_ NAME description from fnd_form_function s_vl

Parameter LOV Query can only have two columns and have to aliases Value and Description. Value will be bound to the report Query.

Assignments
Reports can be assigned to Groups. Access to a group is set in Profile "Unity : Smart Report Group". Users will be able execute all the reports assigned to the group which is set in profile "Unity : Smart Report Group". If the profile "Unity : Smart Report Group" value is set to ALL , then user will be able to execute all reports defined in system
You can access this form by clicking Assignments in Smart Reports menu.

Run Reports
Reports defined and assigned (use assignments screen) can be run by clicking on Reports in Smart Reports menu. User will be able to see reports only those which are assigned to his group.

Click on Run Report to run the report.

In the Reports screen , enter the parameters and click on Generate Report to execute the report.

Click on Export to Excel to Download the Report into an excel File. Note: If a report doesnt have any parameters, the report will be automatically executed when you click on Run Report

Scheduling
Any report without parameters can be scheduled to run at defined time intervals and send HTML formatted reports if the query returns any results You can access this form from by clicking Scheduling in Smart Reports Menu. Schedule Can be 15Minutes, 30 Minutes, Hourly, Daily Report Code Code of the report Enabled Flag Enabled or Disabled. Start Hour (0-24)-Start Min (0-60) Specify when the report should Start in GMT End Hour (0-24)-End Min (0-60) Specify when the report should end in GMT Recipient Role (1-3) These are employee Global UIDs. Email Address (1-3) Group email addresses like adtechteam@arrow.com etc Conditional Report? Execute this report only when a condition is met (defined in Query for Condition) Query for Condition Query can return TRUE orFALSE only . Report will be sent only if returned value is TRUE

Concurrent Program

Run the program Unity: Smart Report to send all reports defined in the Report scheduling.

Das könnte Ihnen auch gefallen