Home » Developer & Programmer » Reports & Discoverer » Problem while generating the report (Windows 7, Oracle Form 6i, Oracle Report 6i)
Problem while generating the report [message #605607] |
Sat, 11 January 2014 23:20 |
|
lock_heart
Messages: 36 Registered: November 2013
|
Member |
|
|
I have table named booking_chart with following structures
CREATE TABLE booking_chart ( book_code NUMBER
, firm_code NUMBER
, firm_name VARCHAR2(300)
, source_one VARCHAR2(200)
, to_desti VARCHAR2(200)
, source_two VARCHAR2(200)
, book_date DATE
, serial_no NUMBER(10)
, seat_no VARCHAR2(100)
, total_seats VARCHAR2(100)
, luggage VARCHAR2(200)
, location VARCHAR2(200)
, amount NUMBER(10,2)
, total_amount NUMBER(10,2)
, CONSTRAINT firm_code_fk FOREIGN KEY (firm_code) REFERENCES firm_info (firm_code) ON DELETE CASCADE
)
with the data as follows :-
SELECT book_code, firm_name, source_one, to_desti, source_two, book_date, serial_no, seat_no, total_seats, luggage, location, amount, total_amount
FROM booking_chart
1 AXEL BLAZE NEY YORK LONDON NEY YORK 16-Jan-2014 1 10 60 YES NEW YORK 1000 23000
1 AXEL BLAZE NEY YORK LONDON NEY YORK 16-Jan-2014 2 20 60 YES NEW YORK 1000 23000
1 AXEL BLAZE NEY YORK LONDON NEY YORK 16-Jan-2014 3 30 60 YES LONDON 3000 23000
1 AXEL BLAZE NEY YORK LONDON NEY YORK 16-Jan-2014 4 40 60 NO LONDON 3000 23000
and the screen shot of the form is also given below
now my question is I want to generate report based on book_code with same format as form
can anyone tell me how to do this...
-
Attachment: report.jpg
(Size: 121.47KB, Downloaded 2987 times)
|
|
|
|
|
Re: Problem while generating the report [message #605635 is a reply to message #605618] |
Sun, 12 January 2014 23:23 |
|
dark_prince
Messages: 121 Registered: June 2013 Location: India
|
Senior Member |
|
|
Thanks its worked...I got problem in form of booking chart which screen shot i've uploaded in my previous post...
Problem is during updation... I have uploaded the update code
FOR i IN first_rec..last_rec
LOOP
IF :BOOKING_INFO.serial_no IS NOT NULL
THEN
UPDATE booking_chart
SET book_code = :BOOKING_CHART.book_code
, firm_code = :BOOKING_CHART.firm_code
, firm_name = :BOOKING_CHART.firm_name
, source_one = :BOOKING_CHART.source_one
, to_desti = :BOOKING_CHART.to_desti
, source_two = :BOOKING_CHART.source_two
, book_date = :BOOKING_CHART.man_no
, serial_no = :BOOKING_INFO.serial_no
, seat_no = :BOOKING_INFO.seat_no
, total_seats = :BOOKING_INFO.total_seats
, luggage = :BOOKING_INFO.luggage
, location = :BOOKING_INFO.location
, amount = :BOOKING_INFO.amount
, total_amount = :BOOKING_CHART.total_amount
WHERE book_code = :BOOKING_CHART.book_code
[color=red]AND serial_no = :BOOKING_INFO.serial_no[/color];
next_record;
END IF;
END LOOP;
Layout Style of BOOKING CHART is FORM and of BOOKING INFO is TABULAR.
If I want to update particular field from booking_info like for luggage YES from NO then it works as because I used AND operator in it but if i want to
add new row in booking info then its not working means i can add row in form but when i commit the data i can't find the new row. If i remove the AND operator then I can add new row but all other data also get changed.
Can anyone tell me whats wrong and sorry for writing the post in REPORTS
|
|
|
|
|
|
|
Re: Problem while generating the report [message #605659 is a reply to message #605658] |
Mon, 13 January 2014 03:41 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
That makes things more difficult than they should be. With data blocks, Forms does many tasks for you. With control blocks, you have to do everything (querying, inserting, updating, deleting) manually. Why did you make such a (bad) decision (i.e. using control blocks)? Although you could "fix" all problems you have, I believe that you'd be - in a long term - much more happy if you just rewrite the form from scratch, using Data Block Wizard this time, letting it create master-detail relationship.
|
|
|
|
Goto Forum:
Current Time: Mon Jan 06 19:30:18 CST 2025
|