Printing report directly from printer
Hi,
I need a small information.if any one of our guys can give me some info that would be great.
I am writing a ABAP report now. lets say when we write 'hello world' in code and F8 program o/p will show 'hello world' right. I need to print this through user default printer automatically...might be pop-up for confirmation would help.
Thanks in advance...
Raj
Hi Rich,
Calling program is
REPORT ZTESTRAJ1 .
parameters:p_date like sy-datum.
DATA: SELTAB TYPE TABLE OF RSPARAMS,
SELTAB_WA LIKE LINE OF SELTAB.
start-of-selection.
CLEAR SELTAB_WA.
MOVE: 'p_date' TO SELTAB_WA-SELNAME,
'P' TO SELTAB_WA-KIND, " PARAMETER
sy-datum TO SELTAB_WA-LOW.
APPEND SELTAB_WA TO SELTAB.
CLEAR SELTAB_WA.
MOVE: 'p_matnr' TO SELTAB_WA-SELNAME,
'P' TO SELTAB_WA-KIND, " PARAMETER
'1233344' TO SELTAB_WA-LOW.
APPEND SELTAB_WA TO SELTAB.
SUBMIT Ztestraj with p_date eq sy-datum
with p_uname eq sy-uname
with p_matnr eq '122333' and return.
if sy-subrc = 0.
write 'Printed'.
endif.
Here is the program Ztestraj
parameters:
p_matnr like mara-matnr,
p_date like sy-datum,
p_uname like sy-uname.
data: l_matnr like mcha-matnr.
start-of-selection.
l_matnr = p_matnr.
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
INPUT = l_matnr
IMPORTING
OUTPUT = l_matnr
EXCEPTIONS
LENGTH_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
WRITE: L_MATNR.
DATA: PARAMS LIKE PRI_PARAMS,
DAYS(1) TYPE N VALUE 2,
COUNT(3) TYPE N VALUE 1,
VALID TYPE C.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING DESTINATION = 'LOCL'
COPIES = COUNT
LIST_NAME = 'ZTESTRAJ'
LIST_TEXT = 'SUBMITTO SAP-SPOOL'
IMMEDIATELY = 'X'
RELEASE = 'X'
NEW_LIST_ID = 'X'
EXPIRATION = DAYS
LINE_SIZE = 80
LINE_COUNT = 120
LAYOUT = 'X_44_120'
SAP_COVER_PAGE = 'X'
COVER_PAGE = 'X'
RECEIVER = 'SAP*'
DEPARTMENT = 'System'
NO_DIALOG = 'X'
IMPORTING OUT_PARAMETERS = PARAMS
VALID = VALID.
IF VALID <> SPACE.
SUBMIT ztestraj TO SAP-SPOOL
SPOOL PARAMETERS PARAMS
WITHOUT SPOOL DYNPRO and return.
if sy-subrc = 0.
endif.
ENDIF.
Similar Messages
-
Printing Reports directly from to a printer via 10g forms (Linux)
Hi all,
I need to be able to print Reports directly from a form to a printer (bypassing the form output) on Linux (RHEL 5). The trick here is this is Linux, not windows so, wasn't sure how to deal with printers in this case.
I have the option working where I can run a report and set the options to "Cache" and PDF and it displays my outputted report directly in a new browser window w.
I use the SET_REPORT_OBJECT_PROPERTY, RUN_REPORT_OBJECT, and WEB.SHOW_DOCUMENT properly for the PDF in a window.
a.) I want to send them directly to a printer, preferably to a user's default printer on their PC, bypassing the output screen. How can I accomplish this?
b.) I also would like the ability to generate a PDF (bypassing the output on a browser window) and put the form in a specified directory on a client's PC (which is what I used in 6i Client/Server). I believe I need to utilitize the WebUtil to allow this to happen. Otherwise, I'm thinking I just build a queue for the user on the Linux server and build a screen that shows all the reports they've generated for the past X amount of days and let them open them up and print from there.
Any help (particulary for Part A) would be very beneficial.
Chris1)
if your app server is on a Linux server, for direct printing to work, the printer must be setup and accessible under Linux server using system-config-printer command, for PDF printout you probably want a postscript option checked
if you print to screen (PDF) and then use print option then your windows client machine must have access to the printer
2)
you must pass this printer name as part of the report parameters.
set_report_object_property(oRptObj, report_destype, Printer);
and
hidden_action := hidden_action ||'&report='|| cRptSrcFile; -- source of report program to call
hidden_action := hidden_action ||'&destype='|| cDesType;
hope this helps -
Print Crystal Report directly from C# without using Report Viewer
Hello All,
I need to print a crystal report directly to the printer without using ReportViewer in C#. I've a CrystalReport2(belowCode) which requires a query (Select * from JobHeader where JobNumber='J012345') to display all the data. I'm stuck with database connection
and putting all the data to DataAdapter in C# (Below Code). I also have 8 subreports in my CrystalReport2. Can somebody please give me hand on this? I'm struggling with it. Thanks.
Regards
using CrystalDecisions.CrystalReports.Engine;
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
namespace csharp_win_printtoprinter
/// <summary>
/// Summary description for Form1
/// </summary>
public class Form1 : System.Windows.Forms.Form
//CR Variables
ReportDocument crReportDocument;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.PrintDialog printDialog1;
private System.Windows.Forms.Button button2;
private System.Drawing.Printing.PrintDocument printDocument1;
private CrystalDecisions.Windows.Forms.CrystalReportViewer crystalReportViewer1;
private CrystalReport1 CrystalReport11;
private Chart Chart1;
/// <summary>
/// Required designer variable
/// </summary>
private System.ComponentModel.Container components = null;
public Form1()
// Required for Windows Form Designer support
InitializeComponent();
// TODO: Add any constructor code after InitializeComponent call
/// <summary>
/// Clean up any resources being used
/// </summary>
protected override void Dispose( bool disposing )
if( disposing )
if (components != null)
components.Dispose();
base.Dispose( disposing );
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor
/// </summary>
private void InitializeComponent()
this.button1 = new System.Windows.Forms.Button();
this.printDialog1 = new System.Windows.Forms.PrintDialog();
this.button2 = new System.Windows.Forms.Button();
this.printDocument1 = new System.Drawing.Printing.PrintDocument();
this.crystalReportViewer1 = new CrystalDecisions.Windows.Forms.CrystalReportViewer();
this.Chart1 = new csharp_win_printtoprinter.Chart();
this.CrystalReport11 = new csharp_win_printtoprinter.CrystalReport1();
this.SuspendLayout();
// button1
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button1.Location = new System.Drawing.Point(32, 56);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(160, 104);
this.button1.TabIndex = 0;
this.button1.Text = "Print Report No Choose Printer";
this.button1.Click += new System.EventHandler(this.button1_Click);
// button2
this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button2.Location = new System.Drawing.Point(272, 56);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(160, 104);
this.button2.TabIndex = 1;
this.button2.Text = "Choose Printer";
this.button2.Click += new System.EventHandler(this.button2_Click);
// crystalReportViewer1
this.crystalReportViewer1.ActiveViewIndex = 0;
this.crystalReportViewer1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.crystalReportViewer1.Cursor = System.Windows.Forms.Cursors.Default;
this.crystalReportViewer1.Location = new System.Drawing.Point(47, 188);
this.crystalReportViewer1.Name = "crystalReportViewer1";
this.crystalReportViewer1.ReportSource = this.CrystalReport11;
this.crystalReportViewer1.Size = new System.Drawing.Size(903, 296);
this.crystalReportViewer1.TabIndex = 2;
// Form1
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(1164, 505);
this.Controls.Add(this.crystalReportViewer1);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Name = "Form1";
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);
#endregion
/// <summary>
/// The main entry point for the application
/// </summary>
[STAThread]
static void Main()
Application.Run(new Form1());
private void button1_Click(object sender, System.EventArgs e)
crReportDocument = new ReportDocument();
//Create an instance of a report
crReportDocument = new CrystalReport2();
//Use error handling in case an error occurs
try
//Set the printer name to print the report to. By default the sample
//report does not have a defult printer specified. This will tell the
//engine to use the specified printer to print the report. Print out
//a test page (from Printer properties) to get the correct value.
System.Drawing.Printing.PrintDocument printDocument = new System.Drawing.Printing.PrintDocument();
crReportDocument.PrintOptions.PrinterName = printDocument.PrinterSettings.PrinterName;
//Start the printing process. Provide details of the print job
//using the arguments.
crReportDocument.PrintToPrinter(0 ,true , 1, 1);
//Let the user know that the print job is completed
MessageBox.Show("Report finished printing!");
catch(Exception err)
MessageBox.Show(err.ToString(), "Unexpected exception");
private void Form1_Load(object sender, System.EventArgs e)
private void button2_Click(object sender, System.EventArgs e)
//Open the PrintDialog
this.printDialog1.Document = this.printDocument1;
DialogResult dr = this.printDialog1.ShowDialog();
if(dr == DialogResult.OK)
//Get the Copy times
int nCopy = this.printDocument1.PrinterSettings.Copies;
//Get the number of Start Page
int sPage = this.printDocument1.PrinterSettings.FromPage;
//Get the number of End Page
int ePage = this.printDocument1.PrinterSettings.ToPage;
string PrinterName = this.printDocument1.PrinterSettings.PrinterName;
crReportDocument = new ReportDocument();
//Create an instance of a report
crReportDocument = new Chart();
try
//Set the printer name to print the report to. By default the sample
//report does not have a defult printer specified. This will tell the
//engine to use the specified printer to print the report. Print out
//a test page (from Printer properties) to get the correct value.
crReportDocument.PrintOptions.PrinterName = PrinterName;
//Start the printing process. Provide details of the print job
//using the arguments.
crReportDocument.PrintToPrinter(nCopy, false, sPage, ePage);
//Let the user know that the print job is completed
MessageBox.Show("Report finished printing!");
catch(Exception err)
MessageBox.Show(err.ToString());1. This is a VB.Net forum not a Visual C# forum. For Visual C# questions try this forum.
Visual C#
2. Crystal Reports are not supported by Microsoft. Therefore, unless somebody responding in the Visual C# forum has experience with whichever version of Crystal Reports you are using, you will probably not receive an answer in the Visual C# forum. SAP has
their own assistance for Crystal Reports using Visual Studio. You can try to find an appropriate forum to ask questions in at SAP in the below link.
SAP Community Network
La vida loca -
Print report directly from URL
i have SSRS report where i have prompt to enter to get data. once the data is populated i would like to print directly from the print option rather saving to pdf and print. My page settings format is setup to 9X11 size. with this i can save and print fine.
But if i print directly to print on A-4 right most part is not printing and looks like i have to change settings in my report. How do we print this kind of report correctly on A-4 size paper. Any help much appreciated.Hi SQL Instane,
Per my understanding that you want to print the report directly when click the print button and print on A-4, you have set the size to 9X11 and after print out, some of the part is not printing, right?
By default the size setting for print to A4 is 8.5X11 or 11X8.5, If you have changed to 9X11 and didn't set the body size of the report properly, it my cause the issue you are facing.
Details information below for your reference about how to do the size setting:
Change the report size setting to 8.5(Page Width)X11(Page height), you can also try to decrease the size of the "left margin" and "right margin" to increase the width.
Check the body size setting and maek sure they have the relationship as below:
Body Width + Left margin + Right margin <=Page width
Body height+ Top margin + Button margin <=Page height
If you have many columns and need to increase the width, you can also change the default setting "potrait" (8.5X11)to "Landscape"(11X8.5)
Article about the Pagination in Reporting Services for your reference:
http://msdn.microsoft.com/en-us/library/dd255278.aspx
If your problem still exists, please try to provide more details information.
Any problem, please feel free to ask.
Regards
Vicky Liu -
Print Report Direct from current PC
Hi
I want to print pre printed reports direct to dot matrix Printer without Concurrent Manager in requested PC ( Print from PC not from Server ) .
So , can i do that or not ?
Thanks,
Mohamed BadrIn general you have 2 options for printing.
1) print via the server printing queue
2) download/open the report and click the print button on your workstation
there is a 2 B option. If we are talking about a HTML based report you can modify the reports in such a way that you send a java script with it that starts the printing. However this is (A) not advisable and (B) somewhat experimental and not supported ;-)
If you want to know more about printing via javascript check this page: http://www.htmlgoodies.com/beyond/javascript/article.php/3471121/Print-a-Web-Page-Using-JavaScript.htm
Regards,
Johan Louwers. -
Run SBO report directly from SDK
Hi, is there a way to run an SBO report (for example Service Contracts) directly from SDK? The report should be given the necessary parameters too.
I know that i can call Service Contracts form, simulate a query to find the appropriate record and then simulate a click on print preview button. This way it will undoubtedly work.
But I would prefer opening the print preview directly, without the need of opening another form, that slows down the whole process. Is there a way to do this?Tamas,
There is currently not an object via the SDK to directly run a report. You would have to use the work around that you mentioned.
Eddy -
How to run reports directly from R/3 tables
We are about to implement BW but the client wants to run temporary reports directly off R/3 tables. How can this be accomplished? Do we just use business content or r there other ways?
ThanksI created a join of 3 tables using SQVI in BI 7.0. Nobody else but me can see this query join. Is there a way to save this to somwhere public, so others can access this view? Maybe "Save As"??
If possible, please provide steps to do this.
Thank in advance! -
Running Report Directly from SAP Menu
Hi ,
I have to know that , I have created a report and given it a transaction code . There is also a standard report which output almost the same result .
Now I want that standard report not to be shoen in the SAP menu on the left hand side and instead of it I want My reports transaction code to be visible so that the enduser is at an ease not to remember the Transaction code to run that report .
So how can I go for it ?
PLease advice .
Thanx & RegardsHi,
Have you looked transaction and screen variants (SHD0) or GuiXT solution?
For more information, please check this links.
http://help.sap.com/saphelp_nw04/helpdata/en/7d/f639fb015111d396480000e82de14a/content.htm
http://www.synactive.com
http://help.sap.com/saphelp_erp2004/helpdata/en/89/91b9d8194f11d5b3a30050dae02d7c/content.htm
http://service.sap.com/guixt
Hope this will help.
Regards,
Ferry Lianto
Please reward points if helpful. -
Very Urgent !! XMLP reports not printing directly from Oracle Apps.
Hi ,
We are not able to print XMLP reports directly from Oracle Applications(Concurrent Manager) to the printer.
We have checked the following setups and they are ok.
1. Have a Postscript ready printer.
2. PASTA has been installed and setup.
3. The printer type "--Pasta Universal Printer Type" is associated with the printer and that the seeded "PDF Publisher" print style and PASTA_PDF printer driver are associated with the printer type. Third party program "pdftops" has been installed in the instance.
4. pasta_pdf.cfg is present and that it contains an "uncommented" entry as follows:
preprocess=pdftops {infile} {outfile}
5. The XMLP Report also has print style as "PDF Publisher".
Initially, Step 5 was not being followed and the printer was printing the XML data instead of the pdf output.
Now, after changing it to PDF Publisher, nothing is coming as output to the printer.
I have checked that both the XML and pdf files are getting generated.
Does anyone have any idea what could be the problem? Any help is greatly appreciated.
Regards,
SatrajitHi Satrajit,
Please make sure you have pdftops is available on the server and in the PATH.
Please run following two commands.
$ which pdftops
$ which pdf2ps
Please use one of two commands you found in the server.
Please review Metalink Note 338990.1 for more details.
Thanks,
Shinji -
How to export an alv report directly to crystal report?
hi gurus,
we are looking for the possible ways of integrating alv and crystal report.
we want to keep the abap reports , because of the logical database and the selection screen, and
use alv to present the result data, if users want to tailor the layout we want to switch to crystal report directly from sapgui.
is that possible ?
thanks and best regards.
zjHi Eric,
Please check this link for sample code regarding LOGO to Excel
How to Download ALV Output LOGO to Excel ?
For Header to Excel check this link
Export header of alv-oo into excel
Hope this would help you.
Good luck
Narin -
When send the report directly to the printer from Oracle IDS 9i
Hi.....
I m using Oracle IDS 9i, Oracle AS 9i and Database 9i for my new project.But i m facing a problem when i m trying to show a report from oracle IDS 9i.When i send the report directly to the printer without showing it,then the printer connected to the application server is working.But the printer connected to with PC(From where a send the command) is not working but printer connected with AS is working,but not that one which one i m wanting.....Why this problem is happening?Can anyone help me?
KSINote:It is always better to have network based printers rather then PC shared printers. What that means is your printer is not connected to a PC. It has a direct connection to the network via NIC. You would then setup the printer on your AS in the printers setup. If the AS is rebooted you do not need to authenticate the printer shares again with a network based printer.
If I understand you correctly, you have a printer connected to your AS(application server) and a printer connected to your PC. You can submit a report direct to the printer connected to the AS but cannot send a report direct to your printer connected to your PC.
From the symptoms you described, the problem is usually associated with the AS not being able to see the printer shared on your PC. You either have the address to your printer address defined wrong or your AS is trying to direct a job to your printer but doesn't have rights to do it.
First, Try to print a notepad job to your printer attached to your PC from the AS. This will tell you if you have access to do so or not.
- If it can't, you need to figure out why? This has nothing to do with oracle.
Second, thing to check is your Oracle "Report Queue Manager" on the AS. Make sure that you can submit a report manually from the Report Queue Manager. If it fails the "Report Queue Manager" will give you useful errors as to why it failed. This will help you isolate the problem.
Third, Once you can submit a job from the reports queue manager manually to your shared printer you should be able to submit from your application direct. If it still does not work your address to the printer is incorrect. Try submitting manually through the reports queue manager again. When selecting printer you will be given a list of accessible printers from the AS. Select the one connected to your PC. Once selected the full network address will appear. Copy and use this as the printer location in your job submission through your application.
That's it... Where using this right now and it works great. Hope this helps.
Eric. -
How I can send a report directly to the printer "EPSON TMU 220" from form11
Dear,
I have a problem with Oracle Forms11g, I need send a report to the printer EPSON TMU-220 (Pos of sale printer) in the client machine.
Please, help.
Thanks
JCDear,
The problem is:
I need to send the report directly to printer. All other reports work fine with other printers in the network.
But the EPSON TMU-220, (I changed the card connection from COM to USB, and nothing)
Please, help me.
JC -
Print RDLC Report Directly to Printer with SubReports!
I am currently printing a report directly to the default printer using the code from this link.
http://msdn.AddHandler
ReportViewer1.LocalReport.SubreportProcessing, AddressOf SubreportProcessingEventHandler
and this code:
Public Sub SubreportProcessingEventHandler(ByVal sender As Object, ByVal e As SubreportProcessingEventArgs)
Dim zrpt = e.ReportPath
Select Case zrpt
Case "WOPartsSubReport"
Dim ds1 As New WOPartsSubReportDataSet
Dim da1 As New WOPartsSubReportDataSetTableAdapters.wopartsTableAdapter
da1.Fill(ds1.woparts)
e.DataSources.Add(New ReportDataSource("DataSet1", ds1.Tables("woparts")))
Case "WOLaborSubReport"
Dim ds2 As New WOLaborSubReportDataSet
Dim da2 As New WOLaborSubReportDataSetTableAdapters.wolaborTableAdapter
da2.Fill(ds2.wolabor)
e.DataSources.Add(New ReportDataSource("DataSet1", ds2.Tables("wolabor")))
Case "WOLockoutSubReport"
Dim ds As New WOLockOutSubReportDataSet
Dim da As New WOLockOutSubReportDataSetTableAdapters.wolockTableAdapter
da.Fill(ds.wolock)
e.DataSources.Add(New ReportDataSource("DataSet1", ds.Tables("wolock")))
End Select
End Sub
But now that I am NOT using a reportviewer how can I still get the subreports to work and still print directly to the printer? Where would I put the code to do that?
Thanks,
StacyHi Stacy,
Sorry for the delay.
It’s Christian that I have involved to help on this issue. Maybe the issue requires a more in-depth level of support. Alternatively, you could contact Microsoft Customer Support Services (CSS) via telephone so that a dedicated Support Professional can assist
you in a more efficient manner. Please understand that contacting phone support will be a charged call, but it will be free if this is a product issue. To obtain the phone numbers for specific technology request please take a look at the web site listed below:
http://support.microsoft.com/default.aspx?scid=fh;EN-US;PHONENUMBERS
Another option would be creating a thread on our Connect site:
http://connect.microsoft.com/sql.
Regards,
Mike Yin
If you have any feedback on our support, please click
here
Mike Yin
TechNet Community Support -
Print report directly to printer
I am using Crystal Reports XI R2 to generate reports in Powerbuilder. I want to know whether it is possible to print the report directly to a printer without displaying it in the Crystal Report viewer?
Thanks,
AmolI have a very similar problem, not being able to print a report directly to the printer.
But I am calling Crystal Reports v8.5 from VB6. I have tried the suggested code:
report.PrintOut(prompt user, numberofCopy, collated, startpage, endpage)
but get a "type mismatch" compiler error with "PrintOut" highlighted when compiling, eventhough the inline help shows this method and matching arguments.
I wonder if I have the correct DLL referenced.
This report runs fine thru the preview window, but since this is a series of reports about 100 pages, don't really want the user to have to specify print dozens of times.
Thanks,
Gene -
Form 6i printing report directly to printer
Hi Professionals,
I am in badly need of help to print my barcode report directly to printer from form, currently it is working fine if i make it preview first and then user has to select network printer to print, but user is not accepting that manual step, and therefore we are unable to launch our material management module.
MY CURRENT CODE WHICH WORKING FINE WITH PREVIEW..................
add_parameter(PL_ID, 'DESTYPE', TEXT_PARAMETER, 'PREVIEW');
add_parameter(PL_ID, 'MAXIMIZE', TEXT_PARAMETER, 'YES');
add_parameter(pl_id,'paramform',TEXT_PARAMETER,'NO');
add_parameter(pl_id,'STR',TEXT_PARAMETER,:IM_STR_ISSUE_MASTER.STR_CODE);
add_parameter(pl_id,'BAT',TEXT_PARAMETER,:IM_STR_ISSUE_DETAILS.BAT_ID);
add_parameter(pl_id,'DIV',TEXT_PARAMETER,:IM_STR_ISSUE_DETAILS.GRP_CODE);
add_parameter(pl_id,'GRP',TEXT_PARAMETER,:IM_STR_ISSUE_DETAILS.SUB_GRP_CODE);
add_parameter(pl_id,'ITM',TEXT_PARAMETER,:IM_STR_ISSUE_DETAILS.ITEM_CODE);
add_parameter(pl_id,'COPIES',TEXT_PARAMETER,:IM_STR_ISSUE_DETAILS.QTY);
RUN_PRODUCT(REPORTS,'F:\IMS\REPORTS\STOCK_IN_BARCODE.rep',SYNCHRONOUS,RUNTIME,FILESYSTEM,PL_ID);
IF I CHANGE IT TO THE FOLLOWING FOR DIRECT PRINTING IT IS NOT WORKING
ADD_PARAMETER(PL_ID, 'DESTYPE', TEXT_PARAMETER, 'PRINTER');
ADD_PARAMETER(PL_ID, 'DESNAME', TEXT_PARAMETER, 'SOLABEL');
I appreciate any efforts to resolve this issue.
Thanks
Ahon
Edited by: [email protected] on Oct 4, 2009 11:20 PMGuide to Implement local printing on client in 10gas/9ias
To archive this goal we have used orarrp(Oracle Reports Remote Printing Utility), which can be downloaded from the OTN website http://otn.oracle.com/sample/products/reports/index.html.
Steps:
1.Add the required ORARRP mime types to the Oracle HTTP Server configuration.
(Note: This will be the Oracle HTTP Server belonging to the Oracle Application Server 10g/9ias middle (BI & Forms) tier)
Do this manually by editing the httpd.conf
or
via the Oracle Application Server 10g AS Console e.g.
Navigate to the Middle Tier Components Page
Click on HTTP_Server -> Administration -> MIME Types
NOTE: MIME types added in httpd.conf are as per requirement mode in which report has to be run e.g. pdf, rt(rtf) and html etc. syntax for manual entry in httpd.conf is given below.
AddType application/x-orarrp-text rrpt
AddType application/x-orarrp-ps rrpp
AddType application/x-orarrp-pdf rrpa
AddType application/x-orarrp-rt rrpr
AddType application/x-orarrp-ini rrpi
AddType application/x-orarrp-html rrph
2. Create an aliasmatch in forms.conf pointing to a physical directory \tmp- for example, directory will be c:\tmp
Do this by manually editing the forms.conf
or
via the Oracle Application Server 10g AS Console e.g.
Navigate to the Middle Tier Components Page
Click on HTTP_Server -> Administration -> Advanced Server Properties -> forms.conf
Add a line like :
# Virtual path for physical directory of temp
AliasMatch ^/tmp/(..*) "C:\tmp/$1"
** IMPORTANT NOTE **
The advantages of making the changes via EM / AS console, rather than editing the files manually, are:
- the EM / AS console will put the mime type entries in the correct place
- the EM / AS console automatically issues a 'dcmctl updateconfig' which synchronizes the file changes with the Infrastructure Metadata Repository
- the EM / AS console will do the required restart of the HTTP Server component
(Only the HTTP Server needs to be stopped and restarted – Oracle AS 10g components can remain up and running)
If the changes are made manually then the following commands must be issued after the changes to httpd.conf and forms.conf have been made.
Run these command at run prompt
DRIVE:\oracle\FRHome_1\dcm\bin\dcmctl.bat updateconfig -ct ohs -v -d
(to synchronize the changes with the Metadata Repository)
DRIVE:\oracle\FRHome_1\dcm\bin\dcmctl.bat stop -ct ohs -v -d
DRIVE:\oracle\FRHome_1\dcm\bin\dcmctl.bat start -ct ohs -v -d
where DRIVE: is the drive where \oracle\frhome_1\ is installed.
3. Copy and run orarrp.exe on client machine in program files\orarrp\ folder.
4. Set value of options '”choose_printer=no” in orarrp.ini created at above folder.
5. Add following lines in your code of run_report procedure.
In declare section
vc_file varchar2(225);
In begin block add
/* Generate a pseudo unique filename */
vcfile:=:global.user_code||to_char(sysdate,'YYYYMMDDHHMISS');
vcfile:=vcfile||'.rrpr';
/* In this example - output will be rtf so adding .rrpr extension */
set_report_object_property(repid, report_filename,store_var);
set_report_object_property(repid, report_server, :global.r_server);
set_report_object_property(repid, report_execution_mode, batch);
set_report_object_property(repid, report_comm_mode, SYNCHRONOUS);
set_report_object_property(repid, report_destype, file);
set_report_object_property(repid, report_desformat,'rtf');
set_report_object_property(repid,REPORT_DESNAME,'C:\tmp\'||vcFile);
---- path can be made dynamic by making a database entry in makess.path_entry for tmp folder and
---using proc_path procedure from path lib.
:GLOBAL.PrintOutPut := vcFile;
In Run report section make following change:
vc_reportserverjob := RUN_REPORT_OBJECT(repid,pi_id);
report_job_id:=substr(vc_reportserverjob,length(:global.r_server+2,length(vc_reportserverjob));
v_rep_status:=report_object_status(vc_reportserverjob);
if v_rep_status='FINISHED' then
web.show_document('/tmp/'||:global.printoutput,'_blank');
else
message ('error when running report'||v_rep_status);
end if;
Edited by: amitphynyl on Oct 5, 2009 1:36 AM
Maybe you are looking for
-
Is there a standard report I can use to monitor specific asset master data fields? My customer updates the second description line in the asset master (ANLA-TXA50) for some business process they have. They would like to be able to have a report that
-
Oracle 9ias wireless libraries Please help me!!!1
i have downloaded jwe prerelease version.After i did required steps but i still can't use oracle.wireless.me.sql,soda,push,lbs,yplite libraries what must i do?Please help me
-
I am having problems installing Creative Suite 3 to my new Mac
I bought Creative suite 3 for my iMac a few years ago and recently have a new hard drive for my computer installed. Old contents were removed to an external memory. Now I can´t use my programs (photosho etc.) What to do?
-
Cance and Keep Workitem in Inbox
Hi, Is there any way to change the text of Cancel and Keep workitem Inbox to Exit Menu. I dont want to build custom Transaction i prefer using the standard user decision step. Regards, Swathi
-
When installing the new iTunes software, the message : "the older version of apple software update cannot be removed." What should I do? I tried deleting files related through control panel or the manual way, but it doesn't work. Am I missing somethi