Use Windows.pkg Use DFClient.pkg Use cComTaskPanel.pkg Use CODAFA~1.pkg Deferred_View Activate_oTaskPanelTest for ; Object oTaskPanelTest is a dbView Set Border_Style to Border_Thick Set Size to 200 538 Set Location to 2 2 Object oCJReportControl is a cCJReportControl Set Size to 179 391 Set Location to 0 140 Set peAnchors to anAll Object oColumns is a cCJReportColumns End_Object Object oColumn is a cCJReportColumn End_Object Object oRecords is a cCJReportRecords End_Object Object oRecord is a cCJReportRecord End_Object Object oRecordItem is a cCJReportRecordItem End_Object Object oReportPaintManager is a cCJReportPaintManager End_Object Procedure Set ColumnStyle Integer eColumnStyle Variant vPaintmanager Get ComPaintManager to vPaintManager Set pvComObject of oReportPaintManager to vPaintManager Set comColumnStyle of oReportPaintManager to eColumnStyle End_Procedure Procedure OnCreate Variant vColumns vRecords Set ComBorderStyle to OLExtpBorderFlat Set ColumnStyle to OLExtpColumnOffice2003 Get ComColumns to vColumns Set pvComObject of oColumns to vColumns Get ComRecords to vRecords Set pvComObject of oRecords to vRecords End_Procedure Function FirstIndex Handle hTable Returns Integer Integer iIndex iSegments iLastIndex Get_Attribute DF_FILE_LAST_INDEX_NUMBER of hTable to iLastIndex For iIndex from 1 to iLastIndex Get_Attribute DF_INDEX_NUMBER_SEGMENTS of hTable iIndex to iSegments If (iSegments > 0) Begin Function_Return iIndex End Loop End_Function Procedure UpdateReportControl String sTableName Handle hTable Integer iMinCharSize iMaxCharSize iStartColumn iColumns iColumn iColumnWidth iWidth Boolean bIsRecnum String sColumnName Variant vColumn vRecord vItem vData Integer iIndex iItemId RowID riRowId Send ComDeleteAll of oColumns Open sTableName as hTable Get_Attribute DF_FILE_NUMBER_FIELDS of hTable to iColumns Get_Attribute DF_FILE_RECNUM_TABLE of hTable to bIsRecnum If (not(bIsRecnum)) Begin Move 1 to iStartColumn Get_Attribute DF_FILE_PRIMARY_INDEX of hTable to iIndex End Get Text_Extent "W" to iMaxCharSize Move (low (iMaxCharSize)) to iMaxCharSize Get Text_Extent "i" to iMinCharSize Move (low (iMinCharSize)) to iMinCharSize For iColumn from iStartColumn to iColumns Get_Attribute DF_FIELD_NAME of hTable iColumn to sColumnName Get_Attribute DF_FIELD_LENGTH of hTable iColumn to iColumnWidth Move (iColumnWidth * (iMaxCharSize + iMinCharSize /2)) to iWidth Get ComAdd of oColumns (iColumn + 1) sColumnName iWidth True to vColumn If (iColumn > 5) Begin Set pvComObject of oColumn to vColumn Set ComVisible of oColumn to False End Loop //Send ComDeleteAll of oRecords Send ComPopulate Clear hTable Vfind hTable iIndex Gt While (Found) Get ComAdd of oRecords to vRecord Set pvComObject of oRecord to vRecord Move (GetRowID(hTable)) to riRowId Set ComTag of oRecord to (SerializeRowId (riRowId)) Get ComAddItem of oRecord "" to vItem For iColumn from iStartColumn to iColumns Get_Field_Value hTable iColumn to vData Move iColumn to iItemId Get ComAddItem of oRecord vData to vItem // Set pvComObject of oRecordItem to vItem // Set ComValue of oRecordItem to vData Loop Vfind hTable iIndex Gt Loop Close hTable End_Procedure End_Object Object oCJTaskPanel1 is a cCJTaskPanel Set Size to 180 137 Set Location to 1 1 Set peAnchors to anTopBottomLeft Object oGroups is a cCJTaskPanelGroups End_Object Object oGroup is a cCJTaskPanelGroup End_Object Object oGroupItems is a cCJTaskPanelGroupItems End_Object Object oGroupItem is a cCJTaskPanelGroupItem End_Object Object oColorSet is a cCJTaskPanelColorSet End_Object Object oTablesComboForm is a ComboForm Procedure EnumerateTables Handle hTable String sTableName Get_Attribute DF_FILE_NEXT_USED of hTable to hTable While (hTable <> 0) Get_Attribute DF_FILE_LOGICAL_NAME of hTable to sTableName Send Combo_Add_Item sTableName Get_Attribute DF_FILE_NEXT_USED of hTable to hTable Loop Get Combo_Value 0 to sTableName Set Value to sTableName End_Procedure Procedure OnChange String sTableName // Get Value to sTableName Send UpdateReportControl of oCJReportControl sTableName End_Procedure End_Object Procedure OnCreate Variant vGroups vGroup vColorSet vItems vItem Integer iColor Handle hWnd Get ComColorSet to vColorSet Set pvComObject of oColorSet to vColorSet Get ComBackgroundLight of oColorSet to iColor Delegate Set Color to iColor Get ComGroups to vGroups Set pvComObject of oGroups to vGroups Get ComAdd of oGroups 1 "Group 1" to vGroup Set pvComObject of oGroup to vGroup Get ComItems of oGroup to vItems Set pvComObject of oGroupItems to vItems Get ComAdd of oGroupItems 1000 "Hlink" OLExtpTaskItemTypeText Nothing to vItem Get ComAdd of oGroupItems 1001 "Convert" OLExtpTaskItemTypeText Nothing to vItem Get ComAdd of oGroups 2 "Group 2" to vGroup Set pvComObject of oGroup to vGroup Get ComItems of oGroup to vItems Set pvComObject of oGroupItems to vItems Get ComAdd of oGroupItems 1100 "Tables" OLExtpTaskItemTypeControl Nothing to vItem Set pvComObject of oGroupItem to vItem Send Add_Focus of oTablesComboForm Self Get Window_Handle of oTablesComboForm to hWnd Send EnumerateTables of oTablesComboForm Set ComHandle of oGroupItem to hWnd Get ComAdd of oGroupItems 1101 "Convert" OLExtpTaskItemTypeText Nothing to vItem End_Procedure End_Object Cd_End_Object