Home » Developer & Programmer » Reports & Discoverer » How to print even no.of pages in Reports6i  () 1 Vote
icon14.gif  How to print even no.of pages in Reports6i [message #195479] Thu, 28 September 2006 23:21 Go to next message
SivaSankar
Messages: 6
Registered: May 2004
Junior Member
Hi gurus,

I've been working for a Telecom Ltd.,and we r using Oracle9i as DB and D2K Forms & Reports6i for desgn.

My problem is,we have an old printer which prints telephone bills on one side of the paper,so the assistents used to seperate the bills after finishing printing mannually.

So,inorder to reduce the paper cost and mannual work we have purchased a duplex printer recently which prints bothsides of a paper.And when i try to print a range of bills,we found out that IT IS PRINTING TWO DIFFERENT TELEPHONE BILLS ON A SAME PAPER AS THE PREVIOS BILL WAS HAVING ODD NO.OF PAGES.So, we need to print even no.of pages for each and every telephone number in the given range.

I hope,this is a good question for D2K reports lovers and plz do help me ASAP.

Rgds,
Shiv
Re: How to print even no.of pages in Reports6i [message #237386 is a reply to message #195479] Mon, 14 May 2007 05:55 Go to previous messageGo to next message
malakolama
Messages: 16
Registered: May 2007
Location: sri lanka
Junior Member

hi,
please let me know how you solved this problem if you have already sorted it out. thanks.
Re: How to print even no.of pages in Reports6i [message #237452 is a reply to message #237386] Mon, 14 May 2007 09:33 Go to previous messageGo to next message
ab_trivedi
Messages: 460
Registered: August 2006
Location: Pune, India
Senior Member
if the problem is solved then it is great otherwise you can

1. change the table structure and add a column for serial number for the particular telephone number.

2. Run the report for only even number. pass telephone number in the parameter form

3. Execute the report and print it.

4. Same thing can be done for odd pages.

Ashu
Re: How to print even no.of pages in Reports6i [message #237575 is a reply to message #237386] Tue, 15 May 2007 00:04 Go to previous messageGo to next message
SivaSankar
Messages: 6
Registered: May 2004
Junior Member
Hi,

Yes,i've done this thing before for my telecome company.
But,i feel like it is too lengthy.

here we go....

Actual Requirement:
===================
As the billing section of my telecom company introduced a new type(laser) of printer
which can print the telephone bills on both sides of the paper which was not possible before
as the old printer prints only one side of the paper.Later,when we started using the
new printer we found out that it was merging two customers bills on a same paper as
the previous bill contains odd no.of pages.

eg: Customer "A" has 7pages of bill
--- Customer "B" has 4pages of bill

When the new printer prints the bill of Customer "A" it goes on
4th paper to print the last(7th) page on one side of the paper.
And the next immidiate bill(Customer "B") gets printed on the other side of the
same paper as the new printer can print on both sides of the paper.

So,we had to alter the report which can leave the other side of the
paper blank if the bill has odd no.of pages.


Solution:
=========

* I have created a table called MTEVENPRINTS which contains only one column
of datatype NUMBER as follows.

eg: CREATE TABLE MTEVENPRINTS(SNO NUMBER);
---
And,i have inserted 100 rows of data with the values 1..100( just serial no.s).

* DATA MODEL:
-----------

And i've created a seperate "SQL group"(contains simple select statement on table MTEVENPRINTS
with no "WHERE" condition in it) named G_EVENPRINTS,
which returns all 100 rows of data in the DataModel of the report
(It has no link with any other groups of the report.)

* LAYOUT MODEL:
-------------

I have created a seperate "Repeating Frame" named R_EVENPRINTS for the group G_EVENPRINTS as source
at the bottom of my main report's(bill printing report) layout.
(Note: this new repeating frame contains no datafields in it).

And,i've added the following code in the PL/SQL Editor of the repeating frame:

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function R_EvenPrintsFormatTrigger return boolean is
PAGE_NUM NUMBER(6);
begin
SRW.GET_PAGE_NUM(PAGE_NUM);
If MOD(PAGE_NUM,2) = 0 Then
return(FALSE);
Else
return (TRUE);
End If;
end;
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Now,let us take the above given example of printing

For the Customer "A",when my report goes on to the 7th page of 4th paper ,my empty repeating frame
starts printing blank frames as it is in odd page,the moment it enters even page
(i.e., other side of the 4th paper) it gets disabled according to my coding as mentioned above and
leaves that page.So,the next immediate bill has to go on to other paper.

Regards,
SivaSankar K,
TIIMS S/W Engineer,
BHUTAN.
Re: How to print even no.of pages in Reports6i [message #237642 is a reply to message #237575] Tue, 15 May 2007 05:35 Go to previous messageGo to next message
ab_trivedi
Messages: 460
Registered: August 2006
Location: Pune, India
Senior Member
great but what is the TIIMS, is it like BSNL of India.
Ashu
icon7.gif  Re: How to print even no.of pages in Reports6i [message #237675 is a reply to message #237642] Tue, 15 May 2007 07:56 Go to previous messageGo to next message
SivaSankar
Messages: 6
Registered: May 2004
Junior Member
Hi,

Sorry,...mistaken.
Actually,we call our telecom billing package as TIIMS(Telecom Intigrated Information Management System).

Regards,
SivaSankar K,
S/W Engineer,
Bhutan.
Re: How to print even no.of pages in Reports6i [message #238493 is a reply to message #237675] Fri, 18 May 2007 06:01 Go to previous messageGo to next message
javed.khan
Messages: 340
Registered: November 2006
Location: Banglore
Senior Member

Guys Really it is a Good Topic.
Re: How to print even no.of pages in Reports6i [message #238914 is a reply to message #238493] Sun, 20 May 2007 23:49 Go to previous message
SivaSankar
Messages: 6
Registered: May 2004
Junior Member
Thank You Mr.Khan.

Regards,
Shiva
Previous Topic: Calling Reports from Forms
Next Topic: Headings of the columns
Goto Forum:
  


Current Time: Thu Dec 08 04:11:38 CST 2016

Total time taken to generate the page: 0.18880 seconds