Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Populating a Grid based on user selected variables
Message
From
22/06/1997 12:13:49
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Populating a Grid based on user selected variables
Miscellaneous
Thread ID:
00037356
Message ID:
00037356
Views:
71
I'm trying to create a form with a 3-tabbed page frame.
The first tab contains a graph and/or U.S. map representing a data set.
The second tab contains a grid of that data set.
The third tab contains a list box of line-of-business names and an option
group of state entity criteria (State Borders, State Operations and Territories).

I need to find the best way to populate the grid based on the user's selections
from the third tabbed page.

From what I've read, it seems that a parameterized view is what I need; but,
I can't get it to work correctly.
I've gotten the varible request dialog boxes during some attempts - I want the
variables to be taken from the values returned by the user's selections from the
Select Data page.
Another attempt gave me a blank grid rectangle and yet another attempt gave me
the grid without any data in it at all.

Background Info:
I have a table containing separate records for each state code, line-of-business
code and year.

Every state does not sell every line-of-business and some states may have started
selling a line-of-business in different years; so, I have to create an outer-join
with a lookup cursor created in my LOAD method consisting of a primary
key of stcode+lobcode+cyr.

Database: MIPS.DBC
Tables: IF1.DBF
(partial data structure)
stcode C(3)
lobcode C(2)
cyr C(4)
cmth C(2)
prmtotinf N(10,0)
STATES.DBF
(partial data structure)
stcode C(3)
stname C(20)
map C(4)
LOBS.DBF
(partial data structure)
lobcode C(2)
lobname C(20)
uinf N(1,0)

Cursor (after Outer-Join to add missing stcode
and lobcode and cyr records):
_IF1DATA (1734 records)
stcode C(3)
stname C(20)
lobcode C(2)
cyr C(4)
cmth C(2)
map C(4)
y0prmtot N(10,0)
y1prmtot N(10,0)
y2prmtot N(10,0)

View (CREATE SQL VIEW _if1rank AS ;
SELECT stname,y0prmtot,y1prmtot,y2prmtot ;
FROM _if1data ;
WHERE ;
lobcode = ?lcLOBCode AND ;
SUBSTR(map,?lnMapPos,1) = ?lcMapType ;
ORDER BY y0prmtot DESC):
_IF1RANK
stname C(20)
y0prmtot N(10,0)
y1prmtot N(10,0)
y2prmtot N(10,0)
Next
Reply
Map
View

Click here to load this message in the networking platform