2,299
edits
Changes
no edit summary
{{SeqReportPageHeaderBanner-UnderConstruction}}
In this process specific exercise, you will explore “joining” multiple tablescreate a query that uses the company table and the contact table.
* '''Report Name: '''List Companies and Contact* '''Report Description: '''This report joins the company and contacts table. 5. Click the '''Save '''button. You will now select the two tables that are required in the report. 6. Click on the new tab called '''[[Report Recordsets|Recordsets]] '''in the top row of tabs. :: [[ImageFile:Reps99Recordsets tab.png|750px|border]] 57. Set the primary table to '''Primary Table '''to '''Organizations '''and the '''Inner Join '''as '''Contacts.''' To do so, simply set both the '''Organizations '''field (found under the '''Company and Account '''heading) and the '''Contacts '''field (under '''Users and Contact) ''' table as an to '''Inner Join: ''' :: [[File:Company and contact inner join.png|250px|border]] : :* The '''Organizations '''recordset will report on company information that you have entered into the system, including all organization-specific [[Custom Fields]] that are related to organizations.:* The '''Contacts '''recordset will report on all contacts ''outside ''of your organization (although this does not automatically mean that they are [[External|external]] [[User|users]]). This table will include all contact-specific and [[User Role|role]]-based [[Custom Fields]]. 8. Scroll down to the bottom of the page and click '''Save.'''
=Inner and Outer Joins=
There are two types of joins supported in [[SmartSimple]] – inner joins and outer joins.
When you join the organization and contact table with an inner join, the report will find the matching record(s) from the contact table related to each organization. If no match is found, the record from the company is will not be included in the report results. If multiple resultsare found in the contact table, the company information will be repeated.
|}1. Open the '''Report BuilderBuilder '''by clicking on the four-square icon above the name of the report.
:: [[File:Report builder icon.png|border]]2. Add The report builder is opened in a modal window. Click into each field and select the '''following fields'''information:
:: [[File:Recordsets multiple table example.png|700px|border]]:: [[Image:Reps98.png]] The '''Field''' list now contains fields from both tablesSee [[Reports#Classic Report Builder - Column Settings|Classic Report Builder - Column Settings]] for more information about the report builder columns.
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]]