fixed tab order. stopped report generation when printer selection is canceled. cleaned up printer select code

This commit is contained in:
Infineon\StieberD
2024-09-09 16:27:59 -07:00
parent 93fb3477b8
commit bd08d486a1
4 changed files with 35 additions and 45 deletions

View File

@ -15,7 +15,7 @@ function PrintSetup(Instruction, p1, p2, p3)
*
******************************************************************************
declare function Get_Property, SRP_Get_Printers, SRP_Array, Database_Services
declare function Get_Property, SRP_Get_Printers, SRP_Array, Database_Services, Get_Printer
declare subroutine Set_Property, SendMessage, Dialog_Box, Start_Window
declare subroutine WritePrivateProfileString, DefPrtr, SetupP
declare subroutine GetPrivateProfileSection, GetPrivateProfileString
@ -33,7 +33,6 @@ equ WM_WININICHANGE$ to 26
equ HWND_BROADCAST$ to 65535
equ MAX_SIZE$ to 4096
if assigned(Instruction) then
if len(Instruction) and num(Instruction) else
Instruction = 1
@ -71,25 +70,10 @@ return
* get the list of printers
**************************
Get:
//TODO - flag used at cutover on 6/7/22. Once sure all is working properly, remove flag from APP_INFO
//as well as all references and old code below
UseSRPGetPrinters = Database_Services('ReadDataRow', 'APP_INFO', 'USE_SRP_GET_PRINTERS')
If @User4 EQ 'DAN_CR' then
result = SRP_Get_Printers('Local')
result2 = SRP_Get_Printers('Remote')
result3 = SRP_Get_Printers('Connect')
result4 = SRP_Get_Printers('Default')
List = ''
Current = ''
Printers = result:@fm:result2:@fm:result3:@fm:result4
Printers = SRP_Array('Clean', Printers, 'TrimAndMakeUnique', @FM)
//Printers = SRP_Array('SortSimpleList', Printers, 'AscendingText', @FM)
Ret = count(Printers, @fm) + (Printers # "")
Default = result4
transfer Printers to p2
transfer Default to p3
end else if UseSRPGetPrinters then
If UseSRPGetPrinters then
result = SRP_Get_Printers('Local')
result2 = SRP_Get_Printers('Remote')
result3 = SRP_Get_Printers('Connect')
@ -156,10 +140,6 @@ return
*********************
Create:
* get list of printers and the current (ie. default) printer
* IF @User4 NE 'DAN_CR' then
* cPrinters = PrintSetup(PRN_GET$, "", List, Current)
* Printers = List
* end else
result = SRP_Get_Printers('Local')
result2 = SRP_Get_Printers('Remote')
result3 = SRP_Get_Printers('Connect')
@ -169,7 +149,6 @@ Create:
Current = ''
cPrinters = result:@fm:result2:@fm:result3:@fm:result4
* end
for i = 1 to cPrinters
List<i> = field(List<i>, ",", 1): " on ": field(List<i>, ",", 3)
next i