Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best way to do calculations...
Message
De
03/09/1999 17:39:37
Peter Brama
West Pointe Enterprises
Detroit, Michigan, États-Unis
 
 
À
03/09/1999 13:29:06
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00260385
Message ID:
00261410
Vues:
48
Cindy...

Here is the click on my report menu form...



LOCAL pRun

DO FORM timepro\repinfo WITH "A/R Summary","FD" TO pRun

if pRun=1
USE firm order firmid
Seek(gFirmid)
Select client.firmid,client.clientnum,client.clientname,log.logdate,;
sum(iif((code.codetype="Billings" or code.codetype="Cash Receipt" or code.codetype="A/R Writeoff" or code.codetype="Billings Start Bal") and log.logdate sum(iif(code.codetype="Billings" and log.logdate>=gStartDate and log.logdate<=gEndDate,log.rate,0)) as Billings, ;
sum(iif(code.codetype="Billings" and log.logdate<=gEndDate,log.rate,0))as BillingsYTD, ;
sum(iif(code.codetype="Billings Start Bal" and log.logdate>=gStartDate and log.logdate<=gEndDate,log.rate,0)) as BillingsStart, ;
sum(iif(code.codetype="Cash Receipt" and log.logdate>=gStartDate and log.logdate<=gEndDate,log.rate,0)) as Collections, ;
sum(iif(code.codetype="Cash Receipt" and log.logdate<=gEndDate,log.rate,0)) as CollectionsYTD, ;
sum(iif(code.codetype="A/R Writeoff" and log.logdate>=gStartDate and log.logdate<=gEndDate,log.rate,0)) as Writeoff, ;
sum(iif(code.codetype="A/R Writeoff" and log.logdate<=gEndDate,log.rate,0)) as WriteoffYTD ;
from Timepro!client inner join timepro!log on client.clientid = log.clientid ;
inner join timepro!code on log.codeid = code.codeid ;
where client.firmid=gFirmid ;
into cursor cursARsum ;
group by client.clientname ;
order by client.clientname
if Reccount()>0
REPORT FORM timepro\arsummary PREVIEW
else
Messagebox("No records match search criteria",16,"ERROR")
ENDIF
ENDIF


The gStartDate, gEndDate & gFirmid are global variables defined in the program main.


Thanks


>Peter,
>
>CLICK is fine. There should not be any tables in the environment of the report.
>
>Do you have MainForm GetReportInfo button which brings up form GetInfo, then button on GetInfo form to print? Is the report cursor in a private (to the GetInfo form) data session?
Peter Brama
West Pointe Enterprises

VFP is getting easier but STILL alot to learn!!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform