I want to create a page that has several classic reports stacked on top of each other. The column headers for the first report will be the month-end date of the last 13 months. So, I don't need column headers for subsequent reports, since they will all be the same. So, it would be like:
TABLE 1 HEADING 1 (5/24) | TABLE 1 HEADING 2 (6/24) |
---|---|
TABLE 1 FIRST NUMBER | TABLE 1 SECOND NUMBER |
TABLE 2 FIRST NUMBER | TABLE 2 SECOND NUMBER |
And you may ask, "Why isn't he just using "union all" to combine the sql outputs into one report?" The problem is that some of the numbers in the page need two decimal places and some don't. I'm not savvy enough with coding to make different rows of the same report have different formats. So, my solution is to make separate classic reports with the same cell width and only the first report having column headers.
Hope this makes sense. Thank you!
I'm not savvy with HTML or other coding to make different rows in a report have different formats. The only thing I know how to do is change the format for a field with the FORMAT MASK in the APPEARANCE section. But that won't work when different rows need different formats. So, I haven't really tried anything that will work.
Union might be an easy solution to your problem because you can format every select's numeric value in its own way by using to_char
with desired format mask.
For example:
SQL> select deptno, ename, to_char(sal, '999G990') salary
2 from emp
3 where deptno = 10
4 union all
5 select deptno, ename, to_char(sal, '999G990D00') salary
6 from emp
7 where deptno = 20
8 order by deptno, ename;
DEPTNO ENAME SALARY
---------- ---------- -----------
10 CLARK 2,450
10 KING 5,000
10 MILLER 1,300
20 ADAMS 1,100.00
20 FORD 3,000.00
20 JONES 2,975.00
20 SCOTT 3,000.00
20 SMITH 800.00
8 rows selected.
SQL>
On the other hand, if you want to remove heading (and use several classic reports), do that in every report's attributes pane (left hand side of the screenshot). Result is on the right hand side; as you can see, there's no heading, but beware of different columns' width (green vertical line I drew) which might cause layout to look ugly. Maybe UNION is a better option, then, than to modify many columns' widths.
P.S. Disregard different values shown in SQL*Plus and Apex output; the first one is from my local database, and the second is from apex.oracle.com.