Hi,
Have anyone used MS Chart control for .NET. I tried to use it on my 10.2B forms but was unable to get the chart displayed, it throwed an error (pls see attachment).
Here is the code snippet I tried:
DEFINE VARIABLE rBindS AS Progress.Data.BindingSource NO-UNDO.
DEFINE VARIABLE bGradeHdl AS HANDLE NO-UNDO.
def temp-table tt-grade no-undo
field studentname as char
field physics as dec
field chemistry as dec
field math as dec.
@VisualDesigner.
METHOD PRIVATE VOID button1_Click( INPUT sender AS System.Object, INPUT e AS System.EventArgs ):
create tt-grade.
assign
studentname = "student 1"
physics = 90.5
chemistry = 91
math = 95.
create tt-grade.
assign
studentname = "student 2"
physics = 80
chemistry = 75.5
math = 87.
create tt-grade.
assign
studentname = "student 3"
physics = 62
chemistry = 88
math = 78.8.
create tt-grade.
assign
studentname = "student 4"
physics = 68.9
chemistry = 88
math = 75.4.
bGradeHdl = BUFFER tt-grade:HANDLE.
rBindS = NEW Progress.Data.BindingSource(bGradeHdl).
chart1:DataBindTable(rBindS).
RETURN.
END METHOD.
[View:~/cfs-file.ashx/__key/communityserver-discussions-components-files/19/mscharterror.doc:550:0]
I'd report that to tech support.
-- peter
I believe most MS controls require a .NET Dataset or .NET DataTable and not a BindingSource object. You will need to export the temp-table (schema and data) into an in-memory(longchar) XML and load it to XMLDataDocument object which has a Dataset property that you can use for binding to the chart control.