Home » Developer & Programmer » Reports & Discoverer » auto numbering (sl.no) in reports
auto numbering (sl.no) in reports [message #214798] Thu, 18 January 2007 02:20 Go to next message
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 #214901 is a reply to message #214798] Thu, 18 January 2007 08:18 Go to previous messageGo to next message
ab_trivedi
Messages: 460
Registered: August 2006
Location: Pune, India
Senior Member
Hi suresh,

I am sending .rdf you study that and you will get the answer. You have to create a summary column ,set source and reset at and will get the answer.

Ashu
Re: auto numbering (sl.no) in reports [message #214944 is a reply to message #214901] Thu, 18 January 2007 12:59 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Or select ROWNUM along with the rest of the columns and display it in report; here is an SQL*Plus example, but I believe you'll get the point:
SQL> select rownum, ename from emp;

    ROWNUM ENAME
---------- ----------
         1 SMITH
         2 ALLEN
         3 WARD
         4 JONES
         5 MARTIN
         6 BLAKE
         7 CLARK
         8 SCOTT
         9 KING
        10 TURNER
        11 ADAMS
        12 JAMES
        13 FORD
        14 MILLER

14 rows selected.

SQL>
Re: auto numbering (sl.no) in reports [message #215101 is a reply to message #214798] Fri, 19 January 2007 05:36 Go to previous messageGo to next message
tanwanichandan
Messages: 8
Registered: January 2007
Location: Rajkot
Junior Member

hi ,

ya u can do this using the formla column to count record and then
assign this to the cp column
then give the source of ur field to ur cp column

so it done !!!!!!!!!

bye
chandan
Re: auto numbering (sl.no) in reports [message #215472 is a reply to message #214798] Mon, 22 January 2007 07:32 Go to previous messageGo to next message
sambaponnekanti
Messages: 9
Registered: January 2007
Location: Hyderabad
Junior Member

dear friend

Did u received any code or solution for the above subject please send reply imm...

Thanks & regards
Samba
Re: auto numbering (sl.no) in reports [message #215474 is a reply to message #215472] Mon, 22 January 2007 07:43 Go to previous messageGo to next message
ab_trivedi
Messages: 460
Registered: August 2006
Location: Pune, India
Senior Member

@samba u try multiple_names.rdf.

Ashu
Re: auto numbering (sl.no) in reports [message #215837 is a reply to message #214798] Wed, 24 January 2007 01:12 Go to previous messageGo to next message
sambaponnekanti
Messages: 9
Registered: January 2007
Location: Hyderabad
Junior Member

Dear Friend

See the following navigation & code

Navigation =>go to Data Model take the query which data u want in output then take one formula column & place it in Query group
then right click on formula column select pl/sql editor & then
compile the following code


if :cf_1 is null then
return 1;
else
return(:cf_1+1);
end;

after this compilation goto layout place one text field for Sl.no Then change the property column souce as cf_1;

any doubts reply me
Samba
Re: auto numbering (sl.no) in reports [message #227007 is a reply to message #214798] Tue, 27 March 2007 02:12 Go to previous messageGo to next message
zafarkarachi
Messages: 29
Registered: November 2006
Location: Karachi Pakistan
Junior Member
Laughing
Please check the attached new style serial
report
u can print ur desired serial using parameters from and to
check after parameter form trigger.

Zafar Iqbal
Karachi

0321-2876518

  • Attachment: serials.RDF
    (Size: 60.00KB, Downloaded 204 times)
Re: auto numbering (sl.no) in reports [message #229246 is a reply to message #214798] Fri, 06 April 2007 04:19 Go to previous messageGo to next message
shakti_goyal
Messages: 60
Registered: November 2006
Location: India
Member


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 Go to previous messageGo to next message
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 Go to previous message
Littlefoot
Messages: 20891
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 with
select 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.
Previous Topic: How to configure Oracle Reports Server on AS
Next Topic: matrix or group matrix report
Goto Forum:
  


Current Time: Sat Dec 03 20:03:47 CST 2016

Total time taken to generate the page: 0.04212 seconds