Solved

Reports: Break on Deptno

Posted on 2004-09-30
2
684 Views
Last Modified: 2013-12-12
I am using reports ver 6i.

From the emp relation when i build up a group above report, it shows department no and the its hild record. The problem is when the records increases the out put should like this....

For each deptno if it appears at the bottom, it's child moves to next page with again deptno no on the top of next page. I want if deptno appears on end of page with no child record then it sholud not appears but only it should appears if atleast one of the child record comes on first page.

I mean only headings are not acceptable on the end of page. It should moves to the next page.

Thanks
0
Comment
Question by:pupil
2 Comments
 
LVL 22

Accepted Solution

by:
Helena Marková earned 50 total points
ID: 12197781
I hope this Note:125626.1 from Metalink will help you:

How to create a conditional page break based upon column value? (SCR 993)

Overview
--------
How to create a conditional page break based upon the value of one of the columns in the query? A customer would like a master-detail report to page break based upon the value of one of the columns being retrieved by the query. The master-detail report is already breaking on each master (through setting max records per page to 1), but the customer would like to have a page break occur if the contents of a specific column are equal to a certain value.

Caution
-------
The sample program in this article is provided for educational purposes only and is NOT supported by Oracle Support Services. It has been tested internally, however, and works as documented. We do not guarantee that it will work for you, so be sure to test it in your environment before relying on it.

Solution Summary
--------------------
Draw an object in the layout and create a format trigger to check the value of the desired column.

Sample Step-by-Step Instructions :
-----------------------------------
Go to the Layout Editor and add a horizontal line to the layout. Place this line directly below the field that will be associated with the format trigger.

The line should also be within the repeating frame of the referenced column.

Apply line color to make the line white (so it won't show up in the printed report) and set the properties to Page Break Before.

Then add a format trigger on the line object to check the value of the desired column. For instance, if a master-detail report is created on the EMP table and a page break is desired whenever the value of the COMM field is not null,create a trigger as follows:

function b_1Format trigger return boolean is
begin
if :comm is not null
then
return (true);
else return (false);
end if;
end;

When the report is run a page break will occur whenever the value of COMM is not null.
0
 
LVL 8

Assisted Solution

by:sapnam
sapnam earned 50 total points
ID: 12197870
One way would be as under :

There would be a Page Protect Property for the Repeating Frame associated with DEPT group. You can make this checked.  What this will do is ensure that all details for a department print on the same page. If not the dept printing moves to the next page.

Another way would be as under :

Always start printing of a dept on a new page.  This will require setting the maximum records per page property for the repeating frame associated with DEPT group to 1.

 
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
join 2 views with 5 conditions 3 61
Oracle Pivot Question 8 71
su - oracle could not open session 6 95
Use of Exception to end a Loop 3 45
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question