Home General

Crosstab not using all records?

edited April 2010 in General
Hi,

Using Delphi 6, RB 11.07 Enterprise.

I have created a query that lists all of the people in our database, joined
with a table that lists any training courses they have requested. Not
everyone has a training request, therefore a Left Join is used so that all
of the employees are listed in the query, regardless of whether they have a
training request record or not.

e.g.
Table1.Employee_number|Table2.Training_course_code|Table2.Target_date
1|Course1|31/07/2010
1|Course2|30/06/2010
2|Course1|30/06/2010
3|
4|Course3|31/05/2010
5|

You get the idea. If I put the fields out in the Detail band, I get all the
records as I do in the query preview.

The crosstab has been designed to show the employee number down the left
column, and the training courses along the top, with the target date in the
crosstab cell.

This works fine EXCEPT that it is ignoring those employees with no training
request records, i.e. employees 3 and 5 in the above example.

Is this by design? Is there any way to include those records, so that the
employee number shows in the left hand column but no dates appear in any of
the cells under the training courses?

Thanks,
Jason.
--
Jason Sweby
Software Development Manager,
Carval Computing Limited, Plymouth, UK

Payroll - HR - T&A - Access Control

Comments

  • edited April 2010
    "Jason Sweby" wrote in message
  • edited April 2010
    Hi Paul

    Using SQL Server, same on any version (2000, 2005, 2008).

    The Left Outer Join is working, as evidenced by the query preview, but the
    crosstab is eliminating records where there is no training request record
    for employees (which is the horizontal column at the top of the crosstab).

    Jason.

  • edited April 2010
    "Jason Sweby" wrote in message
  • edited April 2010
    "Paul Hughes" wrote in message
This discussion has been closed.