Home » Developer & Programmer » Reports & Discoverer » How I control the Print job from Oracle Report [Most most urgent]
How I control the Print job from Oracle Report [Most most urgent] [message #138671] Fri, 23 September 2005 00:11 Go to next message
itroome
Messages: 34
Registered: June 2005
Location: DUBAI, UAE
Member

Salam

I need the gerus helps....

How I control hte print job from Oracle Report. The problem is that If I do a report and print out, there should not be allowed to any user to print again. Here I also want to control the user list who can print a report.

Kindly slove my problem as soon as possible. It is most most most urgent.

From
itroome@yahoo.com
itroome@hotmail.com
Re: How I control the Print job from Oracle Report [Most most urgent] [message #138894 is a reply to message #138671] Sun, 25 September 2005 03:24 Go to previous messageGo to next message
del_sandy
Messages: 22
Registered: February 2005
Location: Delhi
Junior Member

HI,
Use disableprint parameter and set it to YES in add parameter to prevent print reports.
You can control this parameter according to user.
Chears
Sandy
Re: How I control the Print job from Oracle Report [Most most urgent] [message #138952 is a reply to message #138894] Sun, 25 September 2005 23:50 Go to previous messageGo to next message
itroome
Messages: 34
Registered: June 2005
Location: DUBAI, UAE
Member

Salam

Thank for the quick answer, I have searched in Report Builder for disableprint Parameter but there is no builtin parameter. Would you help me, in steps. How I configure the disableprint and user parameter.


Thank for help.
Loooking for your kindness

itroome@yahoo.com
itroome@hotmail.com
Re: How I control the Print job from Oracle Report [Most most urgent] [message #138956 is a reply to message #138952] Mon, 26 September 2005 00:15 Go to previous messageGo to next message
del_sandy
Messages: 22
Registered: February 2005
Location: Delhi
Junior Member

Hi,
You can use this code........

declare
user varchar2(50);
plid paramlist;
Begin
user:=get_application_property(username);
plid :=create_parameter_list('Parmlist');
/* Either You can user Your User table or particular username to restrict Print permission, USERNAME1, USERNAME2 are the users to them you granted print report.*/
if user not in ('USERNAME1','USERNAME2',......) then
add_parameter('Parmlist','DISABLEPRINT',text_parameter,'YES');
end if;
..................
Your other parameters.
....................
run_product(reports,'ReportName',synchronous,runtime,filesystem,'Parmlist',null);
destroy_parameter_list('Parmlist');
end;
Chears
Sandy
Re: How I control the Print job from Oracle Report [Most most urgent] [message #139030 is a reply to message #138956] Mon, 26 September 2005 06:01 Go to previous messageGo to next message
itroome
Messages: 34
Registered: June 2005
Location: DUBAI, UAE
Member

salam

WOW ..... It is working now.. I can now disable the print option from report runtime time...

------------
Here is Scenario:

A report is run for a specific department number and a specific table is to be updated if the report is printed.

The specific table (print) contains the following columns:

Deptno Printed
# N

Requirement: change N to Y if the report record is printed for a specific department number #

SOLUTION DESCRIPTION:
=====================

Create a Report with the following steps:

1. Query : Select * from emp where deptno=:P_1 .
This will create a new user parameter called P_1.

2. Create LOVs for P_1 as distinct deptno.

3. Create a Parameter Form with DESTYPE and P_1.
Set initial value of DESTYPE as Preview.

4. In the after paramform trigger create the following:

begin
if :destype='Printer' then
update print set printed ='Y' where deptno=:P_1
commit;
end if;
return(true);
end;

NOTE: If the report is run to "preview", the report will need to be closed, then rerun with destype=printer in order for the table to be updated.
DISABLEPRINT can be set to yes so that the printer button is disabled.

4. Run this report by changing DESTYPE to Printer and selecting a deptno for P_1. Now, 'print' table is updated with 'PRINTED' column value set as Y for that particular deptno that the report was run against.

------------------

Here One problem exist. If user select the DESTYPE = 'SCREEN'/'PREVIEW' There is enable the print button. Now Usre can print. Now How I count and restrict unless I use the DESTYPE = 'PRINTER'. I want to give option to user for specific number of time.
Re: How I control the Print job from Oracle Report [Most most urgent] [message #493868 is a reply to message #138671] Thu, 10 February 2011 04:56 Go to previous message
anwar0302
Messages: 7
Registered: February 2011
Location: Dhaka
Junior Member
Hi,

Excellent solution, except a problem. User cannot control page numbers to print (i.e, page 1-10 bla bla bla). Or cannot choose printers other than default one. Basically, this solution sends the report to the printer assuming that user requests to print all pages to the default printer. I tried with the parameter PRINTJOB = YES to show the printjob dialog box. Can anyone help me on this?

-Anwar
Previous Topic: calling reports in 10g
Next Topic: Can I add a custom code on Printing
Goto Forum:
  


Current Time: Sat Apr 04 22:51:32 CDT 2020