Scripting

  • 1.  I have a special request from a customer who would

    Posted 07-13-2017 08:12
    I have a special request from a customer who would like to print an A/P Manual ""QuickPrint"" check from an external VB script. I feel confident that I can write the script to create the Manual Check Header, Lines, and Distributions but I'm not clear on how to launch the printing of the manual check. Has anyone done this before? Suggestions? Thanks, Doug.


  • 2.  RE: I have a special request from a customer who would

    Posted 07-13-2017 08:49
    I've never printed a check before, but I do see AP_ManualCheckPrinting_ui and _rpt objects. For other _rpts, I usually nSelectReportSetting(FormCodeGoesHere), nGetOptions, nSetOptions and nProcessReport(""PRINT""/""PREVIEW"") though this looks like you'd nChangeReportSetting, maybe nBT_Print(), as well as verify the Bank Code, Check #, Check Date, etc. Ought to be a fun BOI!


  • 3.  RE: I have a special request from a customer who would

    Posted 07-13-2017 10:46
    Oh I would so love to see examples of these, I've been encountering clients wanting to chain a VI export to a print job and such, and just didn't know where to begin.


  • 4.  RE: I have a special request from a customer who would

    Posted 07-13-2017 11:05
    Thanks Steve. I'll get back to you on the FUN part.


  • 5.  RE: I have a special request from a customer who would

    Posted 07-13-2017 13:03
      |   view attached
    Back in the Business Framework conversion days (this one's from 4.50), I created this clunky BOI script to print out a ton of reports (hardcoded to CutePDF Writer) before I started the data conversion. This was before Alnoor's scripting classes, so this was result of my flailing around with little documentation. I have no idea if this script still works, but it might give you guys some ideas.

    Attachment(s)



  • 6.  RE: I have a special request from a customer who would

    Posted 07-14-2017 12:53
    wow Steve that's that script is awesome any idea where I could get more information on the PreviewReportFormCode syntax, this is already going to save me so much time during upgrades?


  • 7.  RE: I have a special request from a customer who would

    Posted 07-15-2017 11:09
    It's a custom procedure I created to prevent re-typing the same stuff over and over again. It's defined starting at line 36 in the file, but it basically accepts the Module (I/M, P/O, etc), module date, UI lookup task name, the RPT object to print, the form code/report setting to use and Y/N if there are any custom options to set. Then it uses those to set the Module Date, set the Module, Set Program to your UI lookup, hook into the RPT object, set a specific form code, set any special options and then to Print, unless it's an Options file, then I preview so I could manually export to PDF. The reason is that the default PDF name is the same for all the options printouts, so I manually did those for easier comparisons with the older Options printouts.


  • 8.  RE: I have a special request from a customer who would

    Posted 07-20-2017 14:39
    Steve I was able to solve the Trail balance problem (I ripped it out of the for loop) but I think it was the Array. I used the MsgBox cstr(strOptions) before and after to troubleshoot this. strTmp(0)=""SORTREPORTBY$="" & Chr(34) & ""A"" & Chr(34) strTmp(1)=""DB_TYPEOFBALANCE$="" & Chr(34) & ""E"" & Chr(34) strTmp(2)=""DB_FISCALYEAR$="" & Chr(34) & ""2020"" & Chr(34) strTmp(3)=""DB_STARTPERIOD$="" & Chr(34) & ""01 1/1/2020"" & Chr(34) strTmp(4)=""DB_ACCOUNTINGPERIOD$="" & Chr(34) & ""02 2/1/2020"" & Chr(34) strTmp(5)=""DB_ENDPERIOD$="" & Chr(34) & ""02 2/29/2020"" & Chr(34) strTmp(6)=""CB_ZEROBALANCE$="" & Chr(34) & ""Y"" & Chr(34) strTmp(7)=""CB_CONDENSEDPRINT$="" & Chr(34) & ""N"" & Chr(34) strOptions=join(strTmp,"";"")