Solved

Access report details

Posted on 2016-07-27
6
45 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
  • 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 35

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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
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 35

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Documents and settings folder 30 79
Display label on subreport when NO DATA on subreport 4 24
Dlookup MSACCESS 5 27
Export to Excel 7 17
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

825 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