Kbase P96128: Error 4058 in SmartDataViewer if no record available
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  25/08/2005 |
|
Status: Verified
FACT(s) (Environment):
OpenEdge 10.0B
SYMPTOM(s):
Data-source for SmartDataViewer returns no records
SmartDataViewer with a Toggle-box linked to a Logical DB field.
Format of logical field is something other than 'yes
o'
**Attribute SCREEN-VALUE for the TOGGLE-BOX <field> has an invalid value of NO. (4058)
**Attribute <attribute> for the <widget id> has an invalid value of <string>. (4058)
CAUSE:
Bug# 20041013-001
FIX:
Upgrade to 10.0B02 or later.
Workaround:
In the SmartDataViewer, set the format for the toggle-box to 'yes
o' using its Dynamic Property sheet.
Alternatively the following code may be used in the displayFields procedure of the viewer:
DEFINE INPUT PARAMETER pcColValues AS CHARACTER NO-UNDO.
DEFINE VARIABLE cFieldHandles AS CHARACTER NO-UNDO.
DEFINE VARIABLE iValue AS INTEGER NO-UNDO.
DEFINE VARIABLE hField AS HANDLE NO-UNDO.
IF pcColValues <> ? THEN
RUN SUPER (INPUT pcColValues).
ELSE DO:
/* Fix for a problem where the basic adm2 procedure clears toggle-boxes by setting the
screen-value to NO, instead of using the format of the field. */
{get FieldHandles cFieldHandles}.
DO iValue = 1 TO NUM-ENTRIES(cFieldHandles):
hField = WIDGET-HANDLE(ENTRY(iValue,cFieldHandles)).
IF hField:TYPE = 'PROCEDURE':U THEN
RUN clearField IN hField.
/* Clear the combo box */
ELSE IF hField:TYPE = "COMBO-BOX":U THEN
{fnarg clearCombo hField}.
/* logical defaults to no (also radio-sets) */
ELSE IF hField:DATA-TYPE = "LOGICAL":U THEN
hField:SCREEN-VALUE = ENTRY(2,hField:FORMAT,"/":U) NO-ERROR.
/* radio-set show first button */
ELSE IF hField:TYPE = "RADIO-SET":U THEN
hField:SCREEN-VALUE = ENTRY(2,hField:RADIO-BUTTONS) NO-ERROR.
ELSE
hField:SCREEN-VALUE = "".
END.
END.
END PROCEDURE.