Displaying data from two related tables

ferhanz

Registered User.
Local time
Today, 03:21
Joined
Jul 1, 2009
Messages
10
OK, i habe two tables "employee" and "warnings", one employee can be given many warnings, i have made there One to Many relationship and now i want to have a report where user will input employee ID in parameter and the report will be displayed of that particular employee on the upper half of the report and with all the warnings given to him in lower part, i have able to generate the report in which it takes input of employee ID and then diplayed the the employee detail and only ONE record from warning table.

Help me out


Farhan
 
Are you using a main report-sub report design? I would create a main report based on the employee table. I would then create a report based on the warnings table. Then make the warning report a subreport within the main employee report.
 
The simplest way to perform this would be to avoid sub reports. I would construct a quesry that will return the employeeID and the secondary table Warnings joined as you would normally. And have it sorted based on the employee ID where you have a group header for the employee and in the detail section you produce the warning information that you want.

Make sure that your query is producing multiple records though, I don't think your report is incorrect I believe your query is not produce the result set that you are looking for.
 

Users who are viewing this thread

Back
Top Bottom