Skip to main content
How to create a report template?

Learn the basics of creating a report template so that it can be used by end users to generate documents using project data

Frank Keizer avatar
Written by Frank Keizer
Updated over a month ago

Description

Read this article in case you want to learn how to build a report template that can be used by your project engineers to generate PDFs based on the actual data that is captured in levvr!

Explanation Video

Please watch this 8-minute explanation video, which takes you through all of the steps which are described further down below:

Step-by-step explanation

1. Create Report in Blueprint

First step is to go to your blueprint, navigate to reports using the toolbar on top, create a new report and give it a name of your choosing.

2. Add Views to your Report

Once you've done that, the next step is to add views to your report that will provide the data that you want to present within the generated report. To do this, click the "Add view" button and select the overviews you need, as is shown in the popup below:

A few things that are worth mentioning here:

  • You can select from the existing list of overviews that are already in your blueprint;

  • Only overviews can be selected for providing data to reports, not detail views;

  • In case the overview that contains the right data for your report is not there, you can just add a new overview that will provide that and connect it with your report;

  • You can select multiple overviews for a single report so that different kinds of information which might not be related in your model, can be included in a single report.

3. Copy Report Markers from Blueprint Report

Once you've selected the right views to your report, it is time to make sure that we copy the report markers which are used to instruct levvr on what places in the document it should put levvr data when users want to generate a report using your template.

4. Create Word Report Template & Paste Report Markers

Now that you've copied the report markers, open a new Word File that will serve as your Word Report Template and paste the report markers. This will then look something like this:

As you can see, the report markers are placed in the file, and this will later instruct levvr that whenever a verification name is found in the data structure, it should place it as a separate line in the document.

NOTE: newlines in within fields are ignored. By adding the tag ":convCRLF" newlines are not ignored and correctly reported. Example:

{d.Report.Workpackage[i].text} becomes

{d.Report.Workpackage[i].text:convCRLF}

Before moving on to the next step, there are 2 things worth mentioning here

  1. Report Output Structure

The structure of the data that is outputted in a report based on a view follows the following principles:

  • Viewname 1

    • Blueprint Rootnode Name

      • Blueprint Field Name 1

      • Blueprint Field Name 2

      • Blueprint Relationship_name

        • Blueprint Node Name

          • Blueprint Field 1

          • etc.

  • Viewname 2

    • etc.

Based on the example above, it looks like:

  • Verification_List

    • Verification

      • Name

As you can see in the Word example above, this is also how the report markers are structured; they follow the path of the data output which in the example above will lead to:

{d.Verification_List.Verification[i].Name}

2. Report Metadata

Another thing that is worth mentioning is that with each report, the following report markers are also generated:

  • Project name

  • Project id

  • Report name

  • Report generated on

  • Report generated by

5. Apply Formatting to Word Template

Now that you've copied the structure in your Word template, it is time to apply formatting! Upgrade some of your report markers to headings or transform them into tables so that the data is presented in the way you want.

Next to that, you can use all the other features Word offers in terms of footers, page numbers, logo's, table of contents and more!

6. Upload Word Template

Once you're done styling your Word template, it is time to upload it in your blueprint so that it can be used for generating.

7. Run & Download Report in Project

Once you've released the blueprint and updated your project accordingly, the report can be used by project teams. First step is to click on the report icon in the top right:

Now a popup will open, press new report and select the report you want to run:

The report is now generated and can be downloaded once it is finished. Your report will then look like this:

Did this answer your question?