I'm trying to display some data from a MS Access database to a data report. It was successful, unfortunately, I need to display it in the format below:


emp_name date remarks
date remarks
date remarks
date remarks

emp_name date remarks
date remarks
date remarks
date remarks
....

and here's the SQL command I'm trying to use:

SELECT Employee_Table.emp_name, date, remarks FROM Employee_Table INNER JOIN Login_Table ON Employee_Table.emp_id=Login_Table.emp_id

can anybody please help me?
thanks.

If I understand this correctly, you need to laod a few remarks on different dates from an employee. This means that you first need to get all the data from one employee before continuing to the next. I would suggest using a for, next loop as in

for x = 0 to rsEmployee.Recordcount
set datagrid.Datasource = rsEmployee
next x

I have not tested anything here, but I think this is the direction you need to follow to load the grid with all respective remarks before loading another employees remarks.

Dear sir
I m using vb and access from many years. If U please clarify wt U need,I m sure to help u.

U may aslo send ur project for necessary modifications

Bashir Ahmad Bhat
Govt.College Tral Kashmir

Create a dataenvironment. modify ur sql statement as
SELECT Employee_Table.emp_name, date, remarks FROM Employee_Table INNER JOIN Login_Table ON Employee_Table.emp_id=Login_Table.emp_id group by emp_name

retrieve the structure of the data report to so as to match the dataenv. object. and drag the fields to respective sections in the Data report

Hope it will help u.

If I understand this correctly, you need to laod a few remarks on different dates from an employee. This means that you first need to get all the data from one employee before continuing to the next. I would suggest using a for, next loop as in

for x = 0 to rsEmployee.Recordcount
set datagrid.Datasource = rsEmployee
next x

I have not tested anything here, but I think this is the direction you need to follow to load the grid with all respective remarks before loading another employees remarks.

Dear sir

Ur reply will surely not work as the datasource property of a datareport is not set for each record but only once in the design or run time
thx

This article has been dead for over six months. Start a new discussion instead.