Home » Developer & Programmer » Forms » Need help to write code for print button.........!
Need help to write code for print button.........! [message #264425] Mon, 03 September 2007 05:01 Go to next message
james_aron
Messages: 32
Registered: July 2007
Location: chennai
Member
Hi all,
I am working in oracle forms 6i.I am creating forms for ordering product/quantity(Entering quantity/product details). In my form i have "Print button" to print the quantity details which is in multi-record block(database item).Please help me of how to write code for print button. If u had any source code please post it.

Please help asap......!

Thanks

regards,
jame
Re: Need help to write code for print button.........! [message #264459 is a reply to message #264425] Mon, 03 September 2007 07:33 Go to previous messageGo to next message
bbaz
Messages: 138
Registered: April 2007
Senior Member
Posting the Source Code is as doing the job for other people, this is not how this FORUM works, we are all here to help each other find solution and not to do the job for other people.

Kindly send a screen shot, FMB file, or provide more description in order to make it easier for others to understand your problem/request.

Thanks,
Baz
Re: Need help to write code for print button.........! [message #264498 is a reply to message #264459] Mon, 03 September 2007 10:03 Go to previous messageGo to next message
Soumen Kamilya
Messages: 128
Registered: August 2007
Location: Kolkata
Senior Member

In my suggestion, you can build a report and call it using that print button to print directly..

Cheers
Soumen
Re: Need help to write code for print button.........! [message #264608 is a reply to message #264425] Mon, 03 September 2007 22:56 Go to previous messageGo to next message
james_aron
Messages: 32
Registered: July 2007
Location: chennai
Member
baz thanks for ur reply, i agree with ur words but here i am practising forms also i am new to forms,thats y i asked for source code

below is my file....!


thanks,
jame

[Updated on: Mon, 03 September 2007 23:07]

Report message to a moderator

Re: Need help to write code for print button.........! [message #264612 is a reply to message #264498] Mon, 03 September 2007 23:09 Go to previous messageGo to next message
james_aron
Messages: 32
Registered: July 2007
Location: chennai
Member
hi Soumen,
Thanks for ur suggestion, Is any-other way is there to print data directly from multi-record blocks(database item). If so please guide me.


Thanks,
jame
Re: Need help to write code for print button.........! [message #264920 is a reply to message #264425] Wed, 05 September 2007 00:56 Go to previous messageGo to next message
danishayder
Messages: 5
Registered: September 2006
Location: Karachi
Junior Member

For Simple Report

Run_Product(REPORTS, 'LE_M5031.REP', SYNCHRONOUS, RUNTIME,
FILESYSTEM, 'Null');

For Parametric Report
Suppose we have a report in which we passes deptno and hire date. Report will show List of employess Appointed in those Dated.

declare
plist Paramlist;
begin
plist := create_parameter_list('SLCL');
add_parameter(plist,'sdate',text_parameter,:sdate);
add_parameter(plist,'edate',text_parameter,:edate);
add_parameter(plist,'Dno',text_parameter,:Dno);
add_parameter(plist,'paramform',text_parameter,'NO');
--add_parameter(plist,'destype',text_parameter,'PRINTER');
Run_Product(REPORTS, 'LE_M5031.REP', SYNCHRONOUS, RUNTIME,
FILESYSTEM, plist);
destroy_parameter_list(plist);
end;

Things to be note

sdate and edate are the paremeters declare in the report .
:Sdate and :edate are the text item use in datablock

'Dno' also a parameter declare in Report and :Dno use in data block.

once on enter the data the respective field i.e Sdate Edate and P
these parameter fetch into reports Parameters and Report Runs

Regards
Danish Hayder

Re: Need help to write code for print button.........! [message #264992 is a reply to message #264920] Wed, 05 September 2007 03:47 Go to previous messageGo to next message
james_aron
Messages: 32
Registered: July 2007
Location: chennai
Member
hi danishayder,
Thanks for ur reply but i want to print data directly from blocks, not from reports.Is it possible to print data directly from blocks please let me know.......


regards,
jame


Re: Need help to write code for print button.........! [message #265002 is a reply to message #264992] Wed, 05 September 2007 04:10 Go to previous messageGo to next message
Soumen Kamilya
Messages: 128
Registered: August 2007
Location: Kolkata
Senior Member

From the block you can't be able to print the data directly to the printer. Oracle Forms not have that provision to print directly. Try the other ways.

Cheers
Soumen
Re: Need help to write code for print button.........! [message #265013 is a reply to message #265002] Wed, 05 September 2007 04:29 Go to previous messageGo to next message
james_aron
Messages: 32
Registered: July 2007
Location: chennai
Member
hi all,
Thank u very much for ur replies. I got very good guidence/response from all the blockers.......


Many thanks,
jame
Re: Need help to write code for print button.........! [message #266171 is a reply to message #264992] Mon, 10 September 2007 01:46 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
If you want to print directly from a block then consider using 'utl_file' to print the material to a flat file and then print the flat file. Alternatively, look at the 'print' command which will do a screen dump.

David
Re: Need help to write code for print button.........! [message #266248 is a reply to message #266171] Mon, 10 September 2007 05:02 Go to previous messageGo to next message
james_aron
Messages: 32
Registered: July 2007
Location: chennai
Member
hi David,
I am working in forms6i client/server application and with windows xp. can u explain of how to create flat files and utl_file.

< then consider using 'utl_file' to print the material to a flat < file and then print the flat file

regards,
jame
Re: Need help to write code for print button.........! [message #266924 is a reply to message #266248] Wed, 12 September 2007 00:49 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Search this forum for 'utl_file' and 'text_io'.

David
Previous Topic: How to Run Forms from Internet
Next Topic: win_api_environment.read_registry help needed, urgent.
Goto Forum:
  


Current Time: Sat Dec 10 16:57:16 CST 2016

Total time taken to generate the page: 0.10096 seconds