How do I Create a Dataset in Lasernet?
    • 17 Jun 2024
    • 2 Minutes to read
    • Contributors
    • PDF

    How do I Create a Dataset in Lasernet?

    • PDF

    Article summary

    This article will outline how to create a Dataset in Lasernet from XML data. Creating this Dataset will allow further functions to be executed and make the creation of Word and Excel output easier, given that both will not accept direct XML input and necessitate the creation of separate input Datasets instead.

    Data such as XML will need to go through a Dataset form to create a Dataset output which moves into a Richtext (Word/Excel) output form. This can be achieved with separate form engines or by looping the data back and using form criteria to ensure it reaches the right form.

    The following diagram shows how Input data goes through one form to become Dataset data and then into a Richtext output form to become an Excel, Word, or XHTML output. This article will focus on the first Form and the creation of the dataset data.

    You will need to open the Lasernet Developer and follow these steps:

    1. Create a new Form and select Dataset under the Output Format drop-down. Under the Input Format drop-down, the format should remain XML. Click Ok to finish.

    1. Once this Form has been created, locate the XML grab file and paste it into the input.

    2. Before an output structure can be created, the Pattern tool must be applied to the main elements.

    In the example, Pattern is applied to Item and Detail nodes.

    1. After the pattern has been mapped, rearranges must be assigned. Select the Rearrange tool and choose the required elements to rearrange.

    1. An output structure will now need to be created. First, switch to the Template tab at the bottom right of the screen. Then, right-click the Lasernet element and click Add Table.  

    1. When the Add Table box appears, input a table name and click Ok.

    1. Select and drag the input pattern elements to the output table. Click the CTRL key and drag the Item node to the Template tab of the output.

    Two options are provided when mapping the data from the XML sheet to the Template tab These can be seen in the following image:

    1. Choose the option Add pattern as a nested table, this will select the pattern name and create this as a table.

    A) All rearrange in this pattern will be nested in the Pattern table. The following image gives an example of this nesting, where Item is the pattern, and the rearranges are nested under each table:

    B) The option Merge pattern with table will combine the pattern and rearrange it within one table. The following image gives an example of this result. For this guide, use Option A above.

    We need to ensure a Master table is created to ensure ease of use when using this dataset output in a Word\Excel form. For example, a Master table exists below to encapsulate several tables.

    Once this has been completed, you can set a destination for a Dataset Input Form. The Dataset can be saved to produce a functional Dataset as a grab file in Dataset Input forms.

    To save, open the XML tab (bottom left of the second page), open the file, select Preview, and then click Save.  


    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.