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!

a newbie question 1

Status
Not open for further replies.

oracler

MIS
Oct 4, 2001
19
US
I got two tables. One is "employee", storing the information of employees, with "EmployeeID" as the primary key, and the other is"dependents", storing information of dependents of employees, with the "employeeID" as foreign Key,

I made a query to join the two table and use that query to make a report. However, I intended to have employee information followed by all his dependents' information, like this:

John Adams
Jane Adams, daughter
Mike Adams, son

However, the report gave me:

John, Adams
Jane Adams, daughter

John Adams
Mike Adams, son

How to do the query and report so that it can give me what I want?
Thanks in advance
 
I love newbie questions. Especially well written ones. :)

What you're looking for is the "Sorting and Grouping" button. When you open up your report design, it's next to the "Toolbox" button.

You should be able to figure it out from there. :)
 
Hi, Erik2. The "Sorting and Grouping" works fine if I only group the dependents without the employee, but when I group dependents under the name of each employee, the name of employee repeat again and again. Is the query wrong?
 
first, check your query. it should return one row for each dependent. the employee information will be repeated for each dependent.

Next, check the Sorting and Grouping button in the report. What you need is a Header for each employee.

Next, drop a textbox in the employee header that is bound to the employeeID. Finally, drop a textbox into the Detail section that is bound to the Dependent.

That should do it.

 
Thanks guys.
Jacksonmacd, I used your method and made it. Thank you. But have another problem to ask you. The lab is close now so I got to rush out. Post my question tomorrow.

Thanks again.
 
jacksonmacd

Gave you a star becasue you were so helpful to oracler.


Zaza
 
Hello, Guys.

I made the report I wanted almostly with your helps. However, There is another small problem. Now I put all Employee's information into employee header and left the information of dependents in the details, but in my table, there are some employees who do not have dependent, so in my report, there are large blank under each employees without dependents. like this:

John Adams
Jane Adams, daughter
XXXX
Mike Adams, son
XXXX

Mike Taylor



Ken Bush
Jane Bush, Daughter
XXXXX

How to eliminate those blanks if the employee has no dependents. A similar question is: because some fields in my dependent table is not required, such as email address. So in my report, there is large blank too if we don't have the information of the dependent in several fields. How to solve this problem? Thanks a lot!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top