Solved

Access report details

Posted on 2016-07-27
6
50 Views
Last Modified: 2016-07-28
Dear Experts,

There is MS ACCESS report based on 2 tables: tbl_task (parent) and tbl_subtask)child.
Report presentation grouped by task.
Some tasks have subtasks, then its fine. Both task and subtasks visible on the report.
Some tasks do not have subtasks. Then group is not visible on report.
Is there a way to see the group title even if its empty?

BRGDS,
0
Comment
Question by:hotelguest
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 19

Expert Comment

by:Eric Sherman
ID: 41731372
The Report Object can only group on what's in you underlying table ... if the task is not there it would be impossible to group on it.  I've done this in the past by making a table with all the possible tasks in it and creating a relation to your subtask table.  Then group on the task field in that unique listing all possible task.

Just an idea.

ET
0
 
LVL 37

Expert Comment

by:PatHartman
ID: 41731405
Typically tasks would be the main report and subtasks would be a subreport.  If you are using only a main report make sure that the join between tasks and subtasks is a left join.  That will return tasks even if they don't have subtasks.
0
 

Author Comment

by:hotelguest
ID: 41731492
Good day,

What is "left join"? I did not catch:(
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 19

Expert Comment

by:Eric Sherman
ID: 41731538
Join you tables such that all records from the tasks table are included even if there is no matching subtasks.  That's what I was referring to in my original post.  You don't want to join where the join field i.e. TaskID has to be present in both tables.

ET
0
 
LVL 37

Accepted Solution

by:
PatHartman earned 500 total points
ID: 41731558
The default join type is INNER.  With an inner join only rows from tableA that have a matching row in tableB are selected.  The other join type is OUTER which is broken into LEFT or RIGHT depending on your perspective.  A LEFT Join (outer is assumed), selects ALL rows from tableA and any matching rows from tableB.  So in your case you will get all tasks whether or not they have any subtasks whereas with an inner join, the query would return only tasks that have at least one subtask.  A RIGHT join is the same as a LEFT join but from the other direction.  It selects all rows in tableB and any matching rows in tableA.

I've attached a database I made that shows various join types.
SQLTraining.zip
0
 

Author Closing Comment

by:hotelguest
ID: 41732506
Thanks. Comprehensive. Clear. Works great.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question