Consultor Eletrônico



Kbase 19742: ACTIVEX - VideoSoft VSVIEW Sample Code (Shaded Table)
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   18/08/2005
Status: Unverified

GOAL:

How to access the VideoSoft VSVIEW ActiveX control.

FIX:

To make this code work create a window in the UIB/AppBuilder, insert an instance of the VSPrinter ActiveX Control, then insert a button somewhere on the window and place the code behind the CHOOSE event of the button.

&SCOPED-DEFINE YELLOW RGB-VALUE(255,255,0)
&SCOPED-DEFINE GREEN RGB-VALUE(0,255,0)

DEFINE VARIABLE iSub AS INTEGER NO-UNDO.
DEFINE VARIABLE cFormat AS CHARACTER NO-UNDO.
DEFINE VARIABLE cHeader AS CHARACTER NO-UNDO.
DEFINE VARIABLE cData AS CHARACTER NO-UNDO EXTENT 7.

ASSIGN cFormat = '+1440|+^1000|+^1000|+>700;'
cHeader = 'Network|Country|Language|Code'
cData[1] = 'Cartoon Network|USA|English|CAR;'
cData[2] = 'Deutsche Welle|Germany|German, English|DWL;'
cData[3] = 'Discovery|USA|English, Spanish|DCY;'
cData[4] = 'FOX|USA|English|FOX;'
cData[5] = 'TV5|Canada, France|French, Spanish|TV5;'
cData[6] = 'MTV|USA|English, Spanish|MTV;'
cData[7] = 'RAI Uno|Italy|Italian, English|RAI;'.

chCtrlFrame:VSPrinter:StartDoc.

chCtrlFrame:VSPrinter:AddTable(cFormat, cHeader, cData[1],
{&YELLOW}, {&GREEN}).

DO iSub = 2 TO 6 BY 2:
chCtrlFrame:VSPrinter:AddTable(cFormat, cHeader, cData[iSub],
{&YELLOW}, , TRUE).
chCtrlFrame:VSPrinter:AddTable(cFormat, cHeader, cData[iSub + 1],

{&YELLOW}, {&GREEN}, TRUE).
END.

chCtrlFrame:VSPrinter:EndDoc.