Thursday, October 13, 2011

Set Default Printer and Report Copies for an user in Oracle Applications

Description
This Post describes the necessary setups required to setup a Default printer and default number of report copies for a user in Oracle Applications.
When ever a user in Oracle Applications try to print a report it automatically prints to the default printer specified and prints the no. of copies as mentioned in the
Required Setups

Following are the steps required to complete the set ups

Go to System Administrator Responsibility:


Go to System Profiles:

Now the system profile form is opened


Give the values in the fields User and Profile (User name is nothing
But, to which user you want to add default printer and profile value as
%Printer %)

After providing the above values click on Find Button




If you click on Find button it takes you to the following form,
Give the printer name for which user wants it as a default to his login in the
Field specified below under User Column.

Profile Option Name: Printer
User: <Username>
Printer Name: <printername>

Click on save.




In order to set no. of copies of the out put file to the printer at user level
select the profile value "Concurrent Report Copies" as shown in the below image

By default the report copies option is 1 at site level for any user. This profile
value can be changed from default value (which is 1), when the user wants to

print the no. of copies of out put file to greater than 1.


After applying the profile, save it.

After this setup the user can only print to the specific printer setup & also the number of prints when he runs the concurrent program.

Layout Model: Multi Layout Reports

Description
There is always a necessity to provide users to run report in 
multiple languages. Say English, German, French.  

We have to develop such report with multiple layouts.


Example
Create 5 layouts each in a separate main frame.
Create these 5 main frames one below the other. No layout should cross x-axis and Y-axis. 
After that create one user parameter and write a format trigger on all the main frames. 
--In format trigger of first Main frame mention
-- for first layout to display
if :p_parameter = 1 then
 return true;
end if; 
--In format trigger of second Main frame mention
-- for Second layout to display
if :p_parameter = 2 then
 return true;
end if; 
Similarly write format triggers for all the remaining 3 main frames.
When you run the report, Based on the value you provide for p_parameter the format trigger 
will display only one frame
If You enter p_parameter value as 1 then first layout will
be displayed as output.
If You enter p_parameter value as 2 then second layout will
be displayed as output.
 
Create anchors between the frames, so that there won’t be any space left when other 
frames are not displayed.
 
Read more on anchors:
http://oracleapps4u.blogspot.com/2011/03/example-of-anchor.html
 
 
These multi layout report concept is mainly useful when developing reports 
to run in multiple languages

Example of Anchor


Anchors are used to determine the vertical and horizontal positioning of a child object relative to its parent.  The end of the anchor with a symbol on it is attached to the parent object.

Since the size of some layout objects may change when the report runs (and data is actually fetched), you need anchors to define where you want objects to appear relative to one another.  An anchor defines the relative position of an object to the object to which it is anchored.  Positioning is based on the size of the objects after the data has been fetched rather than on their size in the editor.   

It should also be noted that the position of the object in the Layout editor effects the final position in the report output.  Any physical offset in the layout is incorporated into the percentage position specified in the Anchor property sheet. 

To,
&<cfirstname>


Congratulations, On becoming the member of the British library.
state of art technology enables members to issue books from any
of the branches across the globe.


You can issue books belonging to any of the following categories:
Classics
Fiction
Romance
Humor
Psychology


You will reveive your identity card within 10 days of issue of
membership

Thanking you

Your's sincerly
MrKK
----------------------------------------------------------------------------------------------------------





To,
&<cfirstname>


Congratulations, On becoming the member of the British library.
state of art technology enables members to issue books from any
of the branches across the globe.








You will reveive your identity card within 10 days of issue of
membership

Thanking you

Your's sincerly
MrKK
--------------------------------------------------------------------------------------------------------




            In the layout shown above, there are 3 paragraphs in the letter addressed to the members of the library. the three paragraphs are separate boilerplate
objects, which are of fixed size. their positions are directly related to the enclosing repeating frames.

in the letter, the display of the 2nd paragraph is based on the age of the members. That is, by applying conditional formatting
the boilerplate is hidden if members' age happens to be below 12 yrs.


due to the condition specified, the second paragraph is notprinted when members age is below 12

how ever the position of the third paragraph remains the same


This extra space can be supressed by creating an anchor from the top edge of the third paragraph to the top edge of the
second paragraph.

to do so select the anchortool and click and drag the anchor from the third paragraph to the second and double click the
second paragraph to created the anchor.

This supress the spaces between 1 and the 3rd paragraphs but the gap continues. to over come this, change the collapse verticlally
property of the anchor to 'Yes'

Oracle Alerts

1.        What are the different business uses of Alerts?
        Ans:
a)      Keep you informed of critical activity in your database
b)      Deliver key information from your applications, in the format you choose to provide you with regular reports on your database information
c)       Automate system maintenance and routine online tasks Information about exception conditions.

2.       What are the different types of alerts, Define it?
      Ans:
You can define one of two types of alerts: an event alert or a periodic alert.
Event alert: An event alert immediately notifies you of activity in your database as it occurs.      
Periodic alert: A periodic alert, on the other hand, checks the database for information according to a schedule you define.

3.       What database events can cause what actions?
Ans: An insert and/or an update to a specific database table
4.       What actions can you perform in an alert?
Ans: An action can entail sending someone an electronic mail message, running a concurrent program, running an operating script, or running a SQL statement script. You include all the actions you want Oracle Alert to perform, in an action set.
5.       What do you specify when creating a Periodic Alert?
Ans:
a.       A SQL Select statement that retrieves specific database information
b.      The frequency that you want the periodic alert to run the SQL statement
c.       Actions that you want Oracle Alert to perform once it runs the SQL statement.
6.       Can you define Alert on Oracle Applications Tables?
Ans: Yes
7.       How alert is different from database triggers?
Ans:
a)      Code can be modified and viewed in a screen
b)      Periodic alert is not possible through Database trigger
c)       Oracle Alert will also transfer your entire alert definition across databases. You can instantly leverage the work done in one area to all your systems.
d)      Customizable Alert Frequency with Oracle Alert, you can choose the frequency of each periodic alert. You may want to check some alerts every day, some only once a month, still others only when you explicitly request them.
8.       Can you define detailed or summary actions in alert?
Ans: Yes, Detail or Summary Actions you can choose to have Oracle Alert perform actions based on a single exception or a combination of exceptions found in your database.
9.       Can you perform actions when NO exceptions are found?
Ans: No Exception Actions : Oracle Alert can perform actions if it finds no exceptions in your database, same as alert actions.
10.   Can you specify History Maintenance?
Ans: Alert History Oracle Alert can keep a record of the actions it takes and the exceptions it finds in your database, for as many days as you specify.

11.   What is Escalation capabilities in Oracle Alert ?
Ans:  Action Escalation You can define a sequence of actions and have Oracle Alert perform the next action in that sequence each time it finds the same exception or exceptions in your database.

12.   Can alert check for user response?
Ans:  Yes, it has response processing feature. Response Processing Oracle Alert can take certain predefined actions based on a user’s response to an alert message. The response can cause Oracle Alert to send another alert message, run a SQL script or an operating system script, or submit a concurrent request, or any combination of the above.

13.   Can it send mail message?
Ans:  Yes it can send. Oracle Alert allows you to send electronic mail messages directly to your mail system.

14.   Can you distribute a report, log etc with Alert?
Ans:  Yes, With Oracle Alert, you can include a file created by another application as part of an alert message. You can also define an alert that distributes an electronic copy of a report, log file, or any other ASCII file.

15.   How can you use PL/SQL functions in Oracle Alert?
Ans:  Defining the PL/SQL as file format, and we does not contain an Into clauses.

16.   What are the four steps to create Periodic Alert?
       Ans:
a)      Define your periodic alert and specify its frequency
b)      Specify the details for your alert
c)       Define actions for your alert
d)      Create action sets containing the actions you want your alert to perform

17.   How do you refer the variables whose value is selected in SQL statement of Alert?
Ans:  You Use Into statement with &variable name

18.   Any limitation on SQL statement?
Ans:  Yes, it accepts only 64K

19.   Can you use SQL statement from a file, is it necessary to have into clause in it?
Ans:  Yes, you can use a file. If the Select statement in the file does not contain an into clause, Oracle Alert automatically inserts an into clause into the alert Select statement as &OUTPUT1, &OUTPUT2, and &OUTPUT3.

20.   Is it necessary that the application that owns an alert and on which executes have to be same?
Ans:  NO, but both applications must reside in the same Oracle database and the application that owns the alert has to have Select privileges on the tables listed in the alert Select statement.
21.   Can you use view as an event alert table?
Ans:  You cannot use a view as the event table for your alert.

22.   What are the four types of actions in alert can be specified?
Ans:  There are four types of actions you can create
a)      Message actions
b)      Concurrent program actions
c)       Operating script actions
d)      SQL statement script actions

23.   Are there any limitations in Response processing when getting inputs back from user?
Ans:  Yes, User must respond answer in a specific format and content.

24.   How does Alert work?
Ans:  Oracle Alert checks your database for the exceptions you want to know about using several concurrent programs
a)      Periodic Alert Scheduler
b)      Check Periodic Alert
c)       Check Event Alert
d)      Response Processor
The Periodic Alert Scheduler (ALEPPE) is a concurrent program that automatically checks your scheduled periodic alerts.

25.   How Check Event Alert Works?
Ans:  Once you define an event alert to monitor a table for any insert or update to the table will trigger the event alert. When an insert or update to an event table occurs, Oracle Alert submits To the concurrent manager, a request to run a concurrent program called Check Event Alert (ALECTC). The concurrent manager runs this request according to its priority in the concurrent queue. When the request is run, Check Event Alert executes the alert Select statement. The Response Processor (ALPPIM) is the Oracle Alert concurrent program that processes responses to an alert message.

26.   What is the purpose of: DATE_LAST_CHECKED ?
Ans:  An Oracle Alert implicit input that contains the date and time that an alert was last checked Oracle Alert automatically provides the value for: DATE_LAST_CHECKED. You must use DATE_LAST_CHECKED to create self–referencing alerts.

27.   What is meant by Action History?
Ans:  A record of the actual actions performed for each action set check that includes the value substituted for each output.

28.   Can you perform actions if a recipient doesn’t respond?
Ans:  Yes, Using No Response field to specify the actions you want Oracle Alert to perform if the recipient does not respond within the number of Response Days specified in the Action Details window of the Alerts form known as the response processor.

29.   Can one create event alerts on custom tables, triggered by custom applications?
Ans:  Yes, Oracle Alerts can be integrated with your custom application and detailed information is available in the below link

30.    How often should the Alert tables be purged?
Ans:  There is no recommended purge frequency.  It all depends on how many alerts have been enabled and their frequency.