D2K Interview Questations


Qus 1 . What are the User PARAMETERS in the Reports?
Ans. Whenever you need to change the query value at runtime then create a parameter which reads the value during run time. In this scenario which you are creating the parameters are known as user parameters. eg: create a sql query as below:
select * from emp where deptno=:p_deptno
Then system creates a parameter named p_deptno. This bind parameter is a user parameter.
Run the report, During run time system expect the deptno value from the user.

Qus 2 . What is repeting frame?
Ans. RepeatingFrame: display the contents no of times ,normal Frame : display the contents only one time

Qus 3 . What is Flex mode and Confine mode?
Ans. Confine mode
On: child objects cannot be moved outside their enclosing parent objects.
Off: child objects can be moved outside their enclosing parent objects.
Flex mode:
On: parent borders "stretch" when child objects are moved against them.
Off: parent borders remain fixed when child objects are moved against them.

Qus 4 . What is format trigger?
Ans. The trigger can be used to dynamically change the formatting attributes of the object. Format triggers are PL/SQL functions executed before the object is formatted. The function must return a Boolean value (TRUE or FALSE). Depending on whether the function returns TRUE or FALSE, the current instance of the object is included or excluded from the report output. You can access format triggers from the Object Navigator, the Property Palette, or the PL/SQL Editor.
yes if they have different parameters

Qus 5 . In procedure how to return a value ?
Ans. In procedure we can return value using Out Parameter,

Qus 6 . What is SRW Package? (Sql Report Writer)
Ans. The Report builder Built in package know as SRW Package This package extends reports ,Control report execution, output message at runtime, Initialize layout fields, Perform DDL statements used to create or Drop temporary table, Call User Exist, to format width of the columns, to page break the column, to set the colorsEx: SRW.DO_SQL, It?s like DDL command, we can create table, views , etc.,

Qus 7 . Types of cursors?
Ans. 1) Implicit: declared for all DML and pl/sql statements.
By default it selects one row only.
2) Explicit: Declared and named by the programmer.
Use explicit cursor to individually process each row returned by a Multiple statements, is called ACTIVE SET Allows the programmer to manually control explicit cursor in the Pl/sql block
declare: create a named sql area
Open: identify the active set.
Fetch: load the current row in to variables.
Close: release the active set.

%is open: evaluates to true if the cursor is open.
%not found: evaluates to true if the most recent fetch
does not return a row
%found: evaluates to true if the most recent fetch
returns a row.
%row count: evaluates to the total number of rows
returned to far.

Example for cursor:
Vno emp.empno%type;
Vname emp.ename %type;
Cursor emp_cursor is
Select empno,ename
From emp;
Open cursor;
For I in 1..10 loop
Fetch emp_cursor into vno,vname;
Dbms_output.putline(to_char(vno) ||? ?||vname);
End if;
E nd;

Open emp_cursor;
Fetch when emp_cursor % rowcount >10 or
Emp_curor % not found;
Bdms_output_put_line(to_char(vno)||? ?||
End loop;
Close emp_cursor;

cursor for loop is a short cut to process explicit cursors
it has higher performance
cursor for loop requires only the declaration of the
cursor, remaining things like opening, fetching and close
are automatically take by the cursor for loop

Cursor emp_cursor is
Select empno,ename
From emp;
For emp_record in emp_cursor loop
End loop

A placeholder is a column is an empty container at design time. The placeholder can hold a value at run time has been calculated and placed in to It by pl/sql code from antherobject. You can set the value of a placeholder column is in a Before Report trigger. Store a Temporary value for future reference. EX. Store
the current max salary as records are retrieved.