Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SPT Situation Again
Message
 
To
09/05/2008 12:56:21
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01316123
Message ID:
01316124
Views:
20
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform