2e97fca0044534c6a53c64242b3f88af25b84c24
FAQ/UserGuides/14.2-Basic-FORMS-Reports.md
| ... | ... | @@ -1,126 +0,0 @@ |
| 1 | -#3.0 Data Sources Tab |
|
| 2 | - |
|
| 3 | -[[_TOC_]] |
|
| 4 | - |
|
| 5 | -##About |
|
| 6 | - |
|
| 7 | -The Data Sources tab shows you which Tables or Views you have access to from the database. Your system administrator can set up the interface to simplify the data selection process, allowing for easier report creation and less time consumed trying to understand complex data models. |
|
| 8 | - |
|
| 9 | -##3.1 Simple Mode |
|
| 10 | - |
|
| 11 | -![]() |
|
| 12 | - |
|
| 13 | -The screenshot above takes a look at the simple view of the datasources tab. Tables and views are represented by checkboxes that become enabled/disabled based on the primary keys located in the selected items. This means that when you check one box, all tables that cannot be joined to it will automatically be disabled. After each subsequent table you join by clicking, the list of available tables that are valid candidates to join with will be refreshed (see image below). |
|
| 14 | - |
|
| 15 | -![]() |
|
| 16 | - |
|
| 17 | -##3.2 Admin Tips |
|
| 18 | - |
|
| 19 | -Report administrators should check out the following code samples for the methods of controlling user access to data sources. |
|
| 20 | - |
|
| 21 | -* [[VisibleDataSources|/API/CodeSamples/VisibleDataSources]] |
|
| 22 | -* [[Using Constraints|/API/CodeSamples/Using Constraints]] |
|
| 23 | -* [[ShowJoinDropDown|/API/CodeSamples/ShowJoinDropDown]] |
|
| 24 | - |
|
| 25 | -##3.3 Advanced Mode |
|
| 26 | - |
|
| 27 | -In Advanced Mode, you will have to select the relationships that exist between the tables or views yourself. You will start with a drop-down menu that lists the various Tables and Views that are available. The following section requires basic knowledge of database terminology. |
|
| 28 | - |
|
| 29 | -![The Primary Table Dropdown Menu]() |
|
| 30 | - |
|
| 31 | -To join two tables and/or views, they must have fields with identical primary/foreign keys. For example, in the Northwind sample database, both the **Customers** and the **Orders** tables have the same *CustomerID* field. These two tables will be able to be joined together using the **primary key** in the Customers table and the **foreign key** in the Orders table. Foreign keys are not required to have the same name as the primary key, but must possess a relationship that results in one or more selected rows when joined together. To add another table to join on, press the  button. |
|
| 32 | - |
|
| 33 | -The very first dropdown on the new row is the **Primary Table** dropdown menu (shown below). This is the table/view you want to join into your collection of Data Sources. This will hold all of your possible DataSources regardless if they have fields that can act as viable joining points to your source table/view or not. |
|
| 34 | - |
|
| 35 | -![The Primary Key Dropdown Menu]() |
|
| 36 | - |
|
| 37 | -When you select an additional Data Source, Izenda will automatically attempt to find what it thinks the appropriate relationship is. However, in this view the user has the capability to manually define what these relationships should be. To that end, there is the **Primary Key** dropdown. This dropdown appears to the right of your joined table/view and contains a list of all the fields for that table/view. Below is a screenshot showing what this looks like. |
|
| 38 | - |
|
| 39 | -![The Foreign Table Dropdown Menu]() |
|
| 40 | - |
|
| 41 | -The **Foreign Table** dropdown menu (shown below) is a list of the tables/views that have been selected previously. To eliminate self-referential issues, the table/view listed in the dropdown on the current row is not included. Select the table/view to join the table/view in that row. |
|
| 42 | - |
|
| 43 | -![The Foreign Key Dropdown Menu]() |
|
| 44 | - |
|
| 45 | -The **Foreign Key** dropdown menu (shown below) is a list of fields in the table/view that are selected in the **Foreign Table** dropdown menu to the left. Here you can select the field to join with the table/view in the **Primary Table** dropdown. |
|
| 46 | - |
|
| 47 | -![The Join Field Dropdown Menu]() |
|
| 48 | - |
|
| 49 | -The **Join Field** dropdown menu (shown below) is a list of options specifying how your Data Sources will be associated with each other and how data will be retrieved. Join types are explained in the Section 3.4. |
|
| 50 | - |
|
| 51 | -**Admins:** See Section 3.2 for information on how to show this field (off by default). |
|
| 52 | - |
|
| 53 | -###3.3.1 Understanding the Data Model |
|
| 54 | - |
|
| 55 | -Most users choosing to use the Advanced Mode need to have a clear understanding of the database schema to be able to quickly join tables together. Database schemas are blueprints of how the data is organized in the database. This mode does allow for greater flexibility in selecting the types of joins that can be performed, but is not recommended for most users. The database schema for the Northwind example database is displayed below. |
|
| 56 | - |
|
| 57 | -##3.4 Join Types |
|
| 58 | - |
|
| 59 | -The join type dropdown, as described above, is found to the right of the **Foreign key** field when joining Data Sources in Advanced Mode. By default, Izenda will perform a Left Join across the data sources selected. When this dropdown isn't shown, Izenda performs the default join operation. |
|
| 60 | - |
|
| 61 | -![Join Types Venn Diagram]() |
|
| 62 | - |
|
| 63 | -###3.4.1 SQL Samples of Various Join Types |
|
| 64 | - |
|
| 65 | -**Inner (Direct) Join:** Selects rows from two tables such that the value in one column of the first table also appears in a column of the second table. |
|
| 66 | - |
|
| 67 | -```sql |
|
| 68 | -SELECT DISTINCT |
|
| 69 | -[dbo].[Invoices].[CustomerName] AS 'Customer Name' |
|
| 70 | -FROM [dbo].[Orders] |
|
| 71 | -INNER JOIN [dbo].[Invoices] ON [dbo].[Invoices].[CustomerID]=[dbo].[Orders].[CustomerID]; |
|
| 72 | -``` |
|
| 73 | - |
|
| 74 | -**Cross Join:** A cross join will return a result table where each row from the first table is combined with each row from the second table. |
|
| 75 | - |
|
| 76 | -```sql |
|
| 77 | -SELECT DISTINCT |
|
| 78 | -[dbo].[Invoices].[CustomerName] AS 'Customer Name' |
|
| 79 | -FROM [dbo].[Orders] |
|
| 80 | -CROSS JOIN [dbo].[Invoices]; |
|
| 81 | -``` |
|
| 82 | - |
|
| 83 | -**Left(First Exists) Join:** The Left Outer Join known also as Left Join returns all rows from the left table in the Left Outer Join clause, no matter if the joined columns match. A field in a result row will be null if the corresponding input table did not contain a matching row. |
|
| 84 | - |
|
| 85 | -```sql |
|
| 86 | -SELECT DISTINCT |
|
| 87 | -[dbo].[Invoices].[CustomerName] AS 'Customer Name' |
|
| 88 | -FROM [dbo].[Orders] |
|
| 89 | -LEFT OUTER JOIN [dbo].[Invoices] ON [dbo].[Invoices].[CustomerID]=[dbo].[Orders].[CustomerID]; |
|
| 90 | -``` |
|
| 91 | - |
|
| 92 | -**Right Join:** The Right Outer Join known also as Right Join returns all rows from the right table in the Right Outer Join clause, no matter if the joined columns match. A field in a result row will be null if the corresponding input table did not contain a matching row. |
|
| 93 | - |
|
| 94 | -```sql |
|
| 95 | -SELECT DISTINCT |
|
| 96 | -[dbo].[Invoices].[CustomerName] AS 'Customer Name' |
|
| 97 | -FROM [dbo].[Orders] |
|
| 98 | -RIGHT OUTER JOIN [dbo].[Invoices] ON [dbo].[Invoices].[CustomerID]=[dbo].[Orders].[CustomerID]; |
|
| 99 | -``` |
|
| 100 | - |
|
| 101 | -**Full Join:** The Full Outer Join known also as Full Join returns all rows from Both the Right Outer Join & Left Outer Join. A field in a result row will be null if the corresponding input table did not contain a matching row. |
|
| 102 | - |
|
| 103 | -```sql |
|
| 104 | -SELECT DISTINCT |
|
| 105 | -[dbo].[Invoices].[CustomerName] AS 'Customer Name' |
|
| 106 | -FROM [dbo].[Orders] |
|
| 107 | -FULL OUTER JOIN [dbo].[Invoices] ON [dbo].[Invoices].[CustomerID]=[dbo].[Orders].[CustomerID]; |
|
| 108 | -``` |
|
| 109 | - |
|
| 110 | -##3.5 Function Buttons of Data Sources Tab |
|
| 111 | - |
|
| 112 | -At the far right of each joined table/view row on the Data Sources tab are several button controls(, , and . These are described below. |
|
| 113 | - |
|
| 114 | -![Function Buttons]() |
|
| 115 | - |
|
| 116 | -|**Icon**|**Control Name**|**Description**| |
|
| 117 | -|:------:|:--------------:|:-------------:| |
|
| 118 | -||Delete button|Click this button to delete the row the button is on.| |
|
| 119 | -||Insert Row Above Button|Click this button to insert a row above the row the button is on.| |
|
| 120 | -||Insert Row Below Button|Click this button to insert a row below the row the button is on.| |
|
| 121 | - |
|
| 122 | -##3.6 Custom Data Source Selection Page |
|
| 123 | - |
|
| 124 | -Since Izenda is a platform and not a set product, if the Simple or Advanced Modes do not fit your needs, you can have a customized Data Source Selection Page tailored to your preferences. The example below demonstrates a custom implementation using report categories to filter hundreds of tables and views to make the process even easier for end-users. |
|
| 125 | - |
|
| 126 | -![]() |
|
| ... | ... | \ No newline at end of file |
Guides/ReportDesign/3.0-Data-sources-tab.md
| ... | ... | @@ -0,0 +1,126 @@ |
| 1 | +#3.0 Data Sources Tab |
|
| 2 | + |
|
| 3 | +[[_TOC_]] |
|
| 4 | + |
|
| 5 | +##About |
|
| 6 | + |
|
| 7 | +The Data Sources tab shows you which Tables or Views you have access to from the database. Your system administrator can set up the interface to simplify the data selection process, allowing for easier report creation and less time consumed trying to understand complex data models. |
|
| 8 | + |
|
| 9 | +##3.1 Simple Mode |
|
| 10 | + |
|
| 11 | +![]() |
|
| 12 | + |
|
| 13 | +The screenshot above takes a look at the simple view of the datasources tab. Tables and views are represented by checkboxes that become enabled/disabled based on the primary keys located in the selected items. This means that when you check one box, all tables that cannot be joined to it will automatically be disabled. After each subsequent table you join by clicking, the list of available tables that are valid candidates to join with will be refreshed (see image below). |
|
| 14 | + |
|
| 15 | +![]() |
|
| 16 | + |
|
| 17 | +##3.2 Admin Tips |
|
| 18 | + |
|
| 19 | +Report administrators should check out the following code samples for the methods of controlling user access to data sources. |
|
| 20 | + |
|
| 21 | +* [[VisibleDataSources|/API/CodeSamples/VisibleDataSources]] |
|
| 22 | +* [[Using Constraints|/API/CodeSamples/Using Constraints]] |
|
| 23 | +* [[ShowJoinDropDown|/API/CodeSamples/ShowJoinDropDown]] |
|
| 24 | + |
|
| 25 | +##3.3 Advanced Mode |
|
| 26 | + |
|
| 27 | +In Advanced Mode, you will have to select the relationships that exist between the tables or views yourself. You will start with a drop-down menu that lists the various Tables and Views that are available. The following section requires basic knowledge of database terminology. |
|
| 28 | + |
|
| 29 | +![The Primary Table Dropdown Menu]() |
|
| 30 | + |
|
| 31 | +To join two tables and/or views, they must have fields with identical primary/foreign keys. For example, in the Northwind sample database, both the **Customers** and the **Orders** tables have the same *CustomerID* field. These two tables will be able to be joined together using the **primary key** in the Customers table and the **foreign key** in the Orders table. Foreign keys are not required to have the same name as the primary key, but must possess a relationship that results in one or more selected rows when joined together. To add another table to join on, press the  button. |
|
| 32 | + |
|
| 33 | +The very first dropdown on the new row is the **Primary Table** dropdown menu (shown below). This is the table/view you want to join into your collection of Data Sources. This will hold all of your possible DataSources regardless if they have fields that can act as viable joining points to your source table/view or not. |
|
| 34 | + |
|
| 35 | +![The Primary Key Dropdown Menu]() |
|
| 36 | + |
|
| 37 | +When you select an additional Data Source, Izenda will automatically attempt to find what it thinks the appropriate relationship is. However, in this view the user has the capability to manually define what these relationships should be. To that end, there is the **Primary Key** dropdown. This dropdown appears to the right of your joined table/view and contains a list of all the fields for that table/view. Below is a screenshot showing what this looks like. |
|
| 38 | + |
|
| 39 | +![The Foreign Table Dropdown Menu]() |
|
| 40 | + |
|
| 41 | +The **Foreign Table** dropdown menu (shown below) is a list of the tables/views that have been selected previously. To eliminate self-referential issues, the table/view listed in the dropdown on the current row is not included. Select the table/view to join the table/view in that row. |
|
| 42 | + |
|
| 43 | +![The Foreign Key Dropdown Menu]() |
|
| 44 | + |
|
| 45 | +The **Foreign Key** dropdown menu (shown below) is a list of fields in the table/view that are selected in the **Foreign Table** dropdown menu to the left. Here you can select the field to join with the table/view in the **Primary Table** dropdown. |
|
| 46 | + |
|
| 47 | +![The Join Field Dropdown Menu]() |
|
| 48 | + |
|
| 49 | +The **Join Field** dropdown menu (shown below) is a list of options specifying how your Data Sources will be associated with each other and how data will be retrieved. Join types are explained in the Section 3.4. |
|
| 50 | + |
|
| 51 | +**Admins:** See Section 3.2 for information on how to show this field (off by default). |
|
| 52 | + |
|
| 53 | +###3.3.1 Understanding the Data Model |
|
| 54 | + |
|
| 55 | +Most users choosing to use the Advanced Mode need to have a clear understanding of the database schema to be able to quickly join tables together. Database schemas are blueprints of how the data is organized in the database. This mode does allow for greater flexibility in selecting the types of joins that can be performed, but is not recommended for most users. The database schema for the Northwind example database is displayed below. |
|
| 56 | + |
|
| 57 | +##3.4 Join Types |
|
| 58 | + |
|
| 59 | +The join type dropdown, as described above, is found to the right of the **Foreign key** field when joining Data Sources in Advanced Mode. By default, Izenda will perform a Left Join across the data sources selected. When this dropdown isn't shown, Izenda performs the default join operation. |
|
| 60 | + |
|
| 61 | +![Join Types Venn Diagram]() |
|
| 62 | + |
|
| 63 | +###3.4.1 SQL Samples of Various Join Types |
|
| 64 | + |
|
| 65 | +**Inner (Direct) Join:** Selects rows from two tables such that the value in one column of the first table also appears in a column of the second table. |
|
| 66 | + |
|
| 67 | +```sql |
|
| 68 | +SELECT DISTINCT |
|
| 69 | +[dbo].[Invoices].[CustomerName] AS 'Customer Name' |
|
| 70 | +FROM [dbo].[Orders] |
|
| 71 | +INNER JOIN [dbo].[Invoices] ON [dbo].[Invoices].[CustomerID]=[dbo].[Orders].[CustomerID]; |
|
| 72 | +``` |
|
| 73 | + |
|
| 74 | +**Cross Join:** A cross join will return a result table where each row from the first table is combined with each row from the second table. |
|
| 75 | + |
|
| 76 | +```sql |
|
| 77 | +SELECT DISTINCT |
|
| 78 | +[dbo].[Invoices].[CustomerName] AS 'Customer Name' |
|
| 79 | +FROM [dbo].[Orders] |
|
| 80 | +CROSS JOIN [dbo].[Invoices]; |
|
| 81 | +``` |
|
| 82 | + |
|
| 83 | +**Left(First Exists) Join:** The Left Outer Join known also as Left Join returns all rows from the left table in the Left Outer Join clause, no matter if the joined columns match. A field in a result row will be null if the corresponding input table did not contain a matching row. |
|
| 84 | + |
|
| 85 | +```sql |
|
| 86 | +SELECT DISTINCT |
|
| 87 | +[dbo].[Invoices].[CustomerName] AS 'Customer Name' |
|
| 88 | +FROM [dbo].[Orders] |
|
| 89 | +LEFT OUTER JOIN [dbo].[Invoices] ON [dbo].[Invoices].[CustomerID]=[dbo].[Orders].[CustomerID]; |
|
| 90 | +``` |
|
| 91 | + |
|
| 92 | +**Right Join:** The Right Outer Join known also as Right Join returns all rows from the right table in the Right Outer Join clause, no matter if the joined columns match. A field in a result row will be null if the corresponding input table did not contain a matching row. |
|
| 93 | + |
|
| 94 | +```sql |
|
| 95 | +SELECT DISTINCT |
|
| 96 | +[dbo].[Invoices].[CustomerName] AS 'Customer Name' |
|
| 97 | +FROM [dbo].[Orders] |
|
| 98 | +RIGHT OUTER JOIN [dbo].[Invoices] ON [dbo].[Invoices].[CustomerID]=[dbo].[Orders].[CustomerID]; |
|
| 99 | +``` |
|
| 100 | + |
|
| 101 | +**Full Join:** The Full Outer Join known also as Full Join returns all rows from Both the Right Outer Join & Left Outer Join. A field in a result row will be null if the corresponding input table did not contain a matching row. |
|
| 102 | + |
|
| 103 | +```sql |
|
| 104 | +SELECT DISTINCT |
|
| 105 | +[dbo].[Invoices].[CustomerName] AS 'Customer Name' |
|
| 106 | +FROM [dbo].[Orders] |
|
| 107 | +FULL OUTER JOIN [dbo].[Invoices] ON [dbo].[Invoices].[CustomerID]=[dbo].[Orders].[CustomerID]; |
|
| 108 | +``` |
|
| 109 | + |
|
| 110 | +##3.5 Function Buttons of Data Sources Tab |
|
| 111 | + |
|
| 112 | +At the far right of each joined table/view row on the Data Sources tab are several button controls(, , and . These are described below. |
|
| 113 | + |
|
| 114 | +![Function Buttons]() |
|
| 115 | + |
|
| 116 | +|**Icon**|**Control Name**|**Description**| |
|
| 117 | +|:------:|:--------------:|:-------------:| |
|
| 118 | +||Delete button|Click this button to delete the row the button is on.| |
|
| 119 | +||Insert Row Above Button|Click this button to insert a row above the row the button is on.| |
|
| 120 | +||Insert Row Below Button|Click this button to insert a row below the row the button is on.| |
|
| 121 | + |
|
| 122 | +##3.6 Custom Data Source Selection Page |
|
| 123 | + |
|
| 124 | +Since Izenda is a platform and not a set product, if the Simple or Advanced Modes do not fit your needs, you can have a customized Data Source Selection Page tailored to your preferences. The example below demonstrates a custom implementation using report categories to filter hundreds of tables and views to make the process even easier for end-users. |
|
| 125 | + |
|
| 126 | +![]() |
|
| ... | ... | \ No newline at end of file |