Adding Factor Values to the Raw Data Report Header Area
Step-by-step instructions for adding Text Factor values to the header area of a Raw Data Report
Print Friendly View
written: 01/24/2008
last modified: 04/10/2024

The ERS 3.4 default Raw Data reports do not show any factor values in the report heading area. This is because the factor values should, in theory, be different for each row of the table, making it difficult to show any single value in the header. This White Paper will give step-by-step instructions for designing a custom template and adding the first Text and Numeric Factor values from the first record displayed to the header area of one of the standard Raw Data templates.

Identifying the Factor Location

In QC-CALC Real-Time, the data collection process assigns the factors to a specific location within the database and that location (there are locations 1 – 30 for Text Factors and also 1 – 30 for Numeric Factors) is used to reference those values everywhere within QC-CALC, QC-Gage, and SPC Office Buddy. The majority of ERS just shows the Factor Labels and no mention is made of the actual Factor Location. When it comes to the reports, those Factor Locations come back into play. Before the rest of the directions can be followed you will need to learn where the Factors you want to display are being stored. If you already know where your factors are stored based on the locations within QC-CALC, skip to The Report Designer section.

  1. From the Data View tab in ERS choose the Numeric Factors tab in the Grid Display Properties area in the bottom left corner of the screen.
  1. Find the Numeric Factor you want to add to your report and count from the top to find the corresponding number.

  1. Write down the number of any of the Factors you will be adding to your report. For these directions “Shift” (Numeric Factor 1) will be used.
  1. Follow the same directions on the Text Factors tab for any Text Factors.

The Report Designer

The directions shown here will add Numeric Factor 2 (Machine) to the header area of the report. This is a lengthy process, but relatively simple to accomplish.

  1. From ERS, choose the Report – Design Templates menu or the corresponding button in the Toolbar (circled in the picture below), then choose the “Raw Data Report (*.raw)” item in the lower right corner of the next screen that appears to narrow down the choices to just the Raw Data templates.

  1. Make a copy of the “RawDataReport.raw” file, give it a name that makes sense, highlight that new file in the list of files, and click Open.
  1. The Report Designer now appears on the screen.

  1. To start, we need to draw a Text box on the screen so there is somewhere to display the Factor values. To do this use the Objects > Insert > Text menu, then while the mouse is a large + sign click where you want the upper left of the box to be and drag down and to the right until you have a rectangle of the size you want as shown in red in the picture above.
  1. The Edit Text window is automatically displayed at this point so you can add the first line of text to the box.
  1. For the first line we are going to add the Text Factor 1 Label followed by the value.

  1. From the Variables and Functions tab area click the > next to section in the Variables list, scroll down until you find the “text_factor_label_01” item (it is a long way down in the list), and highlight that item.
  1. Now click the Insert button (or double-click the item in the list). The variable you chose will be automatically moved to the bottom window.

  1. Next, click on the Text tab and click the Tab button. This will automatically show the Tab Properties window.
  1. Choose left aligned, set the Position to 1.20, and click OK. This will set the tab to be 1.2 mm from the left side of the Text box that was drawn on the report.

  1. Back in the Edit Text screen, click the Insert button in the middle of the screen and this will add a “÷” (tab) to the line.
  1. At this point you will see a “Syntax error” at the bottom of the screen. This is because we need to join the 2 items (the Label and the tab character) together in a way the Report Designer recognizes. In order to tell the Report Designer to concatenate the 2 items a + needs to be added between them. Put the cursor right before the “÷” and add a + to the line as shown below.

  1. Before adding the factor value to the line another + needs to be added to join the new item to the existing ones. Put the cursor at the end of the line and add a +.
  1. To insert the actual Text Factor 1 value into the line, go back to the Variables and Functions tab, find the “text_factor_01” item in the list above where you found the label, and click the Insert button.

  1. The line should look like the one above when you have finished. Now click OK on the Edit Text window.
  1. Back in the main Report Designer screen you’ll now see an empty box if you are on the Layout Preview tab (shown in the picture in Step #3). Don’t worry, there will be values shown when you run the report, but at this time no values are being sent during the design process so the box appears empty.

  1. In my case the background of the box is pink. This is showing that this ended up as part of the “Table Layer” layer. This is not really the layer we want that box to appear on, so right-click on the box and choose the Assign to Layer menu.

  1. This box should only appear on the first page of the report, so choose the “First Page” layer in the Choose a Layer box.
  1. If you look in the Objects area in the upper left section (shown to the right) you’ll see the “[Text]” item shown at the bottom. This is referencing the text box we just created, but as you can see if you added a few text boxes it would be hard to tell them apart. To make life easier, we need to give that text box a name. Highlight that “[Text]” item in the Objects area, then look at the Properties area in the lower left corner and type “Information Box 2” into the Name box.
  1. The next step is to add Numeric Factor 1 to the same box. To do this, double-click the “Information Box 2” item in the Objects area and the Paragraph Properties window will appear.
  1. Each line in this window is the definition for a line in the box that will be printed on the report. You control the layout and font of these lines from this area.

  1. To add a new line at the bottom, double-click on the “---“ line in the window and the Edit Text window will appear again. You can also click the Insert a paragraph button circled in the picture, but the placement of the new line will vary depending on the line highlighted when using that method.
  1. Adding the Numeric Factor 1 line will be the same as what was done for the Text Factor 1 line, except we will also need to control the formatting of the number when adding the value portion. Follow steps 6 through 13 from above except add “num_factor_label_01”.
  1. At this point the screen should look like below:

  1. To format the Numeric Factor, put the cursor at the very end of the line (after the last +), open the Numerical functions section of the window, highlight the “FStr$” item, and click the Insert button.

  1. This will add the “FStr$” function to the line and leave the cursor exactly where we need it to be.
  1. Back in the Variables and Functions area, find the “num_factor_01” item in the list (above where you found the label) and click the Insert button.
  1. Next, move the cursor over 1 place (so it is on the right side of that next comma) and start typing the following (including the “): “######&”
  1. QC-CALC is only able store 7 digits, so there are enough places represented to hold a value that QC-CALC collected. If your number is not a whole number, then you can also add a decimal point and more # to the right to hold those characters. The & tells the report to print a 0 in that place if no value was received. The # will suppress leading 0s, so using all & should be done if you want a number like “002036” to be printed vs. “2036”. If you can have negative numbers replace all of the # with – (“------&” for example).
  1. Delete the remaining comma from the line and the error at the bottom of the screen should go away. The formula for this line should be:
section.num_factor_label_01+"÷"+Fstr$ (section.num_factor_01,"######&")
  1. Click OK on the Edit Text and Paragraph Properties windows.
  1. Click File – Save, then File – Exit to get out of the Report Designer.
  1. Now run your Raw Data report using the template you just changed.

Attachments
 

Applies To

Enterprise Report Scheduler v.3.40

Category

Reporting - Enterprise Report Scheduler
See more articles in this category