Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
One additional weirdness today...
Message
From
18/01/2001 18:44:09
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00465374
Message ID:
00465488
Views:
12
I could be way out to lunch on this one Nadya, and I know cnt() should work, but just for the record, does it do the same thing if you use count() instead?

Alan

>Hi everyone,
>
>This is the piece of code:
>
>select pb_state_c+pb_st_mun as code, cnt(*) as deeds, sum(iif(!empty(pb_addruni),1,0)) as condos,;
>	tn.fullname as town, mf.rec_end as highdate, mf.rec_beg as lowdate, ;
>	pb_st_mun+strtran(str(cnt(*),6)," ","0")+dtoc(mf.rec_beg)+dtoc(mf.rec_end) as rpttext ;
>	from (lcSrcTble) src, towns tn, mafiling mf;
>	where src.pb_st_mun = tn.dortownnum ;
>	and (tn.rcode+tn.townold = mf.rcode+mf.tcode) ;
>	into table (lcOutTble) ;
>	group by 1
>	
>if _tally>0
>	set talk off
>	wait window nowait 'Preparing data for the report...'
>
>	locate for code = "25020"
>	if found()
>		replace town with "Barnstable", ;
>			deeds with deeds/6, ;
>			condos with condos/6, ;
>			rpttext with right(code,3)+strtran(str(deeds,6)," ","0")+dtoc(lowdate)+dtoc(highdate)
>	endif
>
>	locate for code = "25035"
>	if found()
>		replace town with "Boston", ;
>			deeds with deeds/13, condos with condos/13, ;
>			rpttext with right(code,3)+strtran(str(deeds,6)," ","0")+dtoc(lowdate)+dtoc(highdate)
>	endif
>	copy field rpttext to (lcOutTble)+".dat" type sdf
>    select (lcOutAlias)
>	wait window nowait 'Now printing report...'
>	report form MlsStat noeject noconsole to printer
>	wait clear	
>endif
>When I executing it, it gives me an Error message: variable Deeds is not found. This error comes from the Report itself, there this field used. Hovewer, if I insert browse just before report form line, it works just fine. What am I missing here?
>
>Thanks in advance.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform