Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Querying two cursors for one graph
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00085921
Message ID:
00086013
Vues:
32
>>I have a cursor called "authorized" which keeps a running total of amounts authorized over time (thanks Mike Levy and Ed Pikman for helping me make it) and another cursor called "expended" which shows, of course, amounts expended over time. My user wants to see both amounts in one graph. Typical data values look like this:
>>
>>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?
>>
>>This looks like a toughy. Thank you.
>
>I have just figured out that if I set Microsoft Graph to use a line graph and "interpolate", I don't really need the above cursor. However, the user will still want the "authorized" line to continue to the right edge of the graph. Since the most recent "authorized" point is typically earlier than the most recent "expended" point (which will be last week), I would like to add just one record at the end with the maximum values for "datefield" and "authorized" and maybe a blank for expended. I have been playing around with another UNION SELECT but haven't made it work yet.

Now I have just figured out that when I replied to my own message, the preformat codes went away, so now I have put them back in.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform