Home » Developer & Programmer » Reports & Discoverer » No of record Display in Report (developer 6i database 10g window xp)
No of record Display in Report [message #406264] Wed, 03 June 2009 01:23 Go to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
Hellow all

I create a simple module which is
Select * from emp 


Now i need in the end of report its will show no of record display


Regards

shahzaib ismail
Re: No of record Display in Report [message #406271 is a reply to message #406264] Wed, 03 June 2009 01:33 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
If you use report wizard to create a report, create "Count" field in the "Totals" tab; choose an appropriate field to count number of records.

Otherwise, create a formula column by yourself (use COUNT function as well).
Re: No of record Display in Report [message #406279 is a reply to message #406264] Wed, 03 June 2009 02:11 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
Thanks for your reply


I Create another report which is

SELECT   Row_number()
           OVER(ORDER BY d_style.d_style_no) AS ser#,
         description,
         order_quantity,
         dis.dqty,
         Nvl(order_quantity,0) - Nvl(dis.dqty,0) AS "Bal to Supply",
         ret.rqty
FROM     d_style,
         d_order,
         (SELECT   d_stitch_style_no           stisty,
                   Sum(Nvl(stitch_quantity,0)) sqty
          FROM     d_stitch
          WHERE    d_stitch_date BETWEEN Nvl(:Date_from,d_stitch_date) AND Nvl(:Date_to,d_stitch_date)
          GROUP BY d_stitch_style_no) sti,
         (SELECT   d_dispatch_style_no           dissty,
                   Sum(Nvl(dispatch_quantity,0)) dqty
          FROM     d_dispatch
          WHERE    d_dispatch_date BETWEEN Nvl(:Date_from,d_dispatch_date) AND Nvl(:Date_to,d_dispatch_date)
          GROUP BY d_dispatch_style_no) dis,
         (SELECT   d_return_style_no           retsty,
                   Sum(Nvl(return_quantity,0)) rqty
          FROM     d_return
          WHERE    d_return_date BETWEEN Nvl(:date_from,d_return_date) AND Nvl(:date_to,d_return_date)
          GROUP BY d_return_style_no) ret
WHERE    sti.stisty (+)  = d_style.d_style_no
         AND dis.dissty (+)  = d_style.d_style_no
         AND ret.retsty (+)  = d_style.d_style_no
         AND d_style_no BETWEEN Nvl(:Style_from,d_style_no) AND Nvl(:Style_to,d_style_no)
         AND d_catagory_name = Nvl(:Catagory,d_catagory_name)
GROUP BY d_style_no,
         sti.sqty,
         dis.dqty,
         ret.rqty,
         order_quantity,
         description 


in this query the balance to supply column exist with + and - data

i want to count all data which is positive (+) in one summary column and all negative (-) data into second summary column


Regards

Shahzaib ismail
  • Attachment: possitive.jpg
    (Size: 28.93KB, Downloaded 131 times)
Re: No of record Display in Report [message #406296 is a reply to message #406279] Wed, 03 June 2009 03:43 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
One way would be to create formula columns which would
SELECT COUNT(*) 
FROM <your_query_here> 
WHERE item_value >= 0   /   or item_value < 0
and display these values.
Re: No of record Display in Report [message #406311 is a reply to message #406264] Wed, 03 June 2009 04:22 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
WHERE item_value >= 0   /   or item_value < 0


I don't have a item


Nvl(order_quantity,0) - Nvl(dis.dqty,0) AS "Bal to Supply",


This is the column which i need to count


Shahzaib
Re: No of record Display in Report [message #406318 is a reply to message #406264] Wed, 03 June 2009 05:22 Go to previous messageGo to next message
cookiemonster
Messages: 12422
Registered: September 2008
Location: Rainy Manchester
Senior Member
Something like this might help (depends where you want to do the calculation):
SUM (CASE WHEN "Bal to Supply" > 0 THEN 1 ELSE 0 END) positive_balances,
SUM (CASE WHEN "Bal to Supply" < 0 THEN 1 ELSE 0 END) negative_balances,
Re: No of record Display in Report [message #406323 is a reply to message #406311] Wed, 03 June 2009 05:36 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
"bal_to_supply" can be used in a formula column.
Re: No of record Display in Report [message #406899 is a reply to message #406264] Sun, 07 June 2009 05:01 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
Little Foot Wrote

Quote:

One way would be to create formula columns which would

SELECT COUNT(*)
FROM <your_query_here>
WHERE item_value >= 0 / or item_value < 0

and display these values.




An Into Clause Expected in this Select Statement


Regards


Shahzaib Ismail
Re: No of record Display in Report [message #406924 is a reply to message #406899] Sun, 07 June 2009 13:05 Go to previous message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
shahzaib_4vip@hotmail.com
An Into Clause Expected in this Select Statement
So? Do you need assistance?
Previous Topic: Conditional Printing
Next Topic: Reports are not starting
Goto Forum:
  


Current Time: Fri Dec 09 21:29:18 CST 2016

Total time taken to generate the page: 0.26078 seconds