Invalid data type

Mkontwg

Member
Hi team

I am encountering this error, am I missing an assembly here?

Code:
// assembly
USING Infragistics.UltraChart.Data.Series.ISeries.

// variable where error is......
DEFINE PRIVATE VARIABLE series1  AS  NumericSeries NO-UNDO.
 

Attachments

  • invalid-error.PNG
    invalid-error.PNG
    4.4 KB · Views: 6

Osborne

Active Member
You either require:
Code:
USING Infragistics.UltraChart.Resources.Appearance.*.
or:
Code:
DEFINE PRIVATE VARIABLE series1  AS  Infragistics.UltraChart.Resources.Appearance.NumericSeries NO-UNDO.
 

Mkontwg

Member
You either require:
Code:
USING Infragistics.UltraChart.Resources.Appearance.*.
or:
Code:
DEFINE PRIVATE VARIABLE series1  AS  Infragistics.UltraChart.Resources.Appearance.NumericSeries NO-UNDO.

Thanks, it worked


Code:
METHOD PRIVATE VOID InitializeChart():
      
    DEFINE VARIABLE qc as HANDLE  NO-UNDO.
    DEFINE VARIABLE i  as INTEGER NO-UNDO.
  
    SESSION:APPL-ALERT-BOXES = TRUE.
    DO i = 1 to 20:
    CREATE tt.
      ASSIGN
        tt.pb-acost = "i" + STRING( i )
        tt.pb-partno = i
        tt.sys-cono = RANDOM( 1, 100 )
        tt.pb-partno = RANDOM( 1,  10 ).
      
    END.
Now I'm getting a different error on this method. What am I missing on this method..?
The second attachment sorry is the actually error, ignore first one old.
 

Attachments

  • Error.PNG
    Error.PNG
    90.3 KB · Views: 7
  • data.PNG
    data.PNG
    44.8 KB · Views: 6
Last edited:

Mkontwg

Member
Sorry please ignore the first attachment, the right is attached below, thanks
 

Attachments

  • data.PNG
    data.PNG
    44.8 KB · Views: 5

Osborne

Active Member
What is the actual error message? Are the temp-table fields the correct data type?:

pb-acost = CHARACTER and pb-partno and sys-cono = INTEGER.
 

Mkontwg

Member
Hi

Code:
// temp-table

    DEFINE TEMP-TABLE tt NO-UNDO
    FIELD sys-cono AS CHARACTER
    FIELD pb-partno AS CHARACTER
    FIELD pb-acost AS DECIMAL
    FIELD pb-onhand AS INTEGER
    INDEX xIdx IS PRIMARY UNIQUE sys-cono.

Incompatible data-type expression line 167
 

Attachments

  • data.PNG
    data.PNG
    44.8 KB · Views: 1

Osborne

Active Member
The three fields - pb-acost, sys-cono and pb-partno - all have incorrect data types for what you are assigning. You are assigning a string to a decimal field and integers to character fields. For the ASSIGN the temp-table definition needs to be:
Code:
DEFINE TEMP-TABLE tt NO-UNDO
    FIELD sys-cono AS INTEGER
    FIELD pb-partno AS INTEGER
    FIELD pb-acost AS CHARACTER
    FIELD pb-onhand AS INTEGER
    INDEX xIdx IS PRIMARY UNIQUE sys-cono.
 
Top