Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
One additional weirdness today...
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00465374
Message ID:
00465441
Views:
14
Could be,

The best thing would be using an absolute reference in the report, like table.field but it looks like you are using different aliases here.

But if it was the alias it should also hang on the other fields, or give wrong results if it gets data from a diferent table.

Another thing is that VFP don't support threading, so the code in the timer event should wait till this command has run.



>Hi Ko,
>
>I think, I have a vague idea, why does it happen. I just checked it again, if I insert the Browse command just before REPORT FORM, it works fine. Otherwise it gives me this stupid error. I guess, it switches aliases somehow. The problem is, that this is a program, (Special app) which runs in a Form's DS. I believe Form uses a timer (this is not my application, so I don't know for sure). Therefore, this timer interfers with my program somehow. Now, does my explanation seem reasonable? What should be a workaround? In the meantime I ask my colleague, is it possible and what does she think. I probably would reorganize the special app to run in it's own DS by using session class (I already implemented it in another app with success).
>
>>Just Trial and error, but what happes if you place go top before you print the report
>>

>>>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
Reply
Map
View

Click here to load this message in the networking platform