Wrox Programmer Forums
|
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 20th, 2004, 09:05 AM
Authorized User
 
Join Date: Jan 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default Data report dont'want repetition

I am using vb6.0 Oracle 8.1.6 and win 2k
Lets say I have 3 tables
Country has column
  country Id
  country name
  population
  area
provinces
  country Id
  province Id
  province name
  population
  area
city
  city ID
  city name
  province Id
  population
  area

Now I have to generate a report about the complete Country profile(detail it's province and cities)
(lets say country has 3 provinces and say province has 3,4,5 no of cities respectively)
for this I'll use the join query
now join query will return 12 records and all the 12 records have information about country is repeated in each record
information about the provinecs is repeated as well (according to the no of cities they have)

Problem is HOW CAN I PREVENT THIS REPETITION
and format of my report is loook something like this
Country name
Population
area
  Province 1
  population
  area
    city 1
    population
    are
    city 2
    ..
    .
    .
    .
  province 2
  population
  area
  .
  .
  .
  .


How it can be acheived or If u have some other solution do tell me

 
Old January 20th, 2004, 10:21 AM
Authorized User
 
Join Date: Dec 2003
Posts: 81
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You should be able to group them together. Check out the grouping and sorting properties of your query.. You can then group them by country and then by province This should do the trick

J

 
Old January 20th, 2004, 12:53 PM
Authorized User
 
Join Date: Jan 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by jrwlkn
 You should be able to group them together. Check out the grouping and sorting properties of your query.. You can then group them by country and then by province This should do the trick

J
U want to say use the broup by clause


Another Q
I want to make a report like this
(say the result of student in a mid term exams)

student_id English UrDu Physics Chymistry Grand total
               50 50 50 50 200

123 34 45 34 36 139
124 34 45 34 36 139
125 34 45 34 36 139
126 34 45 34 36 139
.
.
.
.

summary 136 180 136 144

here marks in subjects will be from one table
student_id
subject_id
term_id
marks_obt
the column of grand total from another table
student_id
ctotal_marks
cmarks_obt
term_id
and name of subject from other table
subject_name
subject_id
and name of students that are not mentioned from another table
student_id
fname
mname
lname

Actually my q is
1 here name is broken in to 3 parts How can I assign these 3 feilds to on rpt text box
how can I acheive this style of report




 
Old January 25th, 2004, 05:00 AM
Authorized User
 
Join Date: Jan 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Still looking for answer






Similar Threads
Thread Thread Starter Forum Replies Last Post
Combobox shows me repetition of entries... sat_u2 VB.NET 2002/2003 Basics 4 January 14th, 2008 02:51 PM
Help!!::XSLT Transformation to remove repetition i techno_savvy81 XML 0 September 19th, 2007 05:01 AM
Preventing repetition with Distinct? Raith SQL Language 2 May 29th, 2007 11:47 AM
How to edit report data after previewing report twt Access VBA 2 April 14th, 2005 06:35 AM
data environment in data report- error?Why myth12345 VB How-To 0 February 18th, 2005 03:08 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.