Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can you produce large xtab queries in a report????
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Can you produce large xtab queries in a report????
Miscellaneous
Thread ID:
00122329
Message ID:
00122329
Views:
45
I've been having the same problem for a while. My boss wants to have a cross-tab query in a VFP report absolutely. I've been trying to use multiple cursors with the following loop:

local lnRecords
local lnRecTotal
local lnFields
local lnFTotal

lnRecords = 0
lnRecTotal = 0
lnFields = 0
lnFTotal = 0

set default to 'c:/snag_w'
set path to ;data

select xtab
set safety off
select * from xtab into table temp_1

do while !eof()
do while !max(FCOUNT())
*do while lnRecords <= (lnRectotal + 12)
do while lnFields <= (lnFTotal + 10)
select * from xtab into cursor temp_1
lnFields = lnFields + 1
enddo
lnFTotal = lnFTotal + lnFields
lnFields = 0
skip
lnRecords = lnRecords + 1
enddo
lnRecTotal = lnRecTotal + lnRecords
skip page
if eof()
exit
endif
lnRecords = 0
enddo
enddo

My problem is:

some of my queries are huge depending on the parameters I'm using. I need to place the entire query in a landscape report where pages are skipped depending on the # of records in the query, and i must accomodate a large # of fields.

The more I seem to try to simplify it, the more complex it gets. I would like to know if I can use the _genxtab expression builder in the report designer, and if so how.

Thank you very much for your patience

Perry
Perry E. Chrzanowski
Programmer/Analyst
Saturn (Solutions) Inc.
Reply
Map
View

Click here to load this message in the networking platform