01.02.2013 Views

Publishing Reports to the Web - Downloads - Oracle

Publishing Reports to the Web - Downloads - Oracle

Publishing Reports to the Web - Downloads - Oracle

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Methodology<br />

20.1.3 Formatting <strong>the</strong> Data<br />

SELECT d.dname, e.ename<br />

FROM emp e, dept d<br />

WHERE e.deptno(+) = d.deptno<br />

■ Two queries with a column link based on deptno<br />

SELECT deptno, dname FROM dept<br />

SELECT deptno, ename FROM emp<br />

When you design <strong>the</strong> data model in <strong>the</strong> report, minimize <strong>the</strong> actual number of queries<br />

by using fewer large multi-table queries, ra<strong>the</strong>r than several simple single-table<br />

queries. Every time a query is run, <strong>Oracle</strong> <strong>Reports</strong> needs <strong>to</strong> parse, bind, and execute a<br />

cursor. A single query report returns all <strong>the</strong> required data in a single cursor, ra<strong>the</strong>r<br />

than many cursors. With master-detail queries, <strong>the</strong> detail query will be parsed, bound,<br />

and executed again for each master record retrieved. In this example, it is more<br />

efficient <strong>to</strong> merge <strong>the</strong> two queries and use break groups <strong>to</strong> create <strong>the</strong> master-detail<br />

effect.<br />

Keep in mind that <strong>the</strong> larger and more complex a query gets, <strong>the</strong> more difficult it is <strong>to</strong><br />

be maintained. You need <strong>to</strong> decide when <strong>to</strong> achieve <strong>the</strong> balance between performance<br />

and maintenance requirements.<br />

After <strong>the</strong> data is retrieved from <strong>the</strong> data source, <strong>Oracle</strong> <strong>Reports</strong> generates <strong>the</strong> report<br />

layout and formats <strong>the</strong> output. The time taken for a paper layout depends on a<br />

number of fac<strong>to</strong>rs, but generally comes down <strong>to</strong>:<br />

■ The work required <strong>to</strong> prevent an object from being overwritten by ano<strong>the</strong>r object.<br />

■ The efficiency of any calculations or functions performed in <strong>the</strong> format triggers.<br />

The rules for a <strong>Web</strong> layout are a little different as <strong>Oracle</strong> <strong>Reports</strong> does not:<br />

■ Own <strong>the</strong> <strong>Web</strong> page<br />

■ Control <strong>the</strong> rendering mechanism<br />

It merely injects data in<strong>to</strong> a regular JSP page.<br />

20.1.3.1 Paper Layout<br />

When generating a default paper layout, <strong>Oracle</strong> <strong>Reports</strong> wraps a frame around<br />

virtually every object <strong>to</strong> prevent <strong>the</strong> objects from being overwritten, when <strong>the</strong> report is<br />

run. At runtime, every layout object (frames, fields, boilerplate, etc.,) is examined <strong>to</strong><br />

determine <strong>the</strong> likelihood of that object being overwritten. In some situations (for<br />

example, boilerplate text column headings) when <strong>the</strong>re is clearly no risk of <strong>the</strong> objects<br />

being overwritten, <strong>the</strong> immediately surrounding frame is removed. This reduces <strong>the</strong><br />

number of objects that <strong>Oracle</strong> <strong>Reports</strong> must format and consequently improves<br />

performance.<br />

Extra processing is required when an object has an undefined size (variable,<br />

expanding, or contracting ei<strong>the</strong>r horizontally and / or vertically). In this case, <strong>Oracle</strong><br />

<strong>Reports</strong> must determine <strong>the</strong> instance of <strong>the</strong> object's size, before formatting that object<br />

and those around it. There is no processing overhead involved for objects assigned a<br />

fixed size, as <strong>the</strong> size and positional relationships between <strong>the</strong> objects is known.<br />

The following guidelines helps <strong>to</strong> improve performance when creating a paper layout:<br />

■ Make your non-graphical layout objects (for example, boilerplate text or fields<br />

with text) fixed in size by setting <strong>the</strong> Vertical Elasticity and Horizontal Elasticity<br />

properties of <strong>the</strong> field <strong>to</strong> Fixed. In particular, setting <strong>the</strong> size of repeating frames<br />

20-12 <strong>Oracle</strong> Application Server <strong>Reports</strong> Services <strong>Publishing</strong> <strong>Reports</strong> <strong>to</strong> <strong>the</strong> <strong>Web</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!