This topic describes how to control the user's printer by report development.
Generally speaking, the Oracle Reports Server cannot influence the user's print preferences. However Repexpert provide an simple way to get parameters from Report Server.
You can edit the "Before Report Value" of report, input some special string, specify the paper size or margins.
These special strings will be passed to RepExpert, and then RepExpert will print out with your default settings.
Assign printer and paper size when developing RDF |
Repexpert may choose default printer as destination printer by default. you can modify RDF file to assign a printer.
Step 1 Open a RDF file. Open "Property Palette" window of report.
Step 2 In the "Before Report Value"
input box, input some special string looks like :
<!--REPEXPERT?printer=[printer
name]-->
<!--REPEXPERT?papersize=[paper size]-->
You can specified your appreciative printer by replace [printer
name] with name of the printer.
(e.g. '<!--REPEXPERT?printer=Epson
LQ-1600K -->'
)
You can also specify default paper size, replace [paper
size] with the name the paper size.
(e.g. <!--REPEXPERT?papersize=US
Std Fanfold-->)
Tip: Perhaps you don't know the name of printer, please use this button to get the printer name.
Click the "Before Report Value" button in the Print dialog, you will get the strings for Before Report Value field of your RDF file.
Assign printer when running report |
You may want to specify the printer by your program at run time.
Just try the folling steps.
1. Open a RDF file. Open "Property Palette" window of report.
In the "Before Report Value" input box,
input some special string looks like :
<!--REPEXPERT?printer=&p_printer-->
2. Please append p_printer parameter in the URL, the URL looks like:
http://www.server-name.com/get-report-script?server=rep_svr&report=test_report.rdf&userid=scott/tiger@test&destype=cache&desformat=HTMLCSS&p_printer=receipt01
3. The RepExpert will get the value of p_printer parameter from the URL, and then output report to this printer.
Other options |
You
can also assign default paper orientation. in development period
by adding one of following 2 String to "Before Report Value" input
box,
Options:
<!--REPEXPERT?orientation=portrait-->
<!--REPEXPERT?orientation=landscape-->
<!--REPEXPERT?margin_left=[width
of margin]inch-->
<!--REPEXPERT?margin_right=[width of margin]inch-->
<!--REPEXPERT?margin_bottom=[width of margin]inch-->
<!--REPEXPERT?margin_top=[width of margin]inch-->
You are able to specify the margins in inch of current report, if you do not specify, the margin will be set to 0 .
e.g.
<!--REPEXPERT?margin_left=0.6inch-->
<!--REPEXPERT?margin_right=0.2inch-->
<!--REPEXPERT?margin_bottom=0.5inch-->
<!--REPEXPERT?margin_top=1.5inch-->