Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
One additional weirdness today...
Message
 
 
À
18/01/2001 18:44:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00465374
Message ID:
00465549
Vues:
13
Alan,

Well, thanks for the observation. Actually, I didn't write this select statement, I just copied it from someone else's code. Today I found another bug in it and fixed it. I'll take a look. Without doubt, it would not deal with the problem, but anyway...

In my code I usually use count, not cnt, though I don't know the difference (should check it).

Thanks.

>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.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform