Discussion:
how to do report
(too old to reply)
a
2005-07-13 05:41:09 UTC
Permalink
is it possible to create a report with three tables, in which joined
together?

the tables structure:-
a.dbf

a_id char(7) primary key
a_title char(10)
a_bar memo

b.dbf

a_id char(7) foreign key (a.dbf)
b_ex char(10)

c.dbf

a_id char(7) foreign key (a.dbf)
c_ex


and the sample data of the three tables:-
a.dbf

a_id a_title a_bar
001 abchdii dh duiijjodkop dhjj
002 sdihjijdi dhijid dhjijid
003 sduihij s shih siijs

b.dbf

a_id b_ex
001 good or bad
001 black or white
002 iijs
002 shjidjjdc dhh
001 iid dihjjd

c.dbf

a_id c_ex
001 sihid djojk
003 dbhihd dhij9jdn
003 is it

and the report should display as follows:-

001 abchdii dh

duiijjodkop dhjj

(from table b)
good or bad
black or white
iid dihjjd

(from table c)
sihid djojk

002 sdihjijdi

dhijid dhjijid

(from table b)
iijs
shjidjjdc dhh

003 sduihij s

shih siijs

(from table c)
dbhihd dhij9jdn
is it

Thanks so much!
Cindy Winegarden
2005-07-13 14:52:20 UTC
Permalink
Hi A,

Your example is pretty confusing but you can handle most reports by
assembling the data exactly the way you want it (using SQL or other methods)
and print from the temporary cursor. You may need to use a "multi-child"
format which is available in VFP9. You'll get an idea how to do that in
earlier versions from
http://fox.wikis.com/wc.dll?Wiki~MultiChildFoxProReports .
--
Cindy Winegarden MCSD, Microsoft Visual Foxpro MVP
***@msn.com www.cindywinegarden.com
Blog: http://spaces.msn.com/members/cindywinegarden
Post by a
is it possible to create a report with three tables, in which joined
together?
the tables structure:-
a.dbf
a_id char(7) primary key
a_title char(10)
a_bar memo
b.dbf
a_id char(7) foreign key (a.dbf)
b_ex char(10)
c.dbf
a_id char(7) foreign key (a.dbf)
c_ex
and the sample data of the three tables:-
a.dbf
a_id a_title a_bar
001 abchdii dh duiijjodkop dhjj
002 sdihjijdi dhijid dhjijid
003 sduihij s shih siijs
b.dbf
a_id b_ex
001 good or bad
001 black or white
002 iijs
002 shjidjjdc dhh
001 iid dihjjd
c.dbf
a_id c_ex
001 sihid djojk
003 dbhihd dhij9jdn
003 is it
and the report should display as follows:-
001 abchdii dh
duiijjodkop dhjj
(from table b)
good or bad
black or white
iid dihjjd
(from table c)
sihid djojk
002 sdihjijdi
dhijid dhjijid
(from table b)
iijs
shjidjjdc dhh
003 sduihij s
shih siijs
(from table c)
dbhihd dhij9jdn
is it
Thanks so much!
Loading...