--- title: "Query Links - Links - Lasernet FO Connector User Guide" slug: "query-links" description: "Query links enable users to combine multiple Queries and maintain and reuse a Query for multiple reports. Read for more information." updated: 2026-03-24T13:59:02Z published: 2026-03-24T13:59:02Z canonical: "kb.lasernetgroup.com/query-links" --- > ## Documentation Index > Fetch the complete documentation index at: https://kb.lasernetgroup.com/llms.txt > Use this file to discover all available pages before exploring further. # Query Links Subreports and Query Links are accessible through the **Query links** feature located in **Lasernet** > **Common** > **Reports**. Query Links enable users to combine multiple queries and maintain and reuse a query for multiple reports. This is useful if the same information from a single query is needed on multiple reports, such as **CompanyInfo**. Query Links work similarly to subreports but offer improved performance, especially when used at the line/details level. Query Links can be added through the Query Wizard using the **Copy/Link query** option. Alternatively, existing subreports can be converted into Query Links from within the Structure using the **Convert to query link** option. ## Example: Add a Query Link Using Copy/Link Query In this scenario, the **FPCompanyInfo** query contains the company information (data sources and tables): ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-REVK9UCJ.png) ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-1G3L5I0V.png) Follow these steps: 1. Locate the replacement report or query to which **FPCompanyInfo** should be linked. The report **SalesPackingSlipReplacement** and the **FPCompanyInfo** are linked to the data source table **CustPackingSlipJour**. 2. Open the Query Wizard and navigate to the **Tables** page. There, click **Copy/Link query** and choose which table the query should be linked to. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-J9DHL3RZ.png) 1. Select or enter the query name **FPCompanyInfo** in the field **Source report**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-A5AWY3Z2.png) Toggling the **Link (updates query on source change)** button to **Yes** creates a reference to the query (instead of just copying the query) and ensures the following options become available: | Options | Description | | --- | --- | | Host report | The report that receives the query link. The link is added to this report. | | Destination anchor data source | The data source within the host report where the query link is attached. | | Source report | The report containing the query to be linked. | | Source query | The specific query (or subquery) in the source report to link. When the source report contains multiple queries or nested subqueries, the appropriate one must be selected here. | | Link (updates query on source change) | **No**: The query is copied into an existing query. **Yes**: A link/reference is created. | | Keep original output names | Used to preserve the layout and naming from the linked query (**Layout**: **Min**, **Medium**, **Max**). | | Synchronize custom elements | Used to synchronize and update custom elements (in yellow). | | Create an element for the main query | Used to make the query name part of the output. | A link to the query **FPCompanyInfo** is added to the query. **Query_1 (Linked from FPCompanyInfo)** is a link to a query and not a copy: ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-3S0OIPC5.png) Toggling the **Link (updates query on source change)** button to **No** creates a copy instead of a link to the query: ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-RA5MGGBZ.png) ## Example: Convert a Subreport Using Convert to Query Link In this scenario, the query contains the following company information: ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-CP4GL8ZO.png) ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-YXSRRN8Z.png) This query is used as a subreport in the **SalesInvoiceReplacement** query. Follow these steps: 1. Open the **Structure** for the **SalesInvoiceReplacement** query and identify the subreport element. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-TO5FSE7U.png) 1. Click **Tools** > **Convert to query link**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-ZHOM5PC4.png) This converts the subreport into a query link. The structure of the subreport is added to the structure of the **SalesInvoiceReplacement**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-VLB8GAIO.png) The existing subreport element is automatically made invisible when the **Code** condition is set to **0**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-GV16L1I6.png) 1. Navigate to the Reports page, select **SalesInvoiceReplacement**, and click the **Query links** option on the Action pane. Here, you can see the subreports and query links associated with the host report. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-OKF2FPV0.png) ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-V9B5895P.png) 1. Open the Query Wizard for the **SalesInvoiceReplacement**. The query link is visible and configurable through the Query Wizard's **Copy/Link query** option. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-0HJIW3F3.png) ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-S7VFJSM0.png) 1. Now that the subreport has been added as a query link, ensure that all patterns and rearranges are properly mapped in the Lasernet form design. ## Example: Add a Query Link to a Report with Multiple Queries Using the Source Query Selection In this scenario, the **CompanyInfo_MultiQuery** query contains the company information (data sources and tables) and is made up of a query and subquery: ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-C750QYEQ.png) ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-0T20BMAL.png) Follow these steps: 1. Locate the replacement report or query to which **CompanyInfo_MultiQuery** should be linked. The report **SalesInvoiceReplacement** and the **CompanyInfo_MultiQuery** are linked to the data source table **CustInvoiceJour**. 2. Open the Query Wizard and navigate to the **Tables** page. There, click **Copy/Link query** and choose which table the query should be linked to. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-FSR842XC.png) 1. Select or enter the query name **CompanyInfo_MultiQuery** in the **Source report** field. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-EEG8BT4B.png) 1. Since **CompanyInfo_MultiQuery** contains multiple queries, use the **Source query** dropdown to choose which one to copy/link from. In this example, **DirPartyTableQuery** is a subquery of **CompanyInfoQuery**. - Selecting **CompanyInfoQuery** (the root) copies all of its data sources plus the subquery. - Selecting **DirPartyTableQuery** copies only the data sources that belong to that subquery. The **Name mapping** section automatically updates to reflect the data sources included based on the selected source query. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-D3HS479R.png) 1. Toggling the **Link (updates query on source change)** button to **Yes** creates a reference to the query (instead of just copying the query) and ensure the relevant options become available. 2. A link to the query **CompanyInfo_MultiQuery** is now added to the query. **CompanyInfoQuery (Linked from CompanyInfo_MultiQuery)** is a link to a query and not a copy: ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-8XB9YAFB.png) Toggling the **Link (updates query on source change)** button to **No** creates a copy instead of a link to the query: ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-2TMMMHRS.png)