[Migrated content. Thread originally posted on 14 October 2009]
Folks,I'm getting this error when trying to compile a program using the MSchart control
It it happening also with this small sample of code I received during my time on Gisle's advanced windows course.
I comes back with this "
chart2.cbl, line 62: *** Internal error #45 ***
Here's the sample code
IDENTIFICATION DIVISION.
PROGRAM-ID. Chart2.
AUTHOR. Cheesle.
REMARKS.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SPECIAL-NAMES.
COPY "MSCHART.DEF".
.
WORKING-STORAGE SECTION.
77 CNTL-FONT USAGE HANDLE OF FONT SMALL-FONT.
77 hDataPoints USAGE HANDLE OF DataPoints.
77 WS-I PIC 9(1).
77 WS-A PIC 9(9).
SCREEN SECTION.
01 CHART-FORM.
03 CheeseChart MSCHART
COL 1
LINE 1
LINES 40
SIZE 80
Visible 0.
PROCEDURE DIVISION.
ACU-MAIN-LOGIC.
DISPLAY STANDARD GRAPHICAL WINDOW
LINES 40
SIZE 80
BACKGROUND-LOW
CONTROL FONT CNTL-FONT
TITLE "Finest city by vote".
DISPLAY CHART-FORM.
MODIFY CheeseChart Datagrid::SetSize(1, 3, 1, 3)
|ChartType = VtChChartType2dPie.
ChartType = VtChChartType3dCombination.
PERFORM VARYING WS-I FROM 1 BY 1 UNTIL WS-I > 3
MULTIPLY WS-I BY 100 GIVING WS-A
MODIFY CheeseChart
@Row = 1
@Column = WS-I
@Data = WS-A
END-PERFORM.
MODIFY CheeseChart
DataGrid::ColumnLabel(1, 1, "San Fransisco")
DataGrid::ColumnLabel(2, 1, "Miami")
DataGrid::ColumnLabel(3, 1, "San Diego")
DataGrid::RowLabel(1, 1,
"America's finest city by vote").
MODIFY CheeseChart
Plot::SeriesCollection::Count()
GIVING WS-I.
PERFORM UNTIL WS-I = 0
INQUIRE CheeseChart
Plot::SeriesCollection::Item(WS-I)::DataPoints IN
hDataPoints
USE hDataPoints Item(-1)
MODIFY
^DataPointLabel::LocationType =
VtChLabelLocationTypeOutside
^DataPointLabel::Component =
VtChLabelComponentPercent
^DataPointLabel::PercentFormat =
"0%"
^DataPointLabel::VtFont::Size = 14
END-USE
SUBTRACT 1 FROM WS-I
END-PERFORM.
MODIFY CheeseChart
ShowLegend = 1
Visible = 1.
ACCEPT OMITTED.
EXIT PROGRAM
STOP RUN
.The line in question is
^DataPointLabel::LocationType =
I'm compiling under 8.0.0
We're going to head to tech support, but I've have very quick fixes on here in the past so any ideas?
Many thanks,
Shaun



