Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SPT Situation Again
Message
 
À
09/05/2008 12:56:21
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01316123
Message ID:
01316124
Vues:
21
>I need to do a matrix report. I have one parent table and a child table both of which are remote data sources(use SPT).
>
>The parent table describes projects.
>
>The child table lists tasks for each projects and hours to complete each task.
>
>My report needs show a list of projects and total hours scheduled.

Get one cursor, something like:
TEXT TO lcSQL NOSHOW PRETEXT 15
     SELECT Projects.Id,
            Projects.Name,
            SUM(Tasks.Time) AS TotalTime
     FROM  Projects
     INNER JOIN Tasks ON  Projects.Id = Tasks.Fk
ENDTEXT

IF SQLEXEC(...,lcSQL,[ReportCursor]) < 0
   AERROR(laError)
   MessageBox(laError[1,2])
ENDIF
Then use ReportCursor as a report source.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform