pdisk not capturing output (AREV32)
At 06 MAR 2021 11:51:16PM Warren Auyong wrote:
OI v9.4x Windows 10 Pro x64
I cloned OI system from the server onto my Windows 10 desktop. Ran the client setup and deleted all the REVPARM files.
From TCL or RBASIC PERFORM statements:
PDISK C:\TEMP\TEST.TXT (SO
LIST 10 VOC (PE
PDISK PRN (SO
The TEST.TXT file is created but contains no text.
If I run OI on the network it works. UD v4.7.2
I tried disabling the virus scanner with no change.
What do I need to tweak?
At 07 MAR 2021 10:11AM Warren Auyong wrote:
Oh and another thing that is an annoyance. I resize the ARev32 window but if I close it and re-open it opens to a default size.
Doesn't do this on the network Windows 10 workstation. Isn't there some INI files somewhere, maybe needs ACLs?
At 09 MAR 2021 07:59PM Robert Heard wrote:
Hello Warren,
I had a similar problem when converted to Windows 10 on new laptop.
Solution: Must point to a folder under \REVSOFT or \REVSOFT\OPENINSIGHT.
Cheers,
Robert Heard
BDO, Brisbane Australia
At 09 MAR 2021 08:09PM Donald Bakke wrote:
Hello Warren,
I had a similar problem when converted to Windows 10 on new laptop.
Solution: Must point to a folder under \REVSOFT or \REVSOFT\OPENINSIGHT.
Cheers,
Robert Heard
BDO, Brisbane Australia
That doesn't work for me nor did Warren's original test.
At 09 MAR 2021 08:14PM Robert Heard wrote:
Curious. And I did not pay attention to the folder that Warren had used, as \TEMP was another folder that I could use successfully with PDISK.
I'll check with my IT guys. I thought it was about permissions or application-related.
Robert
At 09 MAR 2021 10:59PM bob carten wrote:
I struggled with PDISK on Windows 10/Server2019 for a customer last year. I never got it to work correctly. Googling for other persons reporting similar issues led me to recommendations for DOS printer emulators. This customers end goal was to generate pdf output they could mail, so we worked up an alternative method to print and email pdfs from Arev32. The trick was to capture the list statement in Arev32 and execute it as openinsight report. Below is a sample program with some instructions in the comments. Perhaps it can help you work around Pdisk.
The program has a split personality. You call the program in Arev32 context, is uses CTO_GUI_SUBROUTINEit to call itself again in OI context. The idea of using CTO_GUI_SUBROUTINE to shunt tasks from Arev32 to OI context seems useful for more than just this use case.
SUBROUTINE PDFLIST(params) /* ** LIST statements from AREV32 directly to a pdf file, and optionally mail them ** uses CTO_GUI_SUBROUTINE, RUN_REPORT, RTI_CDO_MAIL ** ** Using the openInsight editor ( not Arev32) ** make a new stored procedure, ** paste this in, ** compile it. ** ** Make a configuration record in SYSENV named CFG_PDFLIST ** <1> = smtpserver, for example smtp.office365.com ** <2> = sender's email, for example [email protected] ** <3> = emailpassword, for example mypassword ** ** Manually catalog in Arev32 using the Arev32 or Openinsight editor ** Make a new VOC entry for PDFLIST, ** <1> = RBASIC, ** <2> = "SYSOBJ", ** <3> = "PDFLIST*MYAPP" ** ** ** Usage: ** Create LIST statements, but use PDFLIST where you would use LIST ** ** * Simplest case, no file specified, defaults to pdf in %TEMP% folder, opens in pdf viewer ** PDFLIST PERSON LNAME FNAME CITY STATE ** ** * pdf file specified, opens in pdf viewer ** PDFLIST PERSON LNAME FNAME CITY STATE PDFFILE "c:\temp\rpt_Test.pdf" ** * csv, no file specified, opens in csv viewer (excel) ** PDFLIST PERSON LNAME FNAME CITY STATE CSVFILE ** * csv, file specified, opens in csv viewer (excel) ** PDFLIST PERSON LNAME FNAME CITY STATE CSVFILE "c:\temp\rpt_Test.csv" ** * specify email address after semicolon, sends pdf attachment to recipent ** PDFLIST PERSON LNAME FNAME CITY STATE;[email protected] ** * specify email address after semicolon, sends csv attachment to recipent ** PDFLIST PERSON LNAME FNAME CITY STATE CSVFILE;[email protected] ** ** 11-22-19 rjc Created ** 12-18-19 rjc Modify to use run_report ** You will get a progress window, but can now use PDFFILE, CSVFILE or TXTFILE options to print to file ** 09-30-20 rjc Add emailing */ $Insert logical $Insert rlist_equates If Assigned(params) Else params = "" Declare Function getTempPath, rti_CreateGuid, retstack, isArev32 Declare Subroutine CTO_GUI_SUBROUTINE, run_Report, save_Select, activate_save_Select, delete_save_select * The name of the current program atSelf = retStack()<1> * If I was called by CTO_GUI_SUBROUTINE then I am in OI mode * Else I am in Arev mode in_oi_mode = (params != "" ) in_arev_mode = Not(in_oi_mode) //In Arev params will be null //In OI it will have a value because we called it from Arev listId = "" statement = "" If in_arev_mode then /* * Running in Arev mode, I have @sentence available * Active select */ * Active select? save it If @list.active Then listId = rti_CreateGuid() save_select('', 'SYSLISTS':@fm:listId, '', '') end * Peel the recipient off the end statement = FIELD(@SENTENCE, ';', 1) recipient = FIELD(@SENTENCE, ';', 2) * Modify the command to be a list statement with a pdffile modifier statement = 'LIST ':FIELD(statement, ' ', 2, LEN(statement)) * Use CTO_GUI_SUBROUTINE to call this program again in OI mode, passing in the params oiParams = statement:@fm:ListId:@fm:recipient Call CTO_GUI_SUBROUTINE(atSelf, oiParams) end Else /* * Oi Mode * We got here after calling rti_cto_gui_subroutine, so I know I can use OI commands natively */ * Get the params cmd = params<1> listId = params<2> recipient = params<3> * Get a pdf file name * Get the temporary folder buffer = space(512) ret = getTempPath(Len(buffer),buffer) path = buffer[1,ret] If path[-1,1] <> '\' then path := "\" End begin case case indexc(cmd, ' PDFFILE ', 1) Or CMD[-7,7] _EQC 'PDFFILE' * already specified it pos = indexc(cmd: " ", ' PDFFILE ', 1) work = trim(cmd[pos+len(' PDFFILE '), len(cmd)]) begin case case work[1,1] == "'" pdffile = work[2,"'"] if pdfFile[-4,4] _nec '.pdf' then pdffile := ".pdf" end case work[1,1] == '"' pdffile = work[2,'"'] if pdfFile[-4,4] _nec '.pdf' then pdffile := ".pdf" End Case work = "" pdfFile = path:'rpt_':rti_CreateGuid():'.pdf' case 1 pdffile = work[1," "] if pdfFile[-4,4] _nec '.pdf' then pdffile := ".pdf" end end Case cmd = cmd[1,pos]: " PDFFILE " : Quote(pdfFile) case indexc(cmd, ' CSVFILE ', 1) Or CMD[-7,7] _EQC 'CSVFILE' * already specified it pos = indexc(cmd: " " , ' CSVFILE ', 1) work = trim(cmd[pos+len(' CSVFILE ') , len(cmd)]) begin case case work[1,1] == "'" pdffile = work[2,"'"] if pdfFile[-4,4] _nec '.CSV' then pdffile := ".csv" end case work[1,1] == '"' pdffile = work[2,'"'] if pdfFile[-4,4] _nec '.CSV' then pdffile := ".CSV" End Case work = "" pdfFile = path:'rpt_':rti_CreateGuid():'.CSV' cmd := ' ': Quote(pdfFile) case 1 pdffile = work[1," "] if pdfFile[-4,4] _nec '.CSV' then pdffile := ".CSV" end end case cmd = cmd[1,pos]: " CSVFILE " : Quote(pdfFile) case otherwise$ * DEFAULT TO PDF pdfFile = path:'rpt_':rti_CreateGuid():'.pdf' cmd := ' PDFFILE ': Quote(pdfFile) end case * Activate a Select? If listId Then activate_Save_select(listId) End * Generate output Convert @vm To @fm In cmd run_report('', cmd) If listId Then delete_save_select(listId) End email_Config_rec = "" If recipient != "" Then * Yo'll need to make a config rec with the email_Server, sendername and password email_config_Rec = Xlate('SYSENV', 'CFG_PDFLIST', '', 'X') End If email_Config_rec != "" Then * Use RTI_CDOMAIL to send the email subject = 'Test of Emailing' body = 'Output from plist attached' attachmentFileList = pdfFile cc = "" mailservername = email_config_Rec<1> ; * smtp.office365.com sendername = email_Config_rec<2> Password = email_Config_rec<3> useSSL = true$ cc = "" bcc = "" replyTo = "" content = "" otherOptions = "" call rti_CDOMail(mailservername, sendername, recipient, subject, body,cc, bcc, replyto, content, attachmentfilelist, sendername, Password, useSSL, otherOptions) Call WinYield() osDelete pdfFile End Else call Utility('RUNWIN', quote(pdffile) ) end end RETURN ""
At 10 MAR 2021 08:27AM Andrew McAuley wrote:
Have you tried using procmon to see what is actually failing?
World leaders in all things RevSoft
At 10 MAR 2021 09:12AM Donald Bakke wrote:
Bob, you declared isArev32 but it doesn't appear you are using it. Is there a reason why?
At 10 MAR 2021 11:29AM bob carten wrote:
Hi Don,
I don't recall why I did not use isArev32. It may have been so I could test and debug from OI.