#DEFINE CRLF CHR(13)+CHR(10) #DEFINE TAB CHR(9) * to properly talk to Graph, * we have to use an oleboundcontrol because we * can't otherwise use a report form and print a graph * oleboundcontrols are only available in forms... REPORT FORM JGraph2 PREVIEW ALL RETURN PROC DESetup * private data session means the usual junk * with dates and so on -- I used DTOC() In here!! SET SYSFORMATS ON ENDPROC PROC BeforeGroup cData = cData+ALLTR(Name) ENDPROC PROC AfterGroup cData = cData+CRLF lFirstGroup = .F. ENDPROC PROC BeforeDetail IF lFirstGroup LOCAL liPos liPos = AT(CRLF,cData) cData = STUFF(cData, liPos,0,TAB+DTOC(Meeting)) ENDIF cData = cData+TAB+STR(Points,5,2) ENDPROC PROC BeforeSummary LOCAL oReportForm, oLineGroup CREATE CURSOR Temp (onefield g) APPEND BLANK APPEND GENERAL Temp.Onefield CLASS "msgraph.chart" DATA cData oReportForm = CREATEOBJECT("JugglerGraph") * I can go in here and try autoformats out... oReportForm.MyGraph.AutoFormat(4,2) * to do stuff one series at a time: * loLineGroup = oReportForm.MyGraph.LineGroups(1) * loLineGroup.SeriesCollection(1).hasdatalabels = .T. oReportForm.MyGraph.ApplyDataLabels() oReportForm.MyGraph.OmitBackground() ENDPROC DEFINE CLASS JugglerGraph AS Form ADD OBJECT MyGraph AS OLEBoundControl WITH ; Class = "MsGraph.Chart", ; Height = THISFORM.Height, ; Width = THIS.Height * 2, ; ControlSource = "Temp.Onefield" * the dimensions are just meant to be relative to one another; * the report form will then size/scale it properly ENDDEFINE