Accessing Printer name from Registry
Hi,
I am trying to use the following program to get the Printer name from my Registry.. this program has been taken from Forums.
package yourpackage;
import java.awt.Graphics;
import java.awt.print.PageFormat;
import java.awt.print.Printable;
import java.awt.print.PrinterException;
import java.awt.print.PrinterJob;
import oracle.forms.ui.VBean;
import oracle.forms.properties.ID;
public class printDialog extends VBean
private static final ID PRINTER = ID.registerProperty("PRINTER");
public printDialog()
class PrintObject implements Printable
public int print (Graphics g, PageFormat f, int pageIndex)
return NO_SUCH_PAGE;
public Object getProperty(ID id)
if (id == PRINTER) {
PrinterJob job = PrinterJob.getPrinterJob();
job.setPrintable(new PrintObject());
if (job.printDialog())
return job.getPrintService().getName();
} else {
return null;
} else {
return null;}
This program when compiled gives me the error as
Error(32,12): method getPrintService() not found in class java.awt.print.PrinterJob
I did set the project settings from Project-Project Settings and included Oracle Forms Libraries. But I still continue to get the error.
What is the relevant class that I have to add and also how will I add it as I am a bit new to JDev.
Early response would be highly appreciated
Thanks a lot for your time and help
Narain.
Narain,
the code is from Oracle Forms and wont run in any other context. The code used within this sampel is teh Java printing services API available in Java 1.4.
http://java.sun.com/j2se/1.4.2/docs/guide/jps/spec/JPSTOC.fm.html
Frank
Similar Messages
-
Reading the printer name from the registry
Hi,
I am trying to use the following program to get the Printer name from my Registry.. this program has been taken from Forums.
package yourpackage;
import java.awt.Graphics;
import java.awt.print.PageFormat;
import java.awt.print.Printable;
import java.awt.print.PrinterException;
import java.awt.print.PrinterJob;
import oracle.forms.ui.VBean;
import oracle.forms.properties.ID;
public class printDialog extends VBean
private static final ID PRINTER = ID.registerProperty("PRINTER");
public printDialog()
class PrintObject implements Printable
public int print (Graphics g, PageFormat f, int pageIndex)
return NO_SUCH_PAGE;
public Object getProperty(ID id)
if (id == PRINTER) {
PrinterJob job = PrinterJob.getPrinterJob();
job.setPrintable(new PrintObject());
if (job.printDialog())
return job.getPrintService().getName();
} else {
return null;
} else {
return null;}
This program when compiled gives me the error as
Error(32,12): method getPrintService() not found in class java.awt.print.PrinterJob
I did set the project settings from Project-Project Settings and included Oracle Forms Libraries. But I still continue to get the error.
I understood from the web that I need to put PrintService class which downloaded from the web as part of jnlp.jar
How should I set this if this is the correct one?
Early response would be highly appreciated
Thanks a lot for your time and help
Narain.Narain,
I could swear I answered this on teh Jdeveloper forum ;-)
The prin service is part pf Java 1.4, which means that it is not available in JInitiator today. Use the Java Plugin 1.4 and the required classes are present. JNLP stands for Java Network Launching Protocoll and has nothing to do with what you want to achieve.
In addition, to read the printer names from Forms your jar file has to be signed.
Frank -
Remove Printer Name from Crystal Report
How can i remove the printer name from the Crystal Report so that the PrinterName property of the CRAXDRT.Report object in the RDC SDK is blank WITHOUT having the "No Printer" Option checkbox checked?
Here's the scenerio. When I first create a Report and don't go into Page Setup, PrinterName property is blank. If I go into Page Setup and explicitly select a printer, PrinterName property equals the name of the printer selected. If I check the "No Printer" checkbox in Page Setup, PrinterName property is blank. But if i go back in and uncheck the "No Printer" checkbox in Page Setup, the PrinterName property equals the name of my Windows Default Printer.I'm still not sure what is unclear about my first question. And I'm not sure how any of the info you are requesting is going to make any difference in answering my question. And I'm not sure how your analogy fits here but ..
Version of CR = 11.0.0.895
CR Service Packs applied = None
Web or Win app? = Win App
OS? = Windows XP Service Pack 3
Development language? = Both Visual Basic 6 and C#.Net 2008
Method of CR files deployment = email the .RPT file to a client
Where were the runtime files downloaded from? = Runtimes are installed from Merge Modules donwload from SAP site
What is the version of the craxdrt.dll on the deployed box? = 11.0.0.893
So here are the exact steps so you can understand what is going on:
I have the Crystal Reports Application open side-by-side with my Visual Basic development environment in debug mode so i can step through the code using the RDC SDK.
1. I open the Crystal Reports Application and create a brand new report - "Test.RPT" and DO NOT go into Page Setup at all and save the report.
2. In my Visual Basic development environment, i run the code that will generate the report, Here's the exact code
Dim m_crApp As CRAXDRT.Application
Dim m_crReport As CRAXDRT.Report
Set m_crApp = New CRAXDRT.Application
Set m_crReport = New CRAXDRT.Report
Set m_crReport = m_crApp.OpenReport("Test.RPT")
3. When i look at the PrinterName property in the CRAXDRT.Report object, it is blank.
ie. crReport.PrinterName is equal to ""
4. I reopen the Crystal Reports Application with report "Test.RPT" and go into Page Setup and check the "No Printer" option.
5. I go back into my Visual Basic development environment and rerun the code that will generate the report.
6. When i look at the PrinterName property in the CRAXDRT.Report object, it is still blank.
ie. crReport.PrinterName is equal to ""
7. I reopen the Crystal Reports Application with report "Test.RPT" and go into Page Setup and uncheck the "No Printer" option. I have NOT specified any printer, nor have i clicked the "Printer..." button to setup a printer....i have just unchecked the "No Printer" option
8. I go back into my Visual Basic development environment and rerun the code that will generate the report.
9. When i look at the PrinterName property in the CRAXDRT.Report object, it is now set to my WINDOWS DEFAULT PRINTER, yet i had not specified any printer.
ie. crReport.PrinterName is equal to "
MyNetwork\MyPrinter"
PROBLEMS:
1. The client needs the report to go to the default windows printer of their machine
2. If the "No Printer" Option is checked, the Report does not print at all
3. If the report is set to MY default windows printer and i give it to the client, at times it takes upwards of to a minute for the Print Dialog to disply. As i've read on other forum posts, it appears Crystal is looking for MY printer on the clients machine and takes a minute before i realizes it can't find it and then sets it to the CLIENTS default windows printer.
4. The client believes it is unreasonable to wait a minute for the print dialog to appear ...and i agree.
5. I cannot change the code to use the Select Printer in the RDC SDK - it's a long explanation why but just suffice it to say that i cannot do this.
All i want to do is either:
1. Remove the Printer Name in the actual report from the Crystal Reports designer - basically undoing what Crystal did when i went into Page Setup.
2. Via the RDC SDK, be able to detect the "No Printer" option is selected. Checkign CRAXDRT.PrinterName equal to "" is not an option. -
Problems accessing Web service from registry server
"Hi,
While trying to develop a dynamic webservice, I encounter some problems.
The details are as follows:
I develop a webservice with following interfaces and implementation
classes:
Interface : pricequote.IPriceQuote
Implementation : pricequote.PriceQuoteImpl
The service does get registered on the XINDICE registry server. ( I am
using JWSDP to develop the above), and also is deployed on the tomcat
server.
I have specified the following path for the service end point:
http://localhost:8080/PriceQuoteService/pricequote/IPriceQuote
But when I call the sayHello(String strName) method, I get the following
error:
[java] java.rmi.RemoteException: cannot connect to server: /PriceQuoteServi
ce/pricequote/IPriceQuote; nested exception is:
[java] cannot connect to server: /PriceQuoteService/pricequote/IPriceQu
ote
[java] at pricequote.IPriceQuote_Stub.sayHello(IPriceQuote_Stub.java:76
[java] at pricequote.PriceQuoteClient.getData(Unknown Source)
[java] at pricequote.PriceQuoteClient.main(Unknown Source)
[java] Caused by: cannot connect to server: /PriceQuoteService/pricequote/I
PriceQuote
[java] at com.sun.xml.rpc.client.http.HttpClientTransport.invoke(HttpCl
ientTransport.java:119)
[java] at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.
java:73)
[java] at pricequote.IPriceQuote_Stub.sayHello(IPriceQuote_Stub.java:59
[java] ... 2 more
BUILD SUCCESSFUL
Total time: 3 secondsNo..
Not able to to open the WSDL either..Getting HTTP status 404..
The location http://localhost:8080/PriceQuoteService does open, though it doesnt't have any web pages. The organization data is accessible from registry-server also.
---Original Message----
are you able to access this endpoint through a browser
what happens when you do
http://localhost:8080/PriceQuoteService/pricequote/IPri
eQuote?WSDL
using IE ? do you see the WSDL in your IE window ?
Do you see the port info getting populate under the
service section at the base of the WSDL ? -
Read reportsserver - name from registry or from system into forms 10g
Hi
I want to read the entry of reportsserver from registry or from the system into forms 10 g because the same form is testing and running on different hosts/ AS
work on XP
how to do ?
thank you
NorbertAdd a new environment variable in your default.env file (or whichever .env your config is using):
MY_REPORT_SERVER_NAME=REP_MY_IAS_SERVER
You can then use:
declare
var varchar2(2000);
begin
tool_env.Getvar('MY_REPORT_SERVER_NAME', var);
message(var);message(var);
end;
You don't need Webutil to do this.
Richard -
Dynamically access item names from plsql block?
hi folks - is it possible to access the block/item names inside a form, from a plsql block within the form? does that make sense, probably not, it's gone 5pm and my brains fried today.
I want to try and control access to various items from within a back end table. Then in the form startup, I wanted to loop through the item names, fire them through to a check_access() function, and display or hide them depending on the result.
does that sound possible, to get the item names at runtime, or do I have to hard code each item name I want to pass to the function?
ps. forms 10g
thanks.yes! check it out:
Looping Through Items in a Data Block -
Printer name "ARCH" not defined - Archive printer
Hi,
We are trying to archive some FI objects and store it in the documentum.We have defined the ARCH printer as per SAP guidelines (Device type ARCHLINK, Access method- Archiving Device). While selecting the printer in transaction SARA for the archiving it was giving error message 'Printer name "ARCH" not defined'. The information on the error message is given below. But the printer is already exists in table TSP03. Checked note 639149 authorizations are in place and the printer is already added in content repository thru OAC0. Also note 739828 referred and the prerequisites required are in place. We use ECC 6.0 NW 7.01 release.
Please provide some inputs, all inputs to solve this issue is welcome.
Printer name "ARCH" not defined
Message no. PT001
Diagnosis
Table TSP03 contains all valid printer names. The printer name specified here does not exist in the table.
Procedure
Enter a valid printer name from table TSP03. You can define new printers using the spool administration function.
Thanks in advance.
rgds,
ShylWhen we use any other printer which is not defined as Access method -I Archiving device then we are able to select the printer and continue
Thats the way it should be
But the intention here is to use the Archiving program (in Device class of SPAD) and continue with Archiving the print lists. So for that we have to make the printer working for Archiving mode
The spool parameters are for the background job, you cannot use Method I for it, you already set the output method in OAC0 for the print lists.
Also regarding the selection of 'Send to SAP spool' and 'Print Immediately'' we will be able to select this in the 'Properties' but the error message appears before that and no further selection possible.
As I mentioned before you need to use a common printer for the background job spool.
Regards
Juan -
To change the printer name while printing the invoice
Hi,
I have a requirement like if there is already an entry in NAST table with o/p type ZURD and printer name USJC-PM03,then an error message has to be displayed like 'This Output already printed in USJC-PM03,Change the printer name 'USJC-PM03' to 'LOCL' and then print' on the vf03 screen.
But even if I change the printer name from 'USJC-PM03' to 'LOCL',it is showing the same error message.This message should not be shown.
I have used the following code in the program.
lf_formname = tnapr-sform.
determine print data
PERFORM set_print_data_to_read USING lf_formname
CHANGING ls_print_data_to_read
cf_retcode.
IF cf_retcode = 0.
select print data
PERFORM get_data USING ls_print_data_to_read
CHANGING ls_addr_key
ls_dlv-land
ls_bil_invoice
cf_retcode.
ENDIF.
IF sy-tcode = C_VF03.
SELECT SINGLE * FROM tnapr WHERE kschl = 'ZURD'
AND nacha = 1
AND kappl = 'V3'.
SELECT count(*)
FROM NAST
INTO lv_count
WHERE objky = ls_bil_invoice-hd_gen-bil_number
AND kappl = c_v3
AND kschl = c_ZURD
AND ldest = c_PM03.
IF LV_COUNT GE 1.
Message e000(zup) with text-001 text-002 text-003.
ELSE.
determine smartform function module for invoice
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING formname = lf_formname
variant = ' '
direct_call = ' '
IMPORTING fm_name = lf_fm_name
EXCEPTIONS no_form = 1
no_function_module = 2
OTHERS = 3.
call smartform invoice
CALL FUNCTION lf_fm_name
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = ls_control_param
mail_appl_obj =
mail_recipient = ls_recipient
mail_sender = ls_sender
output_options = ls_composer_param
user_settings = space
is_bil_invoice = ls_bil_invoice
is_nast = nast
is_repeat = repeat
importing document_output_info =
*Uncomented the line to get the spool id or OTF formatted data -
*NY047532
IMPORTING
job_output_info = w_job
NY047532
job_output_options =
EXCEPTIONS formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
ENDIF.
ENDIF.
When should be done for the error message not to be shown when the printer name is 'LOCL'.Hi,
Here my requirement is first the user has to check the nast table if there is any entry with o/p type ZURD and printer 'USJC-PM03' .If there is an entry then an error message 'This Output already printed in USJC-PM03,Change the printer name 'USJC-PM03' to 'LOCL' and then print' has to be displayed.
Then if i close this popup window which is showing error message and change the printer name from 'USJC-PM03' to 'LOCL', and click on execute button,the printer name is not getting changed and still the error message is getting displayed.How to remove this error message? -
Geting a name from a button I just pressed
Hi !
I tried to use this._name to get the name on a button in one
of my movieclips. but that just gives me the name of the movieclip.
I tried to access the name from within the button but I can't post
any scripts in the buttons scriptpanel. how will I get the name
otherwise?
/MikaelDefine it as a function instead of adding the handler
directly to the
button. If your buttons instance name is btnOne then place
this on the
timeline of the clip it's contained in:
btnOne.onRelease = function(){
trace(this._name);
Dave -
Head Developer
www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/ -
Splwow64.exe crash accessing printer properties page
Accessing the printer properties page fails in all instances.Some programs just crash with no error message, others do not crash, yet give the error: "C:\Windows\Splwow64.exe Function address 0x3506b9e2 caused a protection fault (exception code 0xc0000005) Some or all property pages may not be displayed" I have gone through the steps outlined here with no success. http://h30434.www3.hp.com/t5/Printing-Issues-Troubleshooting/hp-laserjet-1536dnf-MFP-printer-properties-window-flashes/td-p/3086811 I should note that I can still print...I just cannot access the printer property pages under any circumstances. Also, attempting to access printer properties via control panel > devices and printers crashes Windows explorer. Accessing printing preferences from the same location does nothing. Will not open. Thank you.
Hi , Welcome to the HP Forums! I noticed that you are unable to access the printer properties page, for your HP Laserjet 1536dnf MFP printer, on Windows 7. I am happy to help! Please try the following steps within this order: Uninstall the software. Uninstalling the Printer Software.Clean boot the computer. How to perform a clean boot in Windows.Disable any Antivirus programs. Disable Antivirus software.Disable any firewall programs. Turn Windows Firewall on or off.Create a new user account. Managing User Accounts and Logins (Windows 7).Reinstall using the HP LaserJet Pro M1536dnf Multifunction Printer Drivers.. Then run the HP Print and Scan Doctor, to verify everything is working properly. Hope this resolves your issue! “Please click the Thumbs up icon below to thank me for responding.”
-
how can i print specific pages against searched word or name (in one print command) from 1000 pages
Thanks, Alex!
ok, I try first approach in print4.vi, but Labview return an error (view jpg); if I cut From, To controls, the VI print all pages. The same things happen also if I trasform I32 in Variant.
I don't try second approach, because at this time I have only one report
I try also with VB macro: this is better (print3.vi) but.....if I use:
Sub Print_Pages_From_To()
ActiveDocument.ActiveWindow.PrintOut Range:=wdPrintFromTo, From:="2", To:="3"
End Sub
is ok; print the pages selected; if I use:
Sub PrintPages()
ActiveDocument.ActiveWindow.PrintOut Pages:="2-3"
End Sub
printer print all pages.
what do you think?
regards,
Italo
Attachments:
print Problem.jpg 39 KB
print4.vi 19 KB
print3.vi 19 KB -
Printer name is Truncated while creating TO in WM area from QM notification
Dear All,
While creating transfer order(WM) from QM notification. I am getting error "device <printer name> does not exist". Even though printer name is available i am getting this error. When the length of printer name is greater than 4 only i am facing this error.
while checking the screen 3000 in program SAPLQMLR . Field LTAP-LDEST is not checked for Scrollable option. Where as the same field is used in WM T.code LT01 there scrollable option is checked , if we select the same printer system is accepting.
I searched for SAP noted i dint find any thing related to this.
Have any one faced such problem and got any solution. If so please provide the details.
I would like to get suggestion to over come this bug.
Thanks in Advance.
Regards
Srihari.PThere is a notes available in SAP. Using this only it is possible to solve this problem
Regards
Srihari P -
Question about "Get Web Drawing URL and Page Name From" for Visio Web Access
I am trying to get both the web drawing URL and the page name from a list through Share Point Designer 2013, but it doesn´t work.
It looks fine when a do the web part connection wizard. I select from which columns to get the URL and the page name. But on the final web part page nothing happens. It just shows the URL that is selected in the Visio Web Access Web part. I had hoped that
that value should be overrided by the SPD-settings.
I have googled for hours..Hello,
I have now saved the Visio-file in .vdw-format, but it says Visio 2010 Web Drawing (*.vdw). Is there a .vdw-format for 2013? Isn´t that the .vsdx-format?
Still doesn´t work with the .vdw-format, but maybe I am doing something wrong.
Any ideas? -
Can I access printer options using airprint from my ipad?
How can I access airprint printer options, such as cancel or page setup?
You can cancel a print job from the Print Monitor. On the AirPrint Basics web page take a look at the
Viewing the Print Queue
section.
There is no page setup in iOS. Some apps such as Pages let you pick a page size. Some apps fo not. -
How find print program and form name from the spool list
Hi,
I have a requirement to find print program and form name from the spool list.
I got the list of programs and forms from TNAPR table, I also want to find out any custom program sending the form directly to the spool.
Cheers
SamHi
Try TSP01-Suffix2
Regards
Raj
Maybe you are looking for
-
Dashboard Prompt that does not link to any column
Hi, This might be a basic question but I am missing something here. How can we create a dashboard Prompt that is not linked to any columns? This prompt has to be a drop down with two values to choose from. 1. Accounting 2. Operational The value chose
-
Acrobat 9.5 with windows 8.1
anyone have any issues with acrobat not working on windows 8.1
-
Hi there, I tried to install skype today. Installation went without any hitches, but running skype doesn't do anything. There's no window popping up, there's no icon in the systray, just nothing. No error messages either, when starting skype from the
-
How to issue Multiple Batch Items to subcontactor
Hi, I am facing problem at issuing the batch managed material to subcontractor, suppose I have to issue 20 kg of material xxxxx to subcontractor, but we have two batches aaa qty 10 kg and bbb qty 10 kg, but system is not getting batches automatically
-
Hello, Our VoIP Architect recently left the company as well as his knowledge and I'm just a data guy :-(. We are preparing to perform an integration for a new acquisition and out-sourcing was not considered prior to his leaving, plus funds may not be