>Authorized: >approvaldate SumOfauthorizedMH >12/1/97 200 >1/12/98 882 >1/28/98 4522 >2/9/98 7971 >3/12/98 8971 > >Expended: >spenddate spenthours >2/18/98 40 >2/25/98 40 >3/4/98 40 >3/11/98 53 >>So I combined the cursors with a UNION SELECT like so:
>datefield authorized expended > >12/1/97 200 >1/12/98 882 >1/28/98 4522 >2/9/98 7971 >2/18/98 40 >2/25/98 40 >3/4/98 40 >3/11/98 53 >3/12/98 8971 >3/18/98 64.5 >>When I try to graph this cursor in Microsoft Graph 97, the last two isolated points aren't graphed. Also, the user wants the "authorized" line to continue at the max amount all the way to the right edge. Graph97 doesn't seem very flexible, and Excel graphing looks the same to me, so I think I need a cursor like this:
>datefield authorized expended > >12/1/97 200 >1/12/98 882 >1/28/98 4522 >2/9/98 7971 >2/18/98 7971 40 >2/25/98 7971 40 >3/4/98 7971 40 >3/11/98 7971 53 >3/12/98 8971 53 >3/18/98 8971 64.5 >>Can anyone think of a SELECT that would make such a thing?
select nvl(a.approvaldate,b.spenddate) as "datefield", ; a.SumOfauthorizedMH as authorized, ; b.spenthours as "Expended" ; from Authorized a ; full join Expended b ; on a.approvaldate = b.spenddate ; into cursor myCursorHere I didn't fill .null. values for one side with last value because actually no value for it on that date.
*Form.init #DEFINE TAB CHR(9) #DEFINE CRLF CHR(13)+CHR(10) M.CGDATA = "Date"+TAB scan m.cgdata = m.cgdata+TAB+dtoc(datefield) endscan go top M.CGDATA = M.CGDATA+CRLF+"Authorized"+TAB+"Expanded"+CRLF scan m.cgdata = m.cgdata+TAB+str(nvl(authorized,0)) endscan go top M.CGDATA = M.CGDATA+CRLF+"Expanded"+TAB scan m.cgdata = m.cgdata+TAB+str(nvl(expended,0)) endscan <color=green>* Could do with one pass scan..endscan * but couldn't get "plotby" prop of Graph8 * into work yet - So I put the values for row order </color> create cursor test (gen1 g) append blank append general gen1 class "msgraph.chart.8" DATA M.CGData this.addobject("myGraph","Oleboundcontrol") with this.myGraph .height = this.height - 2 .width = this.width-2 .left = 1 .top = 1 .ControlSource = "test.Gen1" .HasLegend = .t. .autoformat(4, 1) .visible = .t. endwithCetin