Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show all records

Status
Not open for further replies.

scuba79

Technical User
Mar 30, 2004
1
US
I'm new to CR. I'm using CR 9 with SQL 2000 data tables. I have a report that contains two tables. One of the tables has ten employees listed in them. The other table only contains data about 7 of the 10 employees.

When I run the report it only shows the 7 employees with data. I'm linking the two tables via the employee id (integer field).

How can I have the other employees show up with zero(s) on the report?

Thanks
 
Use a left join FROM the table with 10 employees TO the table with 7. If there is a number field in the second table that you want to appear as zero, then create a formula:

if isnull({table2.numberfield}) then 0 else {table2.numberfield}

-LB
 
Adding to LB's suggestion, note that if you palce any criteria on the second table (the one with 7), you'll be back to only receiving 7 or less rows.

To change the link to a Left Outer, select Database->Visual Linking Expert, select the line showing the link between the tables and choose Link Options.

Select Left Outer.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top