--- title: "Best Practices for Lasernet FO Connector - Overview" slug: "best-practices-for-lasernet-fo-connector" description: "This article highlights the best practices for Replacement reports, Tables/Fields, Subreports, Group by/Calculations, Size of XML file." updated: 2026-01-21T11:40:58Z published: 2026-01-21T11:40:58Z canonical: "kb.lasernetgroup.com/best-practices-for-lasernet-fo-connector" --- > ## 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. # Best Practices for Lasernet FO Connector This article highlights the best practices for the following Lasernet FO Connector features: - Replacement reports - Tables/Fields - SubReports - Group by/calculations - Size of the XML file ## Replacement Reports Use a replacement report instead of an SSRS report. The replacement report often provides better performance and offers the features of the Query Wizard. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1623936298910.png) Follow these steps: 1. On the **Replacement report** page, click **CREATE NEW** to name the replacement report. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1624018788421.png) > [!NOTE] > Info > > The prefix of the report name should be the same as the SSRS report name. This way, they will be close to each other in the report list and easily identifiable. A new query report is created (the SSRS setup, such as Form Links and Archive, is copied). In the SSRS report, you can see that it has been replaced by your replacement report. You can now forward your work with the replacement/query report. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1624019317681.png) 1. Click **Data sources** and delete all the tables you wish to delete. Use the Query Wizard to add the necessary tables. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1624019454755.png) ## Tables/Fields Add tables and fields within the Query Wizard and avoid using Data Sources to add tables. Avoid adding fields using the **Structure** option. Your manually created fields are displayed in yellow; delete these and add them again by using the Query Wizard. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1624019771011.png) ## SubReports Instead of using a subreport, create a new query using the Query Wizard. > [!NOTE] > Note > > This is only possible starting from Lasernet FO Connector 6.1. ### Example - How to Add Table=CompanyInfo 1. Open the Query Wizard, then click **Next**, and then **Next** again. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1624021054599.png) 1. Place your cursor on the table where you want to add a new query and click the **+** (plus) button. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1624024490835.png) 1. Give the query a name, add **Table=CompanyInfo**, and set up/check relations. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1624024745037.png) 1. Add fields as normal, and the result will appear: ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-GH5AKHX4.png) ## Group By > [!NOTE] > Note > > This is only possible starting from Lasernet FO Connector 6.1. Consider whether this feature will help reduce the XML file size and perform the calculations from the Lasernet Connector. 1. Navigate to **Tables** in the Query Wizard and add a new query. 2. Set the property **Group by** to **Yes**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-7XUZ4WI2.png) 1. Add the table you want to group by. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1624025337938.png) 1. Add the fields you want to group by. This will provide one record per **Itemid** and **DatePhysical**. Result: ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-OCX19JIG.png) ## Calculations > [!NOTE] > Note > > This is only possible starting from Lasernet FO Connector 6.1. You can also calculate your fields. Navigate to the **Selected fields** section in the Query Wizard and add the field you wish to calculate. You can set up your calculation within the **PROPERTIES** section. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1624025602643(1).png) It is also possible to write Direct SQL by choosing **Custom** in the property **Group by function**: `SELECT SUM(SalesLine.QtyOrdered) FROM SalesLine WHERE SalesLine.ItemId=InventTable.itemId` ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1624025796353(1).png) Result: ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-RVUDWSDY.png) The sum is for all legal entities/companies. To obtain the sum by legal entities/companies, follow these steps: 1. Add **Field=DataAreaId** to your table using the right arrow button. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1624025962193.png) 1. The following dialog will be displayed. Click **Yes**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1624026078165.png) 1. Change your **Direct SQL** to include **DataAreaId** in your **WHERE** clause: `SELECT SUM(salesLine.QtyOrdered) FROM SalesLine WHERE SalesLine.ItemId=InventTable.itemId AND SalesLine.DataAreaId=InventTable.DataAreaId` Result: ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-EK5J04WK.png) ## Size of the XML File The smaller the XML/Grab file is, the better the performance will be. Try to set up your structure and calculations in the Lasernet Connector as much as possible. Follow these steps as a guide: 1. Delete unused tables and fields in the Query Wizard. 2. Test your report with real and sufficient data. 3. Check your table relations to ensure that you do not get unnecessary data/structures. 4. Use the Lasernet Connector to group and calculate data; it is often faster than, for example, using an XML transformer in Lasernet Developer.