Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to add a table to data environment in code?
Message
 
 
To
27/10/1998 12:39:04
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00151065
Message ID:
00151567
Views:
21
>>Long story - But the Fields listbox of the Expression Builder of the Report Expression window (wow!), will only show fields of tables in the data environment. I have a temp table that i want added to the data environment so that its fields will show in the Fields List Box.
>>
>>any ideas?
>>
>>thanks - brenda

>With thisform.dataenvironment && It has one already ? If not createobject(DE)
.addobject("myTempCursor","cursor")
.myTempCursor.CursorSource = dbf("crsTemp") && crsTemp is temp cursor
endwith

>Cetin

I want to add a cursor (maybe a table built from the cursor fields) to the dataenvironment of a report, not a form. Tried getting your code to work but had no luck.

in the command window

select * from testtable into cursor mycursor
create report myreport from mycursor column
modi report myreport

** now the report designer is up. is there automatically a dataenvironment associated with myreport? or must i add one? if i have to add one, what is the code?

report5.dataenvironment.addobject("tempcursor", "cursor")
** "object report5 not found" is the error message

really lost on this one. any help is appreicated.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform