Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursor for Summary
Message
De
23/09/2008 23:36:48
 
 
À
23/09/2008 21:19:17
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01350077
Message ID:
01350089
Vues:
23
This message has been marked as a message which has helped to the initial question of the thread.
>I have this code that creates the result below it. How can I get that information into a report after the detail lines? Do I need to try and get them all on one row, or should I find a way to append them to the cursor that supports the detail?
>
>CLOSE DATABASES
>
>USE c:\fmsrun\prompt\EligAct IN 0
>
>m.DOSBegin = DATE() -720
>m.DOSEnd = DATE()
>
>SELECT ;
>	ICASE(;
>		MONTH(DOSBegin)= 1,'Jan',;
>		MONTH(DOSBegin)= 2,'Feb',;
>		MONTH(DOSBegin)= 3,'Mar',;
>		MONTH(DOSBegin)= 4,'Apr',;
>		MONTH(DOSBegin)= 5,'May',;
>		MONTH(DOSBegin)= 6,'Jun',;
>		MONTH(DOSBegin)= 7,'Jul',;
>		MONTH(DOSBegin)= 8,'Aug',;
>		MONTH(DOSBegin)= 9,'Sep',;
>		MONTH(DOSBegin)=10,'Oct',;
>		MONTH(DOSBegin)=11,'Nov',;
>		MONTH(DOSBegin)=12,'Dec','') AS ReportMonth, ;
>	YEAR(DOSBegin) AS ReportYear, ;
>	COUNT(*) AS DOSCnt ;
> FROM EligAct ;
>	WHERE BETWEEN(EligAct.DOSBegin,m.DOSBegin,m.DOSEnd) ;
>	GROUP BY ReportYear, ReportMonth ;
>	INTO CURSOR ReportCursorSummary
>
>BROWSE LAST 
>
>CLOSE DATABASES
>
>CANCEL
>
>
>
>Oct 2007         2
>Aug 2008         9
>Feb 2008         4
>Jul 2008         3
>Sep 2008        20
>
One approach:
- create a cursor with a single memo field
- insert one row into that cursor
- write each row of your 1st cursor to the memo field, followed by a CR or CR/LF (actually better would be to START each added row with CR or CR/LF EXCEPT for the first one)
- reference the new memo-field cursor in a text box in your report summary (with stretch/overflow etc.)
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform