Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Print report in monthly calendar format
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00494575
Message ID:
00494963
Vues:
14
Yes, I'd probably pre-build a cursor for the given month...
lcFields=""
for lnweek=1 to 6
  for lndow=1 to 7
    lcFields=lcFields+iif(empty(lcFields),"",", ")+;
      "Data_"+str(lnweek,1)+"_"+str(lndow,1)+" M"
  endfor
endfor
create cursor MonthData (&lcFields)
append blank
Then I'd select my data for the month (let's say March)...
ldMthStart={^2001/3/1}
ldMthEnd={^2001/3/31}
SELECT ;
  WEEK(tabledate)-WEEK(ldMthStart)+1 as weekindex,;
  DOW(tabledate) as dowindex,;
  tabletext ;
FROM ;
  mytable ;
WHERE ;
  tabledate BETWEEN ldMthStart AND ldMthEnd ;
INTO ;
  CURSOR mycursor
Then SCAN thru this cursor, updating the appropriate field in MonthData (i.e. DATA_"+str(weekindex,1)+"_"+str(dowindex,1)).

Then, with an appropriate report template that drives off the MonthData cursor (with DATA_1_1 populating the Sunday of the first week, DATA_1_2 populating the Monday of the first week, etc), you could spit it out.

But you have to work out the day numbers in the report and attach all the PrintWhen stuff to the lines of the first, 5th and 6th week in the report template.

--Brad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform