Home » Developer & Programmer » Reports & Discoverer » Report fires everyday for cancelled orders (Oracle Report,6i,Windows)
icon5.gif  Report fires everyday for cancelled orders [message #518831] Mon, 08 August 2011 00:04 Go to next message
fayas
Messages: 23
Registered: August 2011
Location: bangalore
Junior Member
Hi all,
I am new to reports.I have a query in reports.My requirement is that report should fire everyday in a year.When an order is cancelled/copied and also that when an order is cancelled then the line amount should be set to zero and order_status should automatically set cancelled.
EX:
order_no amt product_name quote_no order_status
45434545 200 dell 10022 active
when order cancelled then
order_no amt product_name quote_no order_status
45434545 0 dell 10022 cancelled
How to achevie this ? Can anyone pls help...

Thanks in advance,
fayas
Re: Report fires everyday for cancelled orders [message #518836 is a reply to message #518831] Mon, 08 August 2011 01:22 Go to previous messageGo to next message
Littlefoot
Messages: 21561
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
As of "running it every day", you'd schedule its execution using your operating system's scheduler program (Task Scheduler on MS Windows).

As of setting "line amount to zero" and "order status to canceled": where should that happen? In the database (so report will only display what it finds), or in a report itself? If it is the first option, a database trigger might be used to do that ("automatically"). If the latter, use of CASE (perhaps with LAG/LEAD? Though, I'm not sure Reports 6i's engine understands those functions) might do the job. Or, create a formula column to calculate these values.
Re: Report fires everyday for cancelled orders [message #519153 is a reply to message #518836] Wed, 10 August 2011 02:10 Go to previous message
fayas
Messages: 23
Registered: August 2011
Location: bangalore
Junior Member
Thanks for your reply.
For order_cancelled:
When the an order is cancelled then the line amount will automatically set to zero by an concurrent program.
Now, My concern is that the report has to identify the quotes for multiple order numbers associated with it and line amount(line amount is in other table say table b) on the first order,but not on the related orders, where both orders have order type
I.e. quote_number Order_number creation_date
103 100 6/7/11
103 100 6/28/11
103 100 6/31/11
select Quote_number, order_number
from table a
where
Creation_date = (select min(creation_date) from table a
)
having count(order_number) > 1
group by Quote_number, order_number
can you pls help me to build the query on this.
Previous Topic: error font unicode when report use &TotalPages
Next Topic: Report Headers and SubHeaders
Goto Forum:
  


Current Time: Fri May 29 13:17:27 CDT 2020