Page breaks in Oracle Forms 6i [message #90158] |
Thu, 18 November 2004 09:52 |
Heidi
Messages: 37 Registered: February 2000
|
Member |
|
|
I have a report that is being printed to a PDF file. In this example, the report has 3700+ records and has 7500+ pages. I want the ability to print this report duplex, but if one record ends in an odd number, I want the next record to start on the next page, thus leaving a blank page. For example, one record spans 3 pages, the 4th page (back side of 3rd page) should be blank and the next record start on it's own page. Some records may only have 1 page while others may have 10+. Any help is appreciated!
|
|
|
|
Re: Page breaks in Oracle Forms 6i [message #90211 is a reply to message #90209] |
Wed, 08 December 2004 07:36 |
Heidi
Messages: 37 Registered: February 2000
|
Member |
|
|
Not exactly. My project manager contacted Oracle for an answer. They directed her to someone who had the same question and whom they had sent an informational document to - kind of a long story. So my project manager contacted him. He responded that the document information actually caused more problems but in essence he said to do this:
1. Create a boilerplate object at the top of your main repeating group.
2. Turn on break before.
3. Add the following trigger to the object. (Modifying for your trigger name of course)
function B_1FormatTrigger return Boolean is
l_pagenumber number;
begin
srw.get_page_num(l_pagenumber);
if mod(l_pagenumber,2)=0 then
return(FALSE); -- Even numbered page
else
return(TRUE); --Odd numbered page
end if;
end;
I have not tried this as of yet, so I do not know if it will work or not.
If it does work for you or you use a part of it to work, please let me know.
Thanks,
Heidi
|
|
|
Re: Page breaks in Oracle Forms 6i [message #90212 is a reply to message #90211] |
Wed, 08 December 2004 13:00 |
ap
Messages: 9 Registered: June 2003
|
Junior Member |
|
|
Hi,
I have seen this over the metalink, and tried, this will not work. There are lots of notes available but none of them good. Basically most of the oracle technical consultant does search as we do and then copy from the existing notes and answer the question. "This is not good."
However today after spending 5 days, I have resolved this duplex (double-sided) issue.
The good thing in my solution there is no need to use the format trigger.
It is really tricky solution, but not difficult.
If you are still working and have not resolved then let me know your email.
Thanks,
Arshad Pervez
|
|
|
|
|
|
Re: Page breaks in Oracle Forms 6i [message #116855 is a reply to message #90158] |
Fri, 22 April 2005 09:29 |
Steve Corey
Messages: 336 Registered: February 2005 Location: RI
|
Senior Member |
|
|
What was wrong with the Modular division approach? I tend to use this approach any time I need to alternate, for example, color schemes from one employee to another or something like that.
Just curious why the MOD division didn't work?
Regards,
Steve
|
|
|
|
|
|
Re: Page breaks in Oracle Forms 6i [message #147264 is a reply to message #90212] |
Wed, 16 November 2005 20:11 |
tsiewwei78
Messages: 1 Registered: November 2005
|
Junior Member |
|
|
Hi,
Currently I am doing an oracle report that need to have duplex printing. Can you please provide the solution that you found out?
Really appreciate if you can help on this.
Thanks a lot.
Regards,
siew wei
|
|
|
|
Re: Page breaks in Oracle Forms 6i [message #148878 is a reply to message #90211] |
Mon, 28 November 2005 16:50 |
Steve Corey
Messages: 336 Registered: February 2005 Location: RI
|
Senior Member |
|
|
Heidi wrote on Wed, 08 December 2004 08:36 | Not exactly. My project manager contacted Oracle for an answer. They directed her to someone who had the same question and whom they had sent an informational document to - kind of a long story. So my project manager contacted him. He responded that the document information actually caused more problems but in essence he said to do this:
1. Create a boilerplate object at the top of your main repeating group.
2. Turn on break before.
3. Add the following trigger to the object. (Modifying for your trigger name of course)
function B_1FormatTrigger return Boolean is
l_pagenumber number;
begin
srw.get_page_num(l_pagenumber);
if mod(l_pagenumber,2)=0 then
return(FALSE); -- Even numbered page
else
return(TRUE); --Odd numbered page
end if;
end;
I have not tried this as of yet, so I do not know if it will work or not.
If it does work for you or you use a part of it to work, please let me know.
Thanks,
Heidi
|
This should work. I questioned AP when he said it wouldn't. This is really only a partial solution, but the logic is sound. Re-reading Heidi's problem, I believe you need to actually use the MOD function against the row count of records. Dependant on how your query is grouped, the results could vary, but if you have no grouping, the MOD solution is fairly straightforward. The return of MOD will be either 0 or 1 if you use the '2' argument. That way, you can reference the value of the MOD function on the physical repeating frame in the report, instead of inserting boilerplate, which offers greater control to the developer (you) when creating the report.
HTH,
Steve
My mail is listed if you need further explanation, but please read up on the MOD function before emailing. Thanks!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Page breaks in Oracle Forms 6i [message #326639 is a reply to message #90211] |
Thu, 12 June 2008 02:34 |
|
Heidi wrote on Wed, 08 December 2004 13:36 | Not exactly. My project manager contacted Oracle for an answer. They directed her to someone who had the same question and whom they had sent an informational document to - kind of a long story. So my project manager contacted him. He responded that the document information actually caused more problems but in essence he said to do this:
1. Create a boilerplate object at the top of your main repeating group.
2. Turn on break before.
3. Add the following trigger to the object. (Modifying for your trigger name of course)
function B_1FormatTrigger return Boolean is
l_pagenumber number;
begin
srw.get_page_num(l_pagenumber);
if mod(l_pagenumber,2)=0 then
return(FALSE); -- Even numbered page
else
return(TRUE); --Odd numbered page
end if;
end;
I have not tried this as of yet, so I do not know if it will work or not.
If it does work for you or you use a part of it to work, please let me know.
Thanks,
Heidi
|
Why don't you post it here so that everybody could benefit and the thread will not flooded with email adds.
[Updated on: Thu, 12 June 2008 02:37] Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: Page breaks in Oracle Forms 6i [message #361355 is a reply to message #361349] |
Wed, 26 November 2008 01:12 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Yes, you have. It appears that people are satisfied with the way you have solved the problem.
However, as this topic turns into another "metoo" (check OraFAQ Forum Guide, All about braindumps section, background of the "dumps" and "metoo" topics), it is now locked.
If someone wants to continue discussion in a constructive manner, please, send me a private message (or just "report this message to a moderator"), explain what you'd like to do and it will be unlocked. For all of you who'd like to publish your e-mail here -
|
|
|