Want formatted report

G

Guest

Hi all,
I have two tables-(tblQueryDetails and tblWorkflow) with PK_Query_Id as the
primary key in tblQueryDetails and FK_Query_Id as foreign key in tblWorkflow.
Rule:each person can have many requests(queries) and each query in turn can
have many workflows.
i.e. 1 QueryId -- many workflowIds(one - many relationship)

tblQueryDetails --
PK_Query_Id (primary key)
Received_Date
FK_Request_From_Id
FK_Division_Id
FK_Request_Type_Id
FK_Status_Id

tblWorkflow--
WorkFlow_Id (primary key)
FK_Query_Id
What_To_Do
FK_Do_ByWho_Id
Do_Target_Date
What_Is_Done
FK_Done_ByWho_Id
Done_Target_Date

I want a report in this format(stepped)
Name(division)
------queryId---request from---request type---requestdate---status
-------------workflowid---What_To_Do---Do_ByWho---What_Is_Done---Done_ByWho
-------------workflowid---What_To_Do---Do_ByWho---What_Is_Done---Done_ByWho
-------------workflowid---What_To_Do---Do_ByWho---What_Is_Done---Done_ByWho
------queryId---request from---request type---requestdate---status
-------------workflowid---What_To_Do---Do_ByWho---What_Is_Done---Done_ByWho
-------------workflowid---What_To_Do---Do_ByWho---What_Is_Done---Done_ByWho


Note: the words 'Query' and 'Request' means the same here.
I'm not sure how to form a query and set specific properties of the report
to get this type of report.Please help.
 
G

Guest

I don't know if l could edit the question I posted few minutes ago.So
mentioning some more details for the same post---
The problem, I assume, why I am not getting the report as desired is -
I am storing the
1.-- id of the person( FK_Request_from_Id) in the tblQueryDetails
2.-- id of the person(FK_Do_ByWho_Id) in the tblWorkflow and
3.-- id of the person(FK_Done_ByWho_Id) in the tblWorkflow.
where as the actual name of the person is stored in the table tblEmployees.
tblEmployees--
Pk_emp_id
name
designation
Now , the problem is - HOW DO I RELATE THE NAME OF THE PERSON TO EACH OF THE
ABOVE 3 MENTIONED ID'S SO THAT THOUGH I AM STORING ID'S OF THE PERSONS IN THE
2 TABLES, I WANT TO DISPLAY NAMES OF THOSE PERSONS IN THE REPORT.
Can I set this within the query (I doubt though) or do I need to write some
code in the report_open event?
I hope I'm clear with my question.
 
G

Guest

Got the solution.While building the query,take 3 tblemployees.It will be
generated as tblEmployee,tblEmployee_1 and tblEmployee_2.Drag each of the
id's required from each of these employee tables and specify the condition.
for example-
for fk_request_from_id,drag the name from tblEmployees and give the criteria
as
[pk_emp_id]=[fk_request_from_id]
for fk_do_bywho_id, drag the name from tblEmployees_1 and give the criteria
as
[pk_emp_id]=[fk_do_bywho_id]
same with fk_done_bywho_id also.

-------------
Anand Vaidya
I'm here to know.


..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top