tips tricks reports

Download Tips Tricks Reports

Post on 12-Jul-2015

93 views

Category:

Documents

3 download

Embed Size (px)

TRANSCRIPT

Tips and Tricks for Modifying Reports for Oracle FinancialsBy Jeannie Dobney ASSIST Pty Ltd This paper attempts to list some of the things that I wish I had known when I started using Reports 2.5 in the Oracle Financials environment It was in response to perceived lack of information in this area amongst the user community. The author has attempted to collate wisdom gleaned from many sources. For much of the information in this paper I have to thank colleagues as well as friends I have yet to meet but feel I know through the OAUG email forum. This paper focuses on the use of Oracle Reports 2.5 and all references to Reports imply Oracle Reports 2.5. Much of what is said here is equally applicable to Reports 2.0 The substantial differences between Reports 2.0 and 2.5 are: Reports 2.5 uses a hierarchical navigator which makes identifying objects and viewing their properties easier than it was in Reports 2.0 Reports 2.5 includes a Confine Mode toggle which makes working with report layers much easier in version 2.5. These layers are not very well documented and are a major trap for new users of version 2.0 (where Confine Mode doesnt exist).

This paper also assumes users are running version 10.7 SC, however much of what is included is applicable for NCA and Release 11.0 (not 11i).

Tip One: Dont Use Reports Unless You Have To!The complications of using Reports in the Financials environment mean that the cost of writing the same report as a SQL*Plus script is many times less expensive. If you are modifying an existing report or wish to include bitmapped logos etc, you will have no choice, however, if you are starting from scratch, consider using a SQL*Plus script. The output will look just as nice when it appears in a spreadsheet! SQL*Plus reporting is almost a lost art. For information and examples refer to a copy of Kochs Oracle8 The Complete Reference. The other reason you may not wish to use Reports is when your site does not have a PC copy of Reports 2.5 developer licence. If this is the case, you can strip the SQL out of your report using the conversion utility r25convm to create an ASCII format .rex file (syntax later in the paper). You can then use the SQL as a basis for your SQLPlus script. You should note, however, that some Reports data models appear to be unnecessarily complex because they have been written to be as generic as possible.

Tip Two: Dont Forget to Register your ReportYou will typically be developing your report on a PC so when it is ready to test in the Financials environment, you must: 1. FTP a copy of your .rdf file to the server box ensuring that you FTP in binary mode. No amount of grief is caused by inadvertently FTPing in ASCII mode, the most common symptom is that your report will fail with a Signal 10 error. 2. Place the copy of your .rdf file it in the correct directory. Each product (eg GL, AP etc) will have a directory structure and you will need to place your report in the srw sub-directory of the appropriate product. Note that it is common practice to have separate directory structures for modified reports and forms, this protects them from being deleted during an upgrade. Typically these directory structures will have names like GL_MOD_TOP and are relatively easy to identify. You should always place your custom reports in mod directories.

ASSIST Pty Ltd 1999 Page 1

$APPL_TOP Oracle Applications top directory

$FND_TOP

$GL_TOP

$[custom]_TOP

$INV_TOP

bin

sql

log

srw

mesg

lib

rpt

forms

out

plsql

[lang]

3. 4.

Ensure your report has the appropriate file permissions which allow the Oracle concurrent manager to execute it (using chmod etc). Register Your Report within Oracle Applications. This is frequently overlooked and is an essential step. Registration tells Oracle Financials that your report exists and where it can be found. There are several steps and these are outlined in the following section. 4.1 Identify the report to the AOL layer. Using the Application Developer Responsibility, Menu Path: Concurrent ~ Executable

The Execution File Name is the operating system file name (without the extension) and you must type this accurately including the correct case! The Application field tells the AOL layer where to look for this file. Applications are also registered which links the descriptive name seen here to an OS environment variable which in turn identifies the specific OS path to use to find your report. It is therefore important that when you place your report in a mod directory, you also select the appropriate application name here. Otherwise Oracle will not be able to find your report. ASSIST Pty Ltd 1999 Page 2

4.2 Define Concurrent Manager Submission Information Using the Application Developer Responsibility, Menu Path: Concurrent ~ Program

This step sets up the report so it can be submitted by the concurrent manager, identifying parameters which must be passed etc. The Executable Name field is the link to the previous step. The Program name field and Description will appear in the List of Values users see, so they should be functionally descriptive. Use the Parameters button to open the window shown below and define the parameters that the report should prompt the user for.

Notice that the Token field links the parameters you list here to the parameters which your report is expecting. It is not case sensitive.

ASSIST Pty Ltd 1999 Page 3

If your report should not be run at the same time as any other report or process (perhaps even itself) the use the Incompatibilities button to open the window shown below and identify them.

Further information about specific fields shown here and the registration process can be found in Oracle Applications System Administration Reference Manual.

5. Add your Report to the Appropriate Request Groups.This is usually performed by the (functional) system administrator however you may need to do it in the test environment at least. Reports are made available to users by adding them to the Request Group assigned to a Responsibility which in turn is assigned to users. If you are relatively new to Oracle Financials, it may be helpful to think of a Responsibility as the equivalent of a database role and Request Groups as grants on reports to that role. In this step you are adding your report to such a Request Group. This effectively makes your report appear in the List of Values which the user sees in the Standard Report Submission screen. Using the System Administrator Responsibility, Menu Path: Security ~ Responsibility ~ Request

ASSIST Pty Ltd 1999 Page 4

In the top half of the screen above, query back the Request Group to which you wish to add your report and then in the lower half of the screen create a new record, select your report name and save.

Tip Three: Beware of Traps When Modifying Existing Reports!If you are modifying an existing report, you begin by FTPing it up to your PC and opening it in the Reports Designer there. Very often the report will give you error messages about missing packages. The messages should give you the name of the packages and you will be able to find them in the plsql subdirectory of the application to which the report belongs on the server side. (Note that you may also have the .pll file on the client side depending on how the client install was done and you may be able to simply reattach it there.) If you cant find the .pll file it is also possible that when the Applications install was done, the module was installed as shared. Unfortunately there is no quick fix for this one and your DBA will have to be reinstall. You sometimes also discover this problem without trying to copy anything onto the client, simply because of persistent messages about uncompiled program units. Your first response to messages about uncompiled program units should obviously be to recompile, however, if after having done that, you still get these messages, check the Applications install information). If you are really unlucky you will be working at a site which still uses Windows 3.1 and you will find the package is in fact too large for the client side Operating System This is a Catch 22 situation and the only solution we have found is to find another environment to work in. For example in our case, to take the report back to our office, modify it there and then take it back to the client site this is very laborious as you can often only test on site

Tip Four: Dont Use Reports Features which the Financials Environment wont Support!Basically try and keep your report as simple as possible. Its nice to be able to use bitmapped logos but remember that with every piece of complexity you add, you are increasing your debugging effort For example, it is now possible to add a list of values to a Reports 2.5 report parameter and whilst this seems like a good idea, it simply replicates the functionality available within Oracle Applications. Notice that in the parameter registration screen shown earlier in this paper the parameter displayed is using a SQL statement. This SQL populates the List of Values which the user sees within Standard Report Submission. For more information on Standard Report Submission parameter options, see the Flexfields manual (yes really: because Financials views the parameters as descriptive flexfield segments!)

Tip Five: Beware of Traps with Character / Bitmapped Reports.Reports 2.5 is basically oriented towards bitmapped output although it can produce both types of output. Many Financials reports are still character mode and character mode reports run faster so there are a series of things which you need to be aware when designing character mode reports. In the reports Global Properties (Tools ~ Properties) review the settings under the Character Mode tab and ensure that the Use Character Units in Designer checkbox is checked. In the properties of the Mode system parameter set the Initial Value field to Character. In the Layout Editors View menu: switch Grid Snap on, and in Options ~ Ruler Settings set the number of Snap Points per Grid Spacing to one. Dont use objects that are not consistent with character mode output eg images, colours, drawings, italics, ellipses, diagonal lines, drill down buttons, multimedia etc.

When you attempt to run your report in Financials you may still get strange messages about Object F_Problem_object has zero length or width OR M-Headers is not fully enclosed by object BODY. Basically this is because Reports has done some rounding so that all objects fit on the grid and it has rounded half cell objects down to zero or rounded them up and off the page.

ASSIST Pty Ltd 1999 Page 5

You can get around this by rearranging things in the Layout Editor of the Reports Designer and recompiling, but the quick fix is to register the concurrent program to run in bitmapped mode by entering VERSION=2.0b in the Executions Options field of the Concurrent Programs screen shown earlier in this paper. Note that this option must be written exactly as shown. Version=2.0b will not do! Setting this options means that a different executable ar25runb runs the report. Note that if you try to run an unmodified character mode report using VERSION=2.0b you are likely to get a Report contains uncompiled PL/SQL error. This can be solved easily by opening the report in the Reports Designer and recompiling it. The first time you open a character mode report in Reports Designer, a message box may pop up to warn you that it is being opened as a bitmapped report and that the page size and other things may have changed perhaps as a consequence of font-mapping. Ignore this. Having set up your modified report to run with VERSION=2.0b, typically you will now encounter a Formatter Error. The source of this error lies with the file UIPRINT.TXT which needs to be set up to use the appropriate .ppd file. This is best referred to the person in your organisation who understands most about printer configuration within Oracle Financials. (Some more details about this are included at the end of this section.) At this stage you should be able to get the concurrent request to complete normally but if you try to print it, all you get is gobbledegook which is Postscript output as text, pages and pages of it! Sometimes you will get just two or three lines with increasing indents, followed by many blank pages. This has to do with the initialisation string in the printer definition. In order to get the bitmapped report to print properly a bitmapped printer must be set up in AOL. Until then, you can still print the report properly using the lp command from the Unix command line. You can also use Ghostview (available free from http://www.cs.wisc.edu/~ghost/) to view postscript files on the screen. I have not tried this but if you set up your (GUI only) AOL to use Ghostview to open postscript reports, it ought to be possible to view the output in the Help-View my requests-Report screen. Using Word or Excel all you see is the text of the postscript commands. Note re Formatter Error: Once you select VERSION=2.0b you are instructing Oracle to use a bitmapped (postscript) printer. Im not sure if anyone really fully understands what happens next, but I include here what I have gleaned in the hope that it may be of some use to some of you! .prt files are only used with character mode reporting. they play no part at all in bitmapped reporting. .ppd files are supplied by the printer vendor (usually), and are used to describe the capabilities of a particular postscript printer to postscript applications The concurrent manager allows reports to be reprinted, but a report produced through ar20runb can only be reprinted to the printer type it was produced for. In the Unix world the file $ORACLE_HOME/guicommon/tk2/admin/uiprint.txt documents how printers are mapped to PPD files. The name of the printer has a PPD file associated with it in uiprint.txt. Formatter Error is caused by an incorrect setup of the D2K runtime on your DB / APPS server. You must add a line referencing your default printer as found in the associated environment variables. All necessary instructions are found in the header of uiprint.txt. TK2_PRINTER, ORACLE_PRINTER, and PRINTER are environment variables that are looked at (in order, I believe) to determine which printer should be used by default. The specified printer does not have to be in uiprint.txt. The DESNAME parameter determines which .ppd file used: 1) If DESNAME is set use that to look up the appropriate ppd file from uiprint.txt The PPD files are in $ORACLE_HOME/guicommon/tk2/admin/PPD 2) If DESNAME isn't set, but an environment variable $PRINTER is set, then the value in here is used to look up in the .ppd file. 3) If neither of these are used then the first entry in the uiprint.txt file is used. There seem to be some problems specific to Postscript capable HP printers. Oracle Print Drivers always default to PCL setup strings for HP printers. HP printers see the PCL string, and assume the entire job is ASSIST Pty Ltd 1999 Page 6

PCL. However, bitmapped reports are PostScript. Therefore, the HP printer dumps the PostScript commands as text. To solve this create a custom print driver which has no setup strings. Then the printer will see PostScript first, and will select that language and print it properly.

Tip Six: When All Else Fails Resort to Emp & Dept!It might seem too obvious to state, but Financials reports can often be very complex. This complexity is often the reason that debugging them or solving problems with them is so hard. As with most things, however, there is usually some kind of solution / work-around if you are willing to invest enough energy in it! To simplify the problem solving process, try replicating the problem using a simpler scenario. Often the Emp and Dept tables will help you to figure out the principle you need to use.

Tip Seven: Understand User Exits used by Oracle ReportsOracle Reports provides a suite of PL/SQL procedures in the SRW package. The User_Exit procedure in this package allows you to call user exits (Pro C routines) and Oracle Financials reports use quite a lot of these calls. You will see something like SRW.USER_EXIT('FND SRWEXIT'); It is worth spending a little time familiarising yourself with these User Exits as you will have to deal with them when you modify standard reports as well as when you create new reports. More information about the SRW package can be found in the Reports 2.0 documentation but the user exits outlined here are documented in the Oracle Application Object Library Reference Manual which is part of Oracle Financials documentation. The user exits available in Oracle Reports are: FND SRWINIT Sets your profile option values and allows Oracle Application Object Library user exits to detect that they have been called by a Oracle Reports program. You always call FND SRWINIT from the Before Report Trigger as follows: SRW.USER_EXIT('FND SRWINIT'); This one is important, for example, in a Multi-Org environment to ensure your report displays data from the users Organisation. FND SRWEXIT Ensures that all the memory allocated for Application Object Library user exits has been freed up properly. You always call FND SRWEXIT from the After Report Trigger as follows: SRW.USER_EXIT('FND SRWEXIT'); FND GETPROFILE & FND PUTPROFILE These user exits let you retrieve and change the value of a profile option. FND CALCULATE Use this routine to calculate the result of an unlimited number of operands and operators. FND FLEXIDVAL & FND FLEXSQL These user exits allow you to use flexfields in your reports. They are documented in the Oracle Applications Flexfields Manual.

ASSIST Pty Ltd 1999 Page 7

FND FORMAT_CURRENCY This user exit formats the currency amount dynamically depending upon the precision of the actual currency value, the standard precision, whether the value is in a mixed currency region, the user's positive and negative format profile options, and the location (country) of the site. The location of the site determines the thousands separator and radix to use when displaying currency values. An additional profile determines whether the thousands separator is displayed. It is especially useful because it allows Oracle to display a list of amounts paid in various currencies using their correct formatting. It also picks up the users formatting preferences from their profile value settings. It can however be an annoyance if you have been asked to add a sub-total as you cannot add a column of characters! Oracle recommend defining two columns, one which you apply this user exit to for display and a second column containing the raw data which you do not display but which you use for calculations. Syntax FND FORMAT_CURRENCY CODE=":column containing currency code" DISPLAY_WIDTH="field width for display" AMOUNT=":source column name" DISPLAY=":display column name" [MINIMUM_PRECISION=":P_MIN_PRECISION"] [PRECISION="{STANDARD|EXTENDED}"] [DISPLAY_SCALING_FACTOR="":P_SCALING_FACTOR"] Arguments (for Format_Currency): CODE Specify the column which contains the currency code for the amount. The type of this column is CHARACTER. You will probably need to precede the call to this user exits with a call like SRW.REFERENCE(:C_COLUMN); Which allows you to accurately pass a column value here as a parameter. Specify the width of the field in which you display the formatted amount. Specify the name of the column which contains the amount retrieved from the database. This amount is of type NUMBER. Specify the name of the column into which you want to display the formatted values. The type of this column is CHARACTER. Specify the precision to which to align all currencies used in this report region. You specify the MINIMUM_PRECISION token in mixed currency report regions to ensure all currency values align at the radix character for easy readability. Your user can adjust the report by setting an input parameter when submitting the report to specifically tailor the report output to a desired minimum precision or accept the default which is determined from the profile option Your report submission must pass the value as a report argument. You use P_MIN_PRECISION as the name of this lexical. If specified as STANDARD, then standard precision is used. If the value is EXTENDED then the extended precision of the currency is used to format the number. Optionally, specify the scaling factor to be applied to the amount in that column. If this token is not specified or is negative no scaling is performed. You use P_SCALING_FACTOR as the name of this lexical parameter.

DISPLAY_ WIDTH AMOUNT

DISPLAY

MINIMUM_ PRECISION

CURRENCY: MIXED_ PRECISION PRECISION

DISPLAY_ SCALING_ FACTOR

ASSIST Pty Ltd 1999 Page 8

Note: Colon ":" is placed in front of column names and lexical parameters for token values. This indicates that the value of that token is retrieved from the column or lexical parameter. If it is omitted the value within double quotes itself is used. For example, CODE=":C_CODE" indicates that currency code should be retrieved from column CODE while CODE="C_CODE" indicated that currency code is C_CODE. Here is an example: You are creating a column (C_NET_INCOME) which contains the user exit (FND FORMAT_CURRENCY) call. This is a formula column which formats the number and displays it. The user exit call is: SRW.REFERENCE(:C_CURRENCY); SRW.REFERENCE(:C_INCOME); SRW.USER_EXIT('FND FORMAT_CURRENCY CODE=":C_CURRENCY" DISPLAY_WIDTH="15" AMOUNT=":C_INCOME" DISPLAY=":C_NET_INCOME" MINIMUM_PRECISION=":P_MIN_PRECISION"'); RETURN(:C_NET_INCOME);

Note that one impact of the embedded user exits is that you will be unable to run your report from the client side Reports Designer because of them. You can get around this by commenting them out but you must remember to remove the comments before FTPing back to the server!

Tip Eight: Ensure you have Required ParametersYou need not worry about this when modifying existing reports, but for new reports ensure you have the following parameters (defined using the Oracle Reports Parameter Screen) which will be used in the user exit calls and SQL statements. Name: Data Data Type: Width: Initial Value: P_CONC_REQUEST_ID NUMBER 15 0

You always create this lexical parameter. "FND SRWINIT" uses this parameter to retrieve information about this concurrent request. You should have the following parameter: Name: Data Type: Width: Initial Value: P_MIN_PRECISION NUMBER 2

You reference this lexical parameter in your FND FORMAT_CURRENCY user exit call.

Tip Nine: Reports Versions 2.0 or 2.5?Oracle Financials 10.7 onwards use Reports2.5. If you are on 10.6 or earlier then you need to create Reports2.0 type reports. If you wish to use the Reports2.5 designer, then you need to follow this process: 1. 2. 3. Open the report in Reports2.5 and make the required changes. Save and use Administration ~ Convert to convert it to a .rex file Finally, use the Reports2.0 conversion utility (r20conv) to convert the .rex file back to an .rdf. This conversion will drop any new (Reports2.5) features and consequently, allow it to be run will Oracle Applications.

ASSIST Pty Ltd 1999 Page 9

Please note the writer has not used this and cannot vouch for its effectiveness!

Tip Ten: Upgrade IssuesYou may need to convert Oracle Reports (rdf) files from version 2.0 to 2.5 during an upgrade to 10.7 For the Oracle standard (non-customised) reports (which are probably converted all ready with your upgrade): as applmgr SHUTDOWN CONCURRENT MANAGER set $ORACLE_HOME, $ORACLE_SID, $APPL_TOP cd $APPL_TOP check the ORA_NKS33 variable is set correctly adadmin Select 2 - 'Maintain Applications Files Menu' Select 4 - 'Generate your Oracle Applications report files' {it should regenerate your reports files in 2.5} For custom reports, rather than open each one in the developer's tool, to re-compile and save, process them from the command line with R25CONVM using a script like the following. You will require the following two commands for each report: r25convm stype=rdffile dtype=rexfile source=$WJ_BOM_TOP/srw/xxxx dest=$WJ_BOM_TOP/srw/xxxxx dunit=character overwrite=yes batch=yes r25convm stype=rexfile dtype=rdffile source=$WJ_BOM_TOP/srw/xxxx dest=$WJ_BOM_TOP/srw/xxxxx dunit=character overwrite=yes batch=yes (where xxxx is your report name without the extension and $WJ_BOM_TOP is your custom directory). To do it as a batch go to each custom directory and do an ls of .rdf and sent the output to a file. Then used vi on the file and add all the right syntax. You will probably get a message that says it is converting to a rex file and then another warning about recompiling pl/sql. Ignore this. Even after a fresh 10.7 install, you may have to regenerate some Oracle reports this way with the typical error being REP0759 uncompiled SQL, then an error about page or frame size or frequencies below their group.

Tip Eleven: What does all this &P_TABLE1 stuff mean?The queries of many Oracle Financials reports contain lexical references to table names, where clauses etc. This can make the select statements difficult to understand until you can work out how to interpret them. Consider the following code that was adapted from the Invoice report RAXINV.rdf SELECT T.NAME A.BILL_TO_CUSTOMER_ID U_BILL.LOCATION B.CUSTOMER_NAME FROM &P_TABLE1 TERM_NAME BILL_TO_CUSTOMER_ID, BILL_TO_LOCATION, BILL_CUST_NAME,

The lexical reference &P_TABLE1 refers to the user parameter P_TABLE1. Opening up the property sheet for P_TABLE1 shows that this parameter has the initial value of the RA_CUSTOMERS table. This does not help us much. What are the table aliases T, A, U and B? The answer to this puzzle is as follows.

ASSIST Pty Ltd 1999 Page 10

The Before Report trigger of RAXINV.rdf calls a procedure arp_trx_select_control.build_where_clause to set the values of parameters such as :p_table1. The following information was obtained using SQL Plus to execute the statement: SELECT text FROM all_source WHERE object_name like 'ARP_TRX_SELECT_CONTROL%' / an extract of this follows... /*- | Define Tables and aliases |*/

table1 := ' AR_ADJUSTMENTS COM_ADJ, ' || cr || TEXT -------------------------------------------------------------------------------' AR_PAYMENT_SCHEDULES P, ' || cr || ' RA_CUST_TRX_LINE_GL_DIST REC, ' || cr || ' RA_CUSTOMER_TRX A, ' || cr || ' RA_CUSTOMERS B, ' || cr || ' RA_TERMS T, ' || cr || ' RA_TERMS_LINES TL, ' || cr || ' RA_CUST_TRX_TYPES TYPES, ' || cr || ' AR_LOOKUPS L_TYPES, ' || cr || ' RA_ADDRESSES A_BILL, ' || cr || ' RA_SITE_USES U_BILL ' || cr; So now we can see that T refers to RA_TERMS, U_BILL refers to RA_SITE_USES, and so on.

Tip Twelve: Likely Causes of ErrorsSignal 10 is usually a memory error or an addressing error, although it may also occur because of incorrectly FTPing the .rdf file from the client in ASCII mode. Check out your available shared memory when running the process, plus you should check out how the concurrent managers where started. Sometimes if the managers are started through an OS script, the proper addressing is not set. Below is the error types for signal 10 errors BUS_ADRALN invalid address alignment BUS_ADRERR non-existent physical address BUS_OBJERR object specific hardware error Signal 11 (Unaligned memory access) is a message coming back from the UNIX operating system letting you know that an Oracle executable has tried to access memory incorrectly. It's not a problem with UNIX but is part of the operating system's mechanism of protecting itself from crashing. Simple causes may include: Not enough disk space in $APPL_TOP/out directory where the concurrent manager creates the report output files. Lack of storage space in table spaces, rollback segments etc Very complex SQL statements with many Group By columns (which may not all be required) Incorrect OS permissions Parameter mismatches The reports were FTPed incorrectly (ASCII instead of binary) A 'Numeric or Value error' on some procedure code (although this may also cause a Signal 4 error). Typically this is because you have a field or variable which is too small to hold a value passed to it, which often happens when you are summing values.

ASSIST Pty Ltd 1999 Page 11

Less obvious errors you will have to deal with on a case by case basis with the help of Oracle Support to solve your problems because your operating system is doing exactly what its supposed to do to try and reduce the chances of crashing the system. Solutions may include relinking the executable or working with Support to tweak the report so that it doesn't cause the report to access UNIX memory in an incorrect manner. If the report gives no data, then do the following: Check for SRW.USER_EXIT(FND SRWINIT) in Before Report trigger Check for SRW.USER_EXIT(FND SRWEXIT) in After Report trigger Check for P_CONC_REQUEST_ID parameter in user parameters

Tip Thirteen: Problems with MarginsMargins can be useful if you want some text ore other boilerplate to appear on every page of the report but they can be a nightmare to work with if you want things to appear only under certain conditions. There is a problem using format triggers in margin objects. Usually you will want to reference variables that occur at the wrong frequency. If you try to reference variables at the right frequency (i.e. page level) you cant because of a circular dependency as explained in Reports Help text: You cannot reference columns or variables in the Format Trigger of an object that have a different frequency than the object. For example, if you create a master/detail report, the parent group's repeating frame cannot have a Format Trigger that relies on a value in the child group. For each parent, there may be multiple children. Therefore, at the parent record level, Oracle Reports cannot determine which of the child records to use. You also cannot reference any page-dependent columns (i.e., Reset At of Page) or columns that rely on pagedependent columns in a Format Trigger. The reason for this is that it would result in a circular dependency. That is, the value of a page-dependent column cannot be computed until the report is formatted, but the report cannot be formatted until the Format Trigger is executed. Print Conditions are often poorly understood. The print condition of a child object specifies which of the logical pages of one instance of the parent object will display the child object. Setting the print condition of a margin object to anything other than first (or default) is pretty meaningless and will probably cause an error. Fields in margins must be sourced from columns that repeat at a frequency of once per page. The way to achieve this is to set up a summary column outside of all queries that returns the :LAST value of the desired column RESET AT PAGE. Please note that if the desired column belongs to a group with a lower frequency than page, the field will only display in the margin of the last page of a repeating frame sourced from that group. This can be overcome by moving the column to a higher frequency group (lower down in the data model). Sometimes this will require alterations to a SELECT statement. Note that margin fields can be made to appear only on certain pages by conditionally printing a white (nontransparent) body object over the margin object. The margin object is still on every page but it can only be seen on pages where the body object does not print.

Appendix: Oracle Reports TroubleshootingThis section contains tips for troubleshooting common problems and error messages and is adapted from the AOL Reference manual. I include it here for completeness. Concurrent Request Logs The first step of your debugging should be to examine the log of concurrent request for errors. Running From the Operating System If you cannot determine the cause of problem from the concurrent request log, run the report from the operating system. Use the Oracle Applications linked Oracle Reports executable to run the report. Along

ASSIST Pty Ltd 1999 Page 12

with the standard Oracle Reports arguments, run the report with the arguments passed by the concurrent manager. The arguments passed by the concurrent manager can be found in the beginning of the concurrent request log under the title "Arguments". For example, the menu report can be run from the operating system as follows: ar20run userid=name/[email protected] \ destype=file desname=try.out \ desformat=$FND_TOP/srw/L batch=yes \ report=$FND_TOP/srw/FNDMNRMT ROOT_MENU="Y" \ MENU_APPL_ID="0" MENU_ID="0" Here, the last three arguments (ROOT_MENU="Y" MENU_APPL_ID="0" MENU_ID="0") appeared in a concurrent request log. If you can run the report from the command line, that indicates that there is a problem in the environment from which the concurrent manager was started. Ensure that you start the concurrent managers from the same environment you are trying to run the report. Use r20run In Place of ar20run If you cannot run ar20run as above, run a report without any Oracle Applications user exists using r20run. For this debugging step Application Object Library provides a report $FND_TOP/srw/FNDNOEXT.rdf (the UNIX path name) which has no user exits. If this report fails, you may be running Oracle Reports from the wrong environment or your Oracle Reports installation may be incorrect. Contact Oracle Tools Support if FNDNOEXT.rdf cannot run. Run the Print Environment Variable Values Report The concurrent manager inherits its environment variables from the shell from which it was started and then runs reports using this environment. This environment could be different from that a a user sees logging into the Applications because the concurrent manager may have been started by a different user with different environment settings. Due to this difference, it is sometimes difficult and confusing to determine the cause of errors in running reports. If you want to examine the value of few variables, you can run "Prints environment variable values" report to print out the variable as seen by the concurrent manager to see if it is correct. Very often problems such as a problem in compilation or the concurrent managers inability to locate a library happen due to an incorrect REP_PATH. Emulate Concurrent Manager Environment For UNIX platforms, to assist in determining where the problem lies, Oracle Application Object Library ships a program called $FND_TOP/srw/ar20run.oc. This program helps you emulate the concurrent manager environment when testing reports from the operating system command line. This program writes all the environment variables and arguments passed to it in a log file ar20run.log. Save the ar20run.oc source code to a file named ar20run.oc, compile it and rename the executable as ar20run (referred to as "new ar20run" from now on). Save $FND_TOP/bin/ar20run (referred to as "old ar20run" from now on) into some other file and place new ar20run into $FND_TOP/bin. For your convenience, compiling and relinking has been incorporated into fnd.mk which will, by default build an executable $FND_TOP/bin/ar20run.dbg which you can then rename to ar20run which would be your new ar20run. In the ar20run.oc code, you may hardcode the directory path for ar20run.log (for example, change ar20run.log to "/dev/fnd/6.0/log/ar20run.log") to direct the log file to a more appropriate directory. Submit the report from concurrent manager and look at the ar20run.log. Then run the reports from the operating system with the same arguments as shown by ar20run.log using old ar20run. If running with the same arguments does not help, emulate the same environment variables which ar20run.log shows. This can be done by printing your environment variables from the command line, sorting them and the ar20run.log environment variables properly, and then comparing them.

ASSIST Pty Ltd 1999 Page 13

Frequently Asked Questions Why Does My Report Only Fail From the Concurrent Manager? This is because the environment from which the concurrent manager launches a report is different from the one you are using when running the report from the command line. Why Do I Get the error REP-0713 When I Run my Report? The report parameter DESFORMAT is used to specify an SRW (printer) driver when running a report in character mode. The Oracle Reports reference manual specifically states that this parameter is ignored in bitmapped mode. However, when a non-null DESFORMAT is passed in bitmapped mode, the error REP0713 results. The concurrent manager prevents passing DESFORMAT in bitmapped mode. If you getting this error, then a default for DESFORMAT has been specified in the report itself. You must delete this default to run your report in bitmapped mode. My Bitmapped Report Does Not Print in Landscape. Why? Print styles such as Landscape are associated with printer drivers that send instructions telling the printer how to print text files. However, bitmapped reports are not text files. Bitmapped reports are output as PostScript files. The PostScript file is a set of instructions telling the printer exactly what to print and how to print it. To get a landscape report, the PostScript file must be generated as landscape. If you want a landscape bitmapped report, specify this either in the Reports Designer or in the execution options of your concurrent program. When printing bitmapped reports, a print style is still needed to determine the printer driver used. To avoid confusion, create a special print style for bitmapped reports and make that the required style for all bitmapped reports in the Define Concurrent Programs form. What Does the "REP-0065: Virtual Memory System error" Mean? Unfortunately this is not a very informative error message. This could occur due to various reasons. Try the following to isolate the problem: Is your /tmp directory getting full? By default Oracle Reports uses this directory to write temporary files. These files could be directed to another directory using the environment variable TMPDIR. If you have another large partition on your machine, set TMPDIR to this partition and restart the concurrent manager from that environment. Are the failing reports using Page N of M? This can consume a lot of Oracle Reports virtual memory. If possible, try running the reports against a smaller database.

About the Author Jeannie Dobney is Training Manager for Accounting System Software Implementation and Support Team (ASSIST Pty Ltd) which is based in Canberra and specialises in Oracle Financials. She was previously Education Centre Manager for Oracle Canberra. Jeannie holds a B.A. Computing, M.B.A. and Oracle Masters Certificates in Developer 2000.

ASSIST Pty Ltd 1999 Page 14