0
votes

I did all the follwoing migartion,

  1. from PowerBuilder 9 to PowerBuilder 10.5
  2. Windows XP to Windows 7
  3. MS Office 97 and MS Office 2003 to MS Office 2010

From the PowerBuilder application, we are doing the following things

  1. MailMerging the documents
  2. Printing the documents
  3. Emailing with attachments

like this functionalities are automated and we are using from the application. Here the OLE control we are using to handle MS Office functionalities.

The problem is

3 weeks before it was working i meant the below code .

ole_1.object.application.ActivePrinter = i_s_letterenvelops_printer

after that they Shifted the servers to one location to another location.

and also i didn't know about my development machine..

In this case, how can i handle this ?

Please help me about this.

Thanks!

2
I suspect the key question is, has the change in location caused a change in the printer name? Does PrintGetPrinters() get you a list that contains the same printer name as before? Based on what you posted before, it seems that the printer name ("Xerox1W3 on Laxhns73") contains a location reference.Terry
Terry, you beat me to it. That's what I get for allowing myself to be distracted by work when I'm writing an answer. Also, I gave you a point for picking up the printer name he gave earlier. Good chance this is the problem.Hugh Brackett

2 Answers

0
votes

Perhaps the printer names have changed? For example, my network printer names are like PRINTER-NAME on SERVER-NAME. Also note they are case-sensitve. In our application we check if the printer name exists before we try to use it. If it's not there we show a message telling the user to contact the helpdesk about that printer. You can get the available printer names with PrintGetPrinters.

Added 20110629: To the application the network printer name looks like \\SERVER-NAME\PRINTER-NAME. A fast way to check is to put this line in your application:

messagebox("PrintGetPrinters", printgetprinters(), Information!, OK!)

0
votes

My situation was that the Network Group recently changed the printer profile to a network based which caused the application could not create PDF files. The list of printers on my PC looked exactly the same as before:

Send To OneNote 2010    winspool    nul:
Microsoft XPS Document Writer   winspool    Ne00:
CutePDF Writer  winspool    CPW2:
Adobe PDF   winspool    Ne01:
\\otwww001\T01-001-HPLaserJet-4050  winspool    Ne02:

These printer names were stored in an array. The problem was that a char (13) was magically added to the end of the Adobe PDF line. To solve the problem, I remove the char(13) if it exists before I add the printer.

if right(ls_CurrentPrinter,1) = char(13) then 
  ls_CurrentPrinter =left(ls_CurrentPrinter,len(ls_CurrentPrinter) - 1)
end if
IF LEN(ls_CurrentPrinter) > 0 THEN
 THIS.ufp_AddNewPrinter(ls_CurrentPrinter)
END IF

It solved my problem.

Environment: - Windows 7 - PowerBuilder 12.6