core

### Tutorial - Creating a Report Template

This topic walks you through a very basic tutorial that will create a simple report template with a few objects and some labels. This should give you a basic overview of how things work together so that you can create and use your own report templates.

In order to give you a good foundation on how to use the template editors, this tutorial shows how to create a report template from scratch. However, in practical use, you will most likely find it much easier to customize one of the standard templates to suit your needs.

Before beginning this tutorial, create a simple measurement routine that can measure four circles on a simple part. This tutorial uses the Hexagon test block (Hexblock_Wireframe_Surface.igs).

Create a measurement routine that measures four circles, similar to this.

Click on the links below to expand or collapse each step of instructions as needed. Some steps may also include a demo video of that step. For best results, maximize your help viewer before you view any videos.

Step 1: Create a Blank Report Template

1. Select File | Reporting | New | Report Template to access the Report Template Editor. A blank report template automatically appears.

2. To hide any unused toolbars, right-click on the toolbar area and remove them.

3. To hide any unused PC-DMIS windows, select the open window from the View menu.

4. Click the maximize button on the editor's window to maximize the template editor. You should see the words "REPORT" on the background of the editor, and your editor should have a "Section1" tab at the bottom. Your Report Template Editor should now look something like this:

   Step 1: Report Template Editor

When working with one of the template editors, you may find it helpful to hide your usual PC-DMIS toolbars and windows, thereby freeing up some screen space. If you work frequently with templates, you may want to create a stored screen layout for your template. For information on layouts, see the "Window Layouts Toolbar" topic in the "Using Toolbars" chapter.

In addition, you may find it useful to create your own toolbar with the File | Reporting commands on it. For information on how to create custom toolbars, see the "Customizing Toolbars" topic in the "Customizing the User Interface" chapter.

Step 2: Insert and Format a Text Object for a Section Title

1. From the Object Bar, click on a Text object.

2. Insert it into the report by dragging a rectangle onto the current section. When you release the mouse, the object is selected, as shown by small green squares, called handles, at each corner of the object.

   A sample Text object showing handles

3. Select the Text object you inserted, and drag the green handles so that it has a height of 1 inch and a length of 6 inches. Use the Ruler Bars on the top and left border of the editor as needed. Select View | Ruler Bars if the rulers aren't available.

4. Right-click on the Text object.

5. Select the BackColor property and change it to a light blue color (0.255.255).

6. Click the ForeColor property and change it to a dark blue color (0.0.128).

7. Select the BorderStyle property and change it to Normal.

8. Click the LineWidth property and change the value to 5.

9. Click the Text property and change it to "A Custom Report".

10. Click the Font property. The Font dialog box appears.

11. Change the Size to 20, the Font Style to Bold, and the Font to Arial.

12. Click OK.

You have formatted your text object. It should look similar to this:

You must have an active Internet connection to see this video.

Step 3: Make Properties User Assignable

1. Select the Text object you created in the previous step.

2. Right-click on the object. This causes the Properties dialog box for that object to appear on the right side of the editor. On the left side of the dialog box you will see check boxes next to most properties. These check boxes determine what properties you can make user definable.

   Sample Property Sheet for a Text object. Notice the user definable check boxes on the left.

3. Select the check box to the left of the Text property. A User Assigned Property dialog box appears, asking you to determine the message that will prompt the user for the property value and when the user should be prompted.

   User Assigned Property dialog box

4. In the Prompt box, type "Type Your Report's Title Now".

5. Select the Prompt when executing Measurement Routine option.

6. Click OK. The User Assigned Property dialog box closes.

7. Select the check box to the left of the BackColor property. In the resulting dialog box, type "Choose Your Background Color Now" for the prompt, and once more, choose the Prompt when report is executed option.

8. Click OK. The User Assigned Property dialog box closes.

In this step, you selected two properties and made them "user assignable". This means whoever executes your measurement routine will be able to set these properties.

You must have an active Internet connection to see this video.

Step 4: Add a TextReportObject

1. From the editor's Object Bar, click on the TextReportObject icon . Your mouse pointer will change from an arrow pointer to a cross.

2. Add the TextReportObject on the template by dragging a box on your template's section. PC-DMIS automatically adds some default filler report text. When you apply this template to your report, PC-DMIS will use your actual report data. This filler text simply helps you understand what your design will look like. Your object should look something like this:

   Sample TextReportObject

3. Size the object so that its close to the width of the Text object you added earlier. You can size the object by clicking and dragging one of the green boxes (or "handles") surrounding the object.

4. Select the Text object you added earlier. Hold down the Shift key and select the TextReportObject. This selects both objects.

5. With both selected, use the Layout Bar, and click the appropriate Make Same Size and Align Center icons to make the objects the same width and to align them so that they are centered in between the left and right sides of the editor.

Your template should now have a TextReportObject on the first section.

You must have an active Internet connection to see this video.

Step 5: Add a New Section to the Template

1. Make sure your Report Template Editor window is maximized.

2. Scroll to the very bottom of your template.

3. Right-click on the Section1 tab.

4. Select Add Tab from the shortcut menu. PC-DMIS inserts a new section, Section2, into your template.

Your template should now have two sections, like this:

You must have an active Internet connection to see this video.

Step 6: Add a CADReportObject

1. Click on the Section2 tab to make that the active section.

2. From the editor's Object Bar, click on the CADReportObject icon . Your mouse pointer changes from an arrow to a cross.

3. Add the CADReportObject on the template by dragging a box on your template's section. Size the box so that it measures about 6 inches wide and 4 inches tall. You can size the object by clicking and dragging one of the green boxes surrounding the object.

4. When you finish drawing the box, PC-DMIS automatically displays the Label Layout Wizard. This wizard shows a fake part surrounded by some fake labels. These dummy items are simply design aids while working in the template editor. You can use this wizard to set up labels around your part. For in-depth information, see the "The Label Layout Wizard" topic. When you apply this template to your report, PC-DMIS uses your actual CAD drawing and label information.

5. Change the Label Count box number of labels to 4.

6. Change the Layout Style to Elliptical Packed.

7. Click on the small, square, white handle in the middle of the CAD drawing, and drag the square clockwise or counterclockwise to rotate the labels along the elliptical path.

8. Rotate the labels until all four are above the CAD drawing and the Layout Preview area of the Label Layout Wizard looks like this:

   Layout Preview area showing four labels elliptically packed above the CAD drawing

9. Click OK. PC-DMIS inserts the object into Section2.

Your Section2 layout should now contain a CADReportObject looking something like this:

Example CAD report object showing the four dummy labels above the dummy part

You must have an active Internet connection to see this video.

Step 7: Define What Measurement Information Should Appear

1. Click on the Section1 tab and right-click on the TextReportObject you inserted earlier.

2. From the Properties dialog box, change these properties:
   ShowAlignments - OFF
   ShowComments - OFF
   ShowDimensions - None
   ShowFeatures - ON
   ShowHeaderFooter - OFF
   ShowMoves - OFF
   ShowScreenCaptures - OFF

3. Click on the Section2 tab.

4. Right-click on the CADReportObject you added into Section2. The right part of the screen displays a docked Properties Sheet dialog box. This dialog box contains various properties specific to the selected object.

5. Click on Rules in the Rules Tree property. The Rule Tree Editor appears:

   Rule Tree Editor dialog box

   Rules Tree property

6. Expand the Features heading. A list of features appears.

7. Expand the Circles heading. A list of various circle features appears.

8. Click the Measured Circle item, and then click the Add button. This tells PC-DMIS you are adding a rule that you want the template to follow. The Edit Rule dialog box appears. This dialog box allows you to make decisions for your report template. In this case, you are telling your report template to do something when it encounters measured circles in the measurement routine's report data.

   Edit Rule dialog box

9. Select the Use Label Template for Report option. The Label Name box becomes available for edit.

10. Click the ... button. An Open dialog box appears, allowing you to select a label template file.

11. Navigate to where you installed PC-DMIS, and open up the Reporting sub-directory. Select the summary.lbl label, and click Open. In the Edit Rule dialog box, PC-DMIS displays the name of the template you selected. See "About Labels and Label Templates" for information and a tutorial on creating labels.

12. Click OK to close the Edit Rule dialog box and apply the rule. You will notice that the Measured Circle item in the list has a bold font to indicate that a rule exists for that feature type.

13. Click OK to close the Rule Tree Editor dialog box.

You have created a rule that tells PC-DMIS to use the summary.lbl label template to display summary information about the measured circle feature type.

You must have an active Internet connection to see this video.

Step 8: Save and Test the Template

1. Inside the Report Template Editor, select File | Save. In the Save As dialog box, save the template as test1.rtp.

2. Select File | Close to close the Report Template Editor.

3. Select View | Report Window. The Report window appears, showing the default report template.

4. From the Reporting toolbar on the Report window, click the Template Selection Dialog icon . The Report Templates dialog box appears

5. Add your report to the Report Templates dialog box by clicking the Add button.

6. Navigate to and select test1.rtp. Then click Open. PC-DMIS adds a thumbnail view of your report into the Report Templates dialog box.

   Report Templates dialog box showing Test1.rtp

7. Select your template's thumbnail icon, and click Open. PC-DMIS opens the Report window using your newly created template. It should look something like this:

   Report Window Showing Report Data Using the Test1.rtp Report Template

8. Finally, execute your measurement routine. The first time you execute the measurement routine using this report template, PC-DMIS will display a Define User Assigned Properties dialog box, asking you to give the report a new title and to set the background color.

9. Set these properties as desired, and click OK. The dialog box closes and PC-DMIS runs your measurement routine.

10. When execution finishes, PC-DMIS shows the report data with the new template.

Congratulations! You have finished the Custom Report Template tutorial.

You must have an active Internet connection to see this video.