auto numbering (sl.no) in reports [message #214798] |
Thu, 18 January 2007 02:20 |
vdsk
Messages: 41 Registered: February 2006 Location: India & UAE
|
Member |
|
|
I want to display serial no for each row in my report.
Is there any in-built or any other way of auto generating this no. to get this.?
I am using Reports 6i under Ora 9i/10g.
email vdsk@hotmail.com
|
|
|
|
|
|
|
|
|
|
Re: auto numbering (sl.no) in reports [message #229246 is a reply to message #214798] |
Fri, 06 April 2007 04:19 |
|
I hope you have done it already before see this answer..
I give u code step by step..
--> Step :1
create a package locally(Program Unit node in Object
Navigator) and declare a variable and assigns
0 to it.
create package num_count is
i number := 0;
end;
You don't need to write definations for it.
--> Create a formula column in your data group and write the
code..
function abc is return number
return(num_count.i := num_count.i +1);
end;
--> Create a text field in layout model and
Assign this formula column to it..
--> Write this code in Before Report Trigger
num_count.i := 0;
--> Run The Report..
You will get the S No for your report ..
cheer
Regards
Shakti Goyal
[Updated on: Fri, 06 April 2007 04:25] Report message to a moderator
|
|
|
Re: auto numbering (sl.no) in reports [message #235325 is a reply to message #214798] |
Sat, 05 May 2007 00:57 |
rameshkumars2k3
Messages: 8 Registered: November 2006 Location: DELHI
|
Junior Member |
|
|
Hi All,
Please try this query
select rownum,artno,description,qtysold,ocdate
(select a.artno,description,qtysold,ocdate from invmas a,invoice
b where a.artno=b.artno)
I hope this is useful for all of You
Bye
Ramesh Kumar
oracle.ramesh@hotmail.com
|
|
|
Re: auto numbering (sl.no) in reports [message #235421 is a reply to message #235325] |
Sat, 05 May 2007 12:02 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Code you provided wouldn't compile at all - it misses the FROM keyword.
Moreover, why would you need such a syntax? What's wrong withselect ROWNUM, a.artno, description, qtysold, ocdate
from invmas a,invoice b
where a.artno = b.artno
Finally, OP got the answer months ago. There's no need to resurrect old (answered) topics.
|
|
|