General information
Category:
Reports & Report designer
Peter,
Code looks ok but I'm still wondering why your report gives errors. Can you email me the report and the cursARsum data to try with it?
Mailto:cindy.winegarden@duke.edu
I have VFP6 here at home to try it this weekend.
>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?
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only