Simplicty and flexibility!


Setting predefined printers


Started by Marco Marchesi
Search
You will need to Sign In to be able to add or comment on the forum!

Setting predefined printers

Download: PredefinedPrinters.docx

Hi DataEase, I have some problem setting the predefined printers in dataease. I tried to run this DQL :

define "a" text .

define "b" text .

define "c" text .

define "d" text .

a := SetCurrent("@DefaultPrinter","pdfFactory Pro") . -- Will set the Windows Default Printer

message concat ("Default Printer : " , GetCurrent("@DefaultPrinter") , " RC = " , a) window .

b := SetCurrent("@Printer1","PRITROM001") . -- Will set The workstation printer 1 to PRITROM001

message concat ("Printer 1 : " , GetCurrent("@Printer1") , " RC = " , b) window .

c := SetCurrent("@Printer2","PDFCreator") . -- Will set The workstation printer 2 to PDFCreator

message concat ("Printer 2 : " , GetCurrent("@PredefinedPrinter2") , " RC = " , c) window .

d := SetCurrent("@Printer3","pdfFactory Pro") . -- Will set The workstation printer 3 to pdfFactory Pro

message concat ("Printer 3 : " , GetCurrent("@Printer3") , " RC = " , d) window .

I noted that only the default printers is settled correctly . The return code for printer 1 2 and 3 is blank. I also tried to use setstate but it doesn't works anyway.

Using manually RDRRxxxx.ini

(There’s a way to setup the same printers for all the workstations?)

From RDRRxxxx.INI

[SYSTEMFUNCTIONS]

SystemFunctionsLoaded=1

[DATAEASE64]

PredefinedPrinter_1=\\waitrom6801\PRITROM093

PredefinedPrinter_2=PDFCreator

PredefinedPrinter_3=pdfFactory Pro

PredefinedPrinter_4=

[WAPITROMP8101]

PredefinedPrinter_1=PRITROM001

PredefinedPrinter_2=PDFCreator

PredefinedPrinter_3=pdfFactory Pro

PredefinedPrinter_4=

PredefinedPrinter_0=PDFCreator

[WS-101509]

PredefinedPrinter_1=\\wapitromp8801\PRITROM001

PredefinedPrinter_2=PDFCreator

PredefinedPrinter_3=pdfFactory Pro

PredefinedPrinter_4=

I'm forced to use the first option (via DQL) because the workstation in Citrix change every connection.

Look at word file attached for details.

DataEase version 8.5.1.2674

I'm also forced to stay on dataease 8.5  version.

Any suggestion or solution will be appreciated.

Thanks


Written by Marco Marchesi 24/08/21 at 09:47:49 Dataease [{8}]FIVE

Re:Setting predefined printers

Hi Marco.

We have checked the problem and the problem is really GetCurrent("@PrinterN") which doesn't seem to work anymore.

It turns out it didn't work in DE9 either and we will fix it there, however DE85 is no longer being updated so we can't fix it there.

The good news is that the SetCurrent("@PrinterN" etc does work. There is no need to read it back as it is simply updating the INI file.

If it doesn't work immediately it is because this is in the INI file and hence will only take effect upon the next startup.


Written by DataEase 27/08/21 at 10:09:11 Dataease [{8}]FIVE

Re:Re:Setting predefined printers

Hi DataEase,

On dataease reports I standardized the printers leaving the end user the possibility to choose a real printer (by default) or a spool on PDF. e.g. default = real printer , printer 2 = PDFCreator , printer 3 = PDFFactory Pro etc. 

Using SetCurrent Dataease really update the RDRRxxxx.ini file according to the SetCurrent("@Printerx","[printerName]") even if the return code of the setcurrent doesn't reply the value Success or Fail but simply blank.

Anyway my question at this point is : 

There’s a way to setup the same printers for all the workstations updating manually RDRRxxxx.ini file?

Thanks


Written by Marco Marchesi 27/08/21 at 10:39:00 Dataease [{8}]FIVE

Re:Re:Re:Setting predefined printers

There?s a way to setup the same printers for all the workstations updating manually RDRRxxxx.ini file? 

Thanks


Written by Marco Marchesi 21/09/21 at 07:24:09 Dataease [{8}]FIVE

Re:Re:Re:Re:Setting predefined printers

Hi again Marco.

All this will be completely fixed in DE9 but sadly not in DE8.

In DE9 you have functions for manipulating INI files as well as true Application/Workstation printers.

So basically solved many times over in DE9 and not so straight forward in DE8.

Workstation Printers was in fact the first addition in DE8 due to the problem with controlling printers in DFW.

My recommendation is simply to run SetCurrent() to set the printers on login as the function work even though it doesn't give the right feedback and the checking part of it doesn't work.

In DE9 you will have application printers (default printers for the application) that will be used if specific workstation printers is not set.


Written by DataEase 21/09/21 at 10:58:55 Dataease [{8}]FIVE
DG3_ForumList