NI DIAdem Report Tutorial

 

Report

The DIAdem REPORT panel allows you to generate custom documentation with powerful visualizations of your data.   You can use any combination of 2D/3D chart axis system, tables, text, and graphic objects in a report.   You may generate multiple pages (worksheets) in a report, but each page must connect to data currently in the Data Portal.   A report with data from multiple files may be generated by exporting the REPORT sheet(s) to a PDF file, appending the pages from each data set.   Report templates may be created with custom layouts, logos, and formats to support easier generation of routine reports.  

REPORT GUI

Similar to the other DIAdem panels, the REPORT panel when activated has a custom set of menus, group bars, and toolbars.   One or more REPORT worksheets are supported.   If you save a worksheet, you may use it as a layout to create a new report with different data / channels, but the same initial formatting.   Reoccurring parts of a layout that are common to multiple layouts may be assigned to a 'master layout' that is liked to one or more subordinate layouts.  

NI DIAdem Data Portal

REPORT Objects

The REPORT group bar provides access to the various REPORT objects, spanning from tables, 2D, polar, spider, and 3D axis systems, pie charts, graphics, and text.   Each group bar has many sub group bars, providing easy access to the many object options.  

NI DIAdem Data Portal

REPORT Chart Wizard

The easiest way to explore what chart you want to use for your data is to use the Chart Wizard.   Clear the Data Portal by activating the NAVIGATOR panel and choosing the menu options 'File', 'New'.   From the NAVIGATOR panel, choose the menu options 'File', 'Open...' and then browse the folder 'C:\Program Files\National Instruments\DIAdem ####\Examples\Data\' and locate the file 'Example_data.tdm'.   Click on the REPORT group bar chart wizard and a special cursor appears.   Click on the upper left of an empty REPORT worksheet (10% away from the left and top) and then drag the cursor to about 10% of the distance from the bottom right and release the mouse button.   A 2D Axis System object will be added to the REPORT worksheet, and the 'Chart Wizard' dialog will appear.  

NI DIAdem Data Portal

Begin by choosing a 'Diagram type' of 'Line', and then hover the mouse over the 'Subtype' graphical options on the right.   Choose the subtype option 'Lines with several Y-Axes' and then click the 'Next >' button.  

NI DIAdem Data Portal

The sequence that follows for assigning channels will yield the most direct result and the minimum of steps.   If any channels are already assigned under the 'Curves' list, then use the 'X' button to delete them.   Click the '+' New Entry button.   Select the 'RPM', 'Torque', and 'Power' channels from the channel group 'Example' and then drag and drop them into the 'Add Curves' dialog 'Y-Channels' channel input control.  

NI DIAdem Data Portal

Select the 'Time' channel from the channel group 'Example' and then drag and drop it into the 'Add Curves' dialog 'X-channel' channel input control.   Click the 'Add Curves' dialog 'OK' button when finished.   Click the 'Chart Wizard' 'Next >' button to continue to the next step.  

NI DIAdem Data Portal

NI DIAdem Data Portal

Select the 'Curves' tab if it isn't shown.   The last column on the right of the curves list is labeled 'Y-Axis'.   This allows you to assign each curve to a particular Y-Axis location (Left, Right, Second left, or Second right).   Set each one to 'Left'.   Explore the other tabs by clicking on them and observing the options.   You can for example change the axis scaling from linear to logarithmic, assign custom axis labels, and format the axis colors.   When finished browsing, click the 'Finish' button.  

NI DIAdem Data Portal

NI DIAdem Data Portal

The Chart Wizard doesn't cover all of the REPORT chart options, but it does a great job of allowing you to visually explore chart types.   We want the Y axis setup as 'n Systems [linear]'.   Double click in the center of the report page.   The 'Curve and Axis Definition' dialog will appear.   Click on the 'Axis Position' tab and then under 'Axis system' click on 'N systems'.   Click the 'Preview' button to see the REPORT worksheet update with your selection.   Browse the other tabs to see the other possible changes you can make.   When done browsing, click the 'OK' button.  

NI DIAdem Data Portal

NI DIAdem Data Portal

Reports are normally generated and then exported to a PDF file, image file, html document, or even a PowerPoint file.   It is important to have the page layout configured properly prior to export.   Access the REPORT 'Settings' menu and choose 'Layout Setup', 'Layout Parameters'.   Click on the 'Worksheet' tab.   Set the Orientation to 'Landscape'.   Set the 'Page size' to 'Letter'.   Click the 'OK' button when finished.

NI DIAdem Data Portal

Next we will customize the report, adding a logo, and a title.   Resize the 2D Axis object by clicking on the object, and then grabbing the upper corner and dragging down until sufficient room is left for a logo at the upper left, and a title in the top middle.   Resize anything else that may be required for your layout.  

NI DIAdem Data Portal

Click on the REPORT 'Graphics' group bar and select the option 'Load Graphic'.   Browse to the folder 'C:\Users\Public\Documents\National Instruments\DIAdem 2021\Documents\' and select the 'Dummy.jpg' image file.   You could choose your own logo at this point.   Drag the graphic to the upper left corner of the worksheet.   Re-size it if necessary.   Double click on the image, and in the 'Graphic' dialog, check the checkbox labeled 'Embed graphic in layout when saving'.   This option is important, because you may want to be able to transfer your report layout to someone, or you don't want the graphic link to get lost because the source image is moved or deleted.  

NI DIAdem Data Portal

NI DIAdem Data Portal

NI DIAdem Data Portal

Next we will add a custom title to the report.   Click on the REPORT group bar 'Text' and choose the 'Comment' option.   Position the cursor over the top left of the report and drag and drop to the lower left to create a box area to hold the title.   Try to align the left and right corners of the comment object with the chart left and right axis.  

NI DIAdem Data Portal

Double click in the center of the comment object, and the 'Comment dialog will appear.   In the 'Text' input area, enter the text 'Engine Text'.   Click the 'Preview' button and observe the change to the report.   Under 'Alignment', change the 'Horizontal' to 'Center', and the 'Vertical' to 'Center'.   Change the 'Font size:' to '8'.   Click on the 'Frame' tab and set the 'Line color' to 'No Color'.   Click the 'Preview' button again, then the 'OK' button to accept the changes.  

NI DIAdem Data Portal

You may now export this report to several different file formats including the PDF, image, XPS, HTML, PowerPoint, and even the Windows clipboard.   From the REPORT menu, choose 'File', 'Export'.  

Generating Reports With Data From Multiple Files

When exporting a report worksheet, if you choose a PDF or PowerPoint file and it already exists, you will be given the choice to overwrite or append the report.   Generating reports from multiple data files and appending them as either a PDF or PowerPoint file enables you to generate a report with data from multiple files.  

Creating a Layout

Continuing from the prior tutorial, double click on the 2D axis chart, activate the 'Curve List' tab, and then use the 'X' button in the top right of the dialog to delete all of the curves.   Click the 'OK' button when finished.   The 2D axis line chart remains, but no curves are shown because no channels are assigned to them.   Save the worksheet as a layout by accessing the REPORT menu and choose 'File', 'Save', pick a folder to store the layout, and name it something like '2D chart - landscape.tdr'.   In the Data Portal, expand the channel group 'Noise data'

Clear the REPORT worksheet by clicking on the REPORT menu 'File', 'New'.   Open the REPORT layout you just saved.   Click on the NAVIGATOR panel and open the file named '2D_UserFormat.tdm' from the folder C:\Users\Public\Documents\National Instruments\DIAdem 2021\Data\ (make sure the file filter is set to 'National Instruments TDM Files (*.tdm)').   Click on the REPORT panel to make it active.   In the Data Portal, select the channels 'Date', 'ReallDiffTemp', and 'MeanDiffTemp' (in that sequence, always the X channel first), and then drag and drop them to the 2D axis chart.   Click the REPORT toolbar 'Refresh' button to insure the report is refreshed.   Edit the report title by double clicking on it and then assigning the text 'Temperature Study'.   Click the 'OK' button to close the 'Comment' button.   You have used a report layout to quickly generate a new report from a different set of data.  

NI DIAdem Data Portal

NI DIAdem Data Portal

What You Learned
  • The REPORT panel allows you to generate reports with a broad choice of chart types, as well including tables, graphics, and text, all formatted the way you want.  
  • The Chart Wizard helps you to visualize the different chart types available.  
  • A report layout may be saved and used again later as the basis for a new report.  

 

The Time Series Data Mangement System is an application built on NI DIAdem that can calculate channel statistics on a set of channels automatically across thousands of individual files, and then generate a report with those results.   An always free 'Base Edition' is available for download.  

 

 

Do you need help with your project?   Send me an email requesting a free phone / web share consultation.  


 

Copyright © 2021,2022,2023 Mechatronic Solutions LLC, All Rights Reserved