Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with SQL*PLUS report format issue

Status
Not open for further replies.

kzhangkzhang

Programmer
Mar 9, 2004
25
0
0
US
Hi All:

I am creating a SQL*PLUS (not Oracle report) report. The code segment liks following:

==============================================
set newpage 0
set pagesize 55

BREAK ON component desc quantity

select ..... from .... // ignore the actual syntax

===============================================

When I run this report, I got the following result (Let us assume the report generate 2 pages of data)

page 1 looks like:

Component Desc quantity subinv
--------- ---- -------- ------
12345 test 10 abc
WIP-C

34567 test2 20 mysub
mysub2

Page 2 looks like (notice that the information about component 34567 will continually show in page 2) :
Component Desc quantity subinv
--------- ---- -------- ------
34567 test2 20 mysub3
mysub4


Here is my request, is there a way for page 2 hiding actual data for quantity column for component 34567? The desired output for page 2 would look like the following:

Component Desc quantity subinv
--------- ---- -------- ------
34567 test2 mysub3
mysub4

The official request for me is: hide the quantity column for the same component when the information for that component continually from page X to page X + 1.

Thanks!

 
Hi,
Does this componenet 34567 also prints on any other page.
As per the break order specified by you, it seems it does not.
Fi this is the case then simply make use of Decode in your query i.e.
Code:
Select ......,Decode(Component,34567,null,Qunatity) Quantity ,...from table;
HTH
Regards
Himanshu
 
Hi HimanB:

This report is showing the information for a component in different sub-inventory location. The quantity column means the total quantity for a component in all possible sub-inventory. Since a component could have multiple sub-inventory, the information about the same component could be printed and shown in multiple pages. The requirement is print quantity information **only once** for a particular component. If the information for a component spread to mutiple pages, the quantity information for that component once show in the first page.

I don't think this is possible in SQL*PLUS report, since there is no way to know when the report advance to a new page. Just want to ask expert here to see whether this is possible.

Thanks!
 
Did you try:

Code:
BREAK ON component NODUPLICATES ON desc ON quantity
[thumbsup]


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Ooops, didn't read complete requirements, try this:

Code:
BREAK ON component ON desc ON quantity NODUPLICATES

[3eyes]


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top