Overview (FAQ3 ) -

Continuing


 


WINDOWS structures


 ////////////////////////////////////////////////////////////////////////////////
            // TABLES used in WINDOW
            ////////////////////////////////////////////////////////////////////////////////
            WinRec = @record
            WinInfo = field(Winrec, @rm, 2)
            Tables = WinInfo<1, 23>
            convert @tm to @vm in Tables
            @ans = Tables
            ////////////////////////////////////////////////////////////////////////////////
            // EVENT_HANDLERS
            ////////////////////////////////////////////////////////////////////////////////
            WinRec = @record
            WinInfo = field(Winrec, @rm, 2)
            Events_defined 	= WinInfo<1, 17>
            Events_Info = ''
            If Events_defined Then 
            convert @tm to @vm in events_defined
            num_events = Count(events_defined, @vm) + (events_defined # '')
            *For j = 1 To num_events
            *     events_info<1, -1> = 
            *Next j
            events_info = events_defined
            end
            @ans = Events_info
            ////////////////////////////////////////////////////////////////////////////////
            // quickevents
            ////////////////////////////////////////////////////////////////////////////////
            WinRec = @record
            WinInfo = field(Winrec, @rm, 2)
            qe_defined 	= WinInfo<1, 18>
            qe_names	= WinInfo<1, 19>
            QE_Info = ''
            If qe_defined Then 
            num_qes = Count(qe_defined, @svm) + (qe_defined # '')
            For j = 1 To num_qes 
            qe_line = qe_names<1,1,j>
            qe_action = qe_defined<1,1,j>
            this_qe_action = Field(qe_action, @tm, 2, 3)
            Convert @tm To ' ' In this_qe_action
            If qe_line then
            qe_info<1, -1> = qe_line:'-> ':this_qe_action
            end
            Next j
            end
            @ans = qe_info
            ////////////////////////////////////////////////////////////////////////////////
            // WINDOW SIZE
            ////////////////////////////////////////////////////////////////////////////////
            WinRec = @record
            WinInfo = field(Winrec, @rm, 2)
            width = WinINfo<1, 7>
            Height = WinInfo<1,8>
            @ans = fmt(height, 'R#6') :' x ':fmt(width, 'L#6')
            ////////////////////////////////////////////////////////////////////////////////
            // WINDOW X pos
            ////////////////////////////////////////////////////////////////////////////////
            num_prompts = @record<2>
            list = ''
            rec = field(@record, @rm, 3)
            for i = 1 to num_prompts
            list<1, -1> = rec<i, 5>
            Next i
            @ans = list
            ////////////////////////////////////////////////////////////////////////////////
            // WINDOW Y pos
            ////////////////////////////////////////////////////////////////////////////////
            num_prompts = @record<2>
            list = ''
            rec = field(@record, @rm, 3)
            for i = 1 to num_prompts
            list<1, -1> = rec<i, 6>
            Next i
            @ans = list
            ////////////////////////////////////////////////////////////////////////////////
            // WINDOW TITLE
            ////////////////////////////////////////////////////////////////////////////////
            WinRec = @record
            WinInfo = field(Winrec, @rm, 2)
            window_title = WinInfo<1, 9>
            @ans = Window_Title
            ////////////////////////////////////////////////////////////////////////////////
            // WINDOW PAGES (TABS)
            ////////////////////////////////////////////////////////////////////////////////
            WinRec = @record
            WinInfo = field(Winrec, @rm, 2)
            StyleInfo = WinInfo<1, 37, 1>
            StyleInfo = field(StyleInfo, 'x', 2)[1, 4]
            for i = 4 to 1 step -1
            if StyleInfo[i, 1] = 0 then StyleINfo[i, 1] = ''
            next i
            StyleInfo=iconv(StyleInfo, 'MX')
            @ans = styleInfo
            ////////////////////////////////////////////////////////////////////////////////
            // HAS STYLESHEET
            ////////////////////////////////////////////////////////////////////////////////
            @ans = ""
            WinRec = @record
            P1 = field(Winrec, @rm, 1)
            If P1<3> Then
            @Ans = 1
            End Else
            @Ans = 0
            End
            

 


 


Internet explorer - asking to be set as default browser.


Switch it off here

ie option


xx

Bob's Tricks

COMMON /myCommon/ bInitialised%, .....
IF assigned(bInitialised%) ELSE bInitialised% = false$

IF bInitialised% = true$ ELSE
GOSUB init
END
...
...
init:
...
bInitialised% = true ; // make this the last entry - so that you're sure it's all done.


 

Top of Page

EOY processing

Checking employee self-sacrifice Super:

list employee with VOL_SGL VOL_SGL VOL_SGL_AMT VOL_POLICY - <55> <56> <57>
Field TAX_TYPE <35> says before/after tax
SUPER_CHANGE_FUND <146>

employee_ytd has fields <16> & <20> for the BEFORE/AFTER mode ?

Top of Page

Moving Powerforce between 2 servers

Whilst doing the move, a configuration requirement came up, hence your IT guys will have to complete this for you prior to decommissioning the old server on \\acsfs1.

Each workstation registers 2 .ocx files (vsprint7.ocx and vspdf.ocx)

  • These are currently registered against acsfs1 either via a drive mapping or UNC ( we don’t know).
  • If via a drive mapping, then the re-mapping of the drive letter to acssql\\powerforce will make everything work without a need for re-registration.
  • However, if the mapping is via UNC, then workstations will require a remap to the new server
  • The \\powerforce shares on each server are currently in sync.
  • What needs to happen once the re-map is undertaken, is that the sub-directories under <orig_drive>proddb\*.* are copied over to the equivalent sub-directory location on \\acssql\powerforce\proddb

 

  • Remember to turn off virus checking on the new server against files ending in .ov and .lk (these are data files).

Top of Page

Programming Tricks

Programming an OLE control for ie (web browser).

call send_message(olehtml, 'OLE.Navigate2","about:blank") ; // put it into webbrowser mode
call send_message(olehtml,"OLE.document.open")
call send_message(olehtml,"OLE.document.write",body) ; // write the text
call send_message(olehtml,"OLE.document.close")

 

Top of Page

Editor++ display

I've experienced instances of where the OI editor just doesn't work. In reading recent OI articles, appears that you have to run the clientinstall.msi or otherwise regsvr32  rvcmdctl.ocx & (possibly) scivbx.ocx. I think this last item is scintila (the basis of the editor code).

Payroll

  • To manually un-commit a run, [T] PAYRUN<11> set to 0.
    & PAYRUN<27> to "". Has to be .null. as it's a date field

Section

 

Top of Page

SQL

Top of Page

Quick data archive

To do a quick archive


Clear payrun, pay_details - use 'mpd_clear_payrun'
Clear audit_roster
Clear rtc - first remove the indices, the use 'mpd_clear_rtc'
Rebuild indices

Billing

When running an invoice run (repetitive - this is the script which gets run).

SELECT ROSTER_TIMECARD WITH ROSTER_DATE FROM "30/07/12" TO "05/08/12"
SELECT ROSTER_TIMECARD WITH COY_DEBTOR EQ "ABS"
SELECT ROSTER_TIMECARD WITH UNINVOICED_STATUS = 1
SELECT ROSTER_TIMECARD WITH NO INVOICE_XREF
SELECT ROSTER_TIMECARD BY CUSTOMER BY ROSTER_DATE

Top of Page

SRP programming hints

http://wiki.srpcs.com/index.php

 

SelChanged.OLE_TAB:
transfer param1 to page
send_event(@window, "PAGE", page)
send_event(@window, "VSCROLL", page)
RETURN

Generic OI TabControl
In the <Script> of tabControl, value = get_property(ctrlentid, "VALUE")
set_property(@WINDOW,"VPOSITION",value)

On last TAB page, a 'tab' off will goto page1 but not swap the display


Setting up the SRP EDITOR for quick commands: setup the links as follows and the program they call with 3 params to accept the parameters passed in. When definining the setup, do not use braces. Seperate the params with a comma as per this image.

quick commands

Top of Page


Miscellaneous

In upgrading from realease 8.x to 9.x OI, the issue of printing is supposedly covered off by [SYSENV/CFG_OIPI> - where you set the entry to VSPRINTER the laws abide by something, and in moving you had to set them to a new rule - anyway the fix is [SYSENV/ENV_<

>] field <44> wich equates to the following:

Our setting has been "METRIC", it needs to be set back to "STANDARD", as per

printing


Windows 8 - setting up a windows 7 style start menu


read this article