2,299
edits
Changes
no edit summary
In this article, you will create one of the most useful reporting features – the ability to relate the information from two tables into a single report.
In this process you will explore “joining” multiple tables.
In this exercise, you will create a query that uses the company table and the contact table.
1. Create a '''new report''' with Click the following values:9-square menu icon on the top right of your page.
The list of available reports in your system will be displayed. 3. Scroll to the Click the '''Table+ icon ''' on the top left, above the [[List View Overview|list]] of reports, to create a '''New Report.'''
4. Set the primary table to the The '''Companies/AccountsNew Report '''page is displayed, with fields for you to fill out.
:: [[ImageFile:Reps99New report pag.png|700px|border]] 5. Set the '''Contact''' table as an '''Inner Join'''.
* An '''inner joinReport Name: ''' displays the intersection between List Companies and Contact* '''Report Description: '''Joins the two tablescompany and contacts table.
:*If multiple results are found in the contact table, the company information will be repeated: [[File:Recordsets tab.png|750px|border]]
[[Image:1. Open the '''Report Builder'''Reps99.png]]
:3* This is the most common type of join used, and is the default join type when you [[Adding a Table to a Report|add tables to a report]]. '''Build''':* When you join the company table and the contact table with an inner join, '''save'''the report will find the matching record(s) from the contact table related to each company.:* If no match is found, the record from the company is not included in the results.:* If multiple results are found in the contact table, and '''preview''' the reportcompany information will be repeated.
:* This means that if there are no records in the contact table, a row in the report will still be returned for that company, but with NULL values for each column from contact.1. Open the '''Report Builder'''.: 2. Add the '''following fields''':: [[Image:Reps98.png]]:* The '''Field''' list now contains fields from both tables.3. '''Build''', '''save''', and '''preview''' the report.: [[Image:Reps97.png]]:* The company name, city, and state information is displayed from the company table for each matching record from the contact table.:*No company details will be displayed if there are no contacts.
{{PrevNextStart}} [[Creating a Public – Internet Enabled Report]]{{PrevNextMid}} [[Using an Outer Join]] {{PrevNextEnd}}
[[Category:Reports]]