Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using a cursor for data groups and field sources
Message
From
10/05/2001 07:52:50
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00505202
Message ID:
00505670
Views:
23
>Thanks, Cetin.
>
>I played around with your idea and it works OK. The problem is that I need to have another table open for the report as well. Unless I can use two cursors (being sure there are no identical field names), I have to have a DE, no?
>
>Thanks again.
>
>Jim

Jim,
I would again say no DE but n cursors or tables :) What's nice about reports is that any cursor, table or variable that report firing routine sees are also seen by report (in scope :) even if they're local. ie :
lparameters tdStart, tdEnd
local var1
var1 = 5 
create cursor myCursor (dummy c(10))
select ... into cursor crs2 nofilter
select myCursor
append from dbf('crs2')
index on dummy tag dummy
select ... into cursor crs1
set relation to myField into myCursor
thisform.text1.value = 'Report can see me'
report form myReport preview
Report can see all cursors that this method can, it can see local var1, tdStart and tdEnd parameters and even can use thisform.text1.value :)
However honestly instead of multipl cursors,tables what I do is to create a final cursor just for the report (or view). If it's complex to create in one SQL than a series of SQL I do again to create final reporting cursor. That way browsing the final cursor I know what I'd get in report. It's easier than to manage relations.
Of course you could use DE but I don't know. It trapped me badly in old days and client < s > noticed the problem it took me hours till thinking there was a table in DE :) You see on my part it's kind of paranoia using DE again :)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform