Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loop processing in Crystal 8 1

Status
Not open for further replies.

StateDBTech

Programmer
May 3, 2001
4
US
Is there a way to process a series of loops to sort through the database before the report is organized to aid in organizing the data........
 
As you can imagine, that is a big part of what makes up the activitiy of database software. Most major databases use a variation of SQL (Structured Query Language) to do this. Did you have something specific in mind? Malcolm
 
My basic problem is in having data in a hierarchy which determines how the data is displayed. Looking at Districts 1 and 2 in example below determines County A is present in both Districts so it will have to be brake down further to VTD's just like VTD B just under County A......

----------------------------------------------------------------

Example of simulated Report......

District 1 (contains)
County A (only VTD's present with District 1)
VTD A
VTD B (only Block's present with in District 1)
Block A
Block B
.
.
.
VTD C
.
.
.
.
County B
County C

District 2 (Contains)
County A (only VTD's present with District 2)
VTD B (only Block's present with in District 2)
Block f
Block g
.
.
.
VTD J
VTD K
VTD L
.
.
.
.
County D
County E
.
.
.
.

District 2 (Contains)
.
.
.
.
.
 
How to do this really depends on how the data is structured. Do you have a table with District, County, VTD, and Block in it? Malcolm
 
I have two tables(District and Block), District table contains Districts to Block and the Block table contains Blocks, VTD, and County; I linking the two via there Blocks....
 
you're looking for something like?
select t1.district, t2.county, t2.VTD, t2.block
from district t1 inner join block t2 on
t1.block = t2.block
order by t1.district, t2.county, t2.VTD, t2.block
Malcolm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top