Home » Developer & Programmer » Forms » its urgent pleaseeeeeeeee :(
its urgent pleaseeeeeeeee :( [message #134419] Wed, 24 August 2005 17:52 Go to next message
ribha
Messages: 17
Registered: August 2005
Location: pakistan
Junior Member


hello sir,
well i have some problems
i pass parameters from FORM to REPORT and i want to take print out of that REPORT without viewing it.


i have PRINT Button on Form and i write following code to pass parameter but i dont know how to send print command directly to Printer without viewing report

DECLARE
pid ParamList;
pname VARCHAR2(10):='tempdata';

BEGIN
pid :=Get_Parameter_List(pname);
if Id_null(pid) then
pid :=Create_Parameter_List(pname);
else
Destroy_Parameter_List(pid);
pid :=Create_Parameter_List(pname);
end if;

Add_Parameter(pid,'EMP_NUMBER',TEXT_PARAMETER,to_char(:empno));
Add_Parameter(pid,'EMP_NAME',TEXT_PARAMETER,:ename);
Add_Parameter(pid,'EMP_JOB',TEXT_PARAMETER,:job);
Add_Parameter(pid,'PARAMFORM',TEXT_PARAMETER,'NO');
RUN_Product(REPORTS,'C:\Documents and Settings\shumaila\My Documents\Report2',SYNCHRONOUS,RUNTIME,FILESYSTEM,pid,'NULL');
END;

and then print it and i m not using network printer i m using Local printer

please tell me how can i do it

Re: its urgent pleaseeeeeeeee :( [message #134429 is a reply to message #134419] Wed, 24 August 2005 22:50 Go to previous messageGo to next message
sanaafridi
Messages: 50
Registered: August 2005
Location: pakistan
Member


hello ribah
it's not diffcinult just write down the following code so
ur report will be printed inshaullah


Add_Parameter(pl_id, 'DESTYPE', TEXT_PARAMETER, 'PRINTER');
Add_Parameter(pl_id, 'DESNAME', TEXT_PARAMETER, 'printer name');

if ur requirment is to show the priview so u can have two buttons one for privew and other for print

i hpe it wil work

sana afridi
Re: its urgent pleaseeeeeeeee :( [message #134474 is a reply to message #134429] Thu, 25 August 2005 02:28 Go to previous messageGo to next message
ribha
Messages: 17
Registered: August 2005
Location: pakistan
Junior Member


well it's not working can you tell me what is DESTYPE and DESNAME. and i use HP Deskjet 3740 Series so what i wrote Printer name field

Add_Parameter(pid, 'DESTYPE', TEXT_PARAMETER, 'PRINTER');
Add_Parameter(pid, 'DESNAME', TEXT_PARAMETER, 'HP3740');


can any one help me.....
Re: its urgent pleaseeeeeeeee :( [message #134509 is a reply to message #134474] Thu, 25 August 2005 05:56 Go to previous messageGo to next message
sanaafridi
Messages: 50
Registered: August 2005
Location: pakistan
Member

Desname mean destination name and Destype mean Destination type

check out your printer name go to printer there u can find the name of ur printer specified by the system
or when u print something like in ms word so after giving the print command u can see ur printer name.


Add_Parameter(pid, 'DESNAME', TEXT_PARAMETER, 'HP3740');

rest of the code is fine

come back in case

reagrds

sana afridi
Re: its urgent pleaseeeeeeeee :( [message #134557 is a reply to message #134509] Thu, 25 August 2005 09:33 Go to previous messageGo to next message
imtiazmasud
Messages: 49
Registered: May 2005
Location: Bangladesh
Member

Hei man,
I did that solution worked....please reply....imtiaz

[Updated on: Thu, 25 August 2005 09:34]

Report message to a moderator

Re: its urgent pleaseeeeeeeee :( [message #134570 is a reply to message #134557] Thu, 25 August 2005 10:17 Go to previous messageGo to next message
ribha
Messages: 17
Registered: August 2005
Location: pakistan
Junior Member

yeah its working now thanks alot Smile
Re: its urgent pleaseeeeeeeee :( [message #134572 is a reply to message #134570] Thu, 25 August 2005 10:27 Go to previous message
imtiazmasud
Messages: 49
Registered: May 2005
Location: Bangladesh
Member

hi ribha,
I suffered a lot with this problem but when I got this solution..then I was amazed...bye...imtiaz

[Updated on: Thu, 25 August 2005 10:29]

Report message to a moderator

Previous Topic: Calling System owned functions
Next Topic: about when text item changed --need a trigger in dev.
Goto Forum:
  


Current Time: Fri Sep 20 03:22:47 CDT 2024