Solved

Reports: Break on Deptno

Posted on 2004-09-30
2
689 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
Suggested Courses

627 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