Home » Developer & Programmer » Forms » NEED HELP, developing a database in oracle form 6i
NEED HELP, developing a database in oracle form 6i [message #547631] Thu, 15 March 2012 04:28 Go to next message
arshad_525
Messages: 2
Registered: March 2012
Junior Member
i need suggestion, i am developing a database in oracle form 6i . through receipt printer, i want generate auto slip. advice me which course give ability to help to solve my problem

Regards
Malik Arshad
Re: NEED HELP, developing a database in oracle form 6i [message #547638 is a reply to message #547631] Thu, 15 March 2012 05:10 Go to previous messageGo to next message
Littlefoot
Messages: 19536
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
As far as I understood, this:
Quote:

through receipt printer, i want generate auto slip

is the requirement. Unfortunately, I have no idea what "through receipt printer" means. Is it an output device (you know, a "printer", such as HP 4350 or Epson LQ-870 and similar)?

"Generating an auto slip" is ... what? You want to create a report ("slip"?) that will be printed on the printer? If so, I'd use Reports Builder. But, what is "auto slip"?

Could you describe it once again, providing some more details?
Re: NEED HELP, developing a database in oracle form 6i [message #547721 is a reply to message #547638] Fri, 16 March 2012 01:09 Go to previous messageGo to next message
arshad_525
Messages: 2
Registered: March 2012
Junior Member
first of all i ' m thankful to you for your reply. i am explaining our problem with the help of an example
for example
software used in petrol pump, when sales slip post in the system and click save button then two processes done, first save the record and second print a sales slip(using receipt printer).
Re: NEED HELP, developing a database in oracle form 6i [message #547750 is a reply to message #547721] Fri, 16 March 2012 04:40 Go to previous message
Littlefoot
Messages: 19536
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
First part is easy (enter some values, save them into the database).

The second part is kind of tricky; it would be piece of cake if you'd create a "normal" report (such as PDF), open it, select "Print" and actually print it. However, cases like yours require a different approach - users usually don't want to view the report, but want it out, on the printer, as soon as possible.

I've done that years ago with Forms 3.0 on OpenVMS, where the output was sent - in character mode - directly to a printer. Unfortunately, I wouldn't know how to do the same on "modern" operating systems (which one do you use, anyway?). If it is of any help to you, here's the code I used; it utilized HOST built-in which called the operating system script (PRINT_SLIP) that printed certain information (payment_id, customer_code, ...).

I modified the original code a little bit (translation to English, removed certain parts), but the majority is still here.

host('@print_slip ' ||
       to_char(:unos.payment_id, '990') || ' ' ||
      :unos.customer_code || ' ' ||
       translate(to_char(:unos.how_much_money, '99,990.00'), ',.', '.,') || ' ' ||
       to_char(:unos.datum, 'dd.mm.yyyy.')
       no_screen
    );


The PRINT_SLIP script used escape sequences (set the printer controller mode ON, wrote values onto the standard output (printer, in this case), turned the printer controller mode OFF at the end. I'm not sure you'd benefit from OpenVMS script, but ... here you are:

$ ! Print slip on COMPUPRINT MDP 40 B
$
$ ! <ESC>[5i - Printer controller mode ON
$ ! <ESC>[4i - Printer controller mode OFF
$ ! <ESC>[4m - Underline
$ ! <ESC>[0m - All attributes off
$ !
$ cls
$ write sys$output "<ESC>[2;2H <ESC>[1mMy Company" + P4 + "<ESC>[0m"
$ 
$ set term/past
$
$ write sys$output "<ESC>[5i"
$ write sys$output " "
$ write sys$output " " + "*" + P3 + "kn" + "#" + P1
$ write sys$output " " + P2 + " - " + P4
$ write sys$output "<ESC>[4i"
$
$ set term/nopast


Hopefully, someone else will be able to assist better than I do.
Previous Topic: How to open a URL from oracle forms ?
Next Topic: Data source for fields in a form
Goto Forum:
  


Current Time: Mon Sep 01 16:28:36 CDT 2014

Total time taken to generate the page: 0.06057 seconds