
Creating a Custom Report Sheet
Summary
Worksheets in Origin can be customized by merging cells and placing various objects such as graphs, external images, links to variables and tables/cells in other sheets, in order to create custom reports. Such custom reports can be part of an analysis template, thus allowing user to open the analysis template, change data, and simply print their updated custom report.
Minimum Origin Version Required: Origin 8.0 SR6
What you will learn
- How to create a custom report sheet
- How to save custom report as part of Analysis Template (OGW) and re-use with new data
Steps
Note: First finish the previous tutorial named "Creating and Using Analysis Templates" where an analysis template named Analysis Template.OGW is created.
Importing Data
- Use the File :Open menu item and open the Analysis Template Analysis Template.OGW. This analysis template already has a nonlinear fitting analysis operation set up for data from column D of the first sheet.
- Click the Import Wizard button on the Standard Toolbar, or invoke the Import: Import Wizard... menu item. the Import Wizard dialog will open.
- Click the ... button next to the File edit box and select the file <Origin EXE folder>\Samples\Import and Export\S15-125-03.dat.
- Verify that the Import Filters for Current Data Type drop-down shows "Data Folder: VarFromFileNameAndHeader".
- Verify that the Import Mode drop-down is set to Replace Existing Data.
- This is an import filter shipped with the sample file, that specifies how to import the file and what header and file name strings to parse to create import variables. Walk thru the wizard pages to view the settings (Optional) and then click Finish button to import the file.
- Right-click on workbook title bar and select Show Organizer to turn on organizer panel. Expand branches and verify that variables have been created and saved, as in the picture below:

- Press the Recalculate button on the Standard toolbar to update the analysis result sheet. Verify that the analysis was updated and the embedded graph shows the new raw data and fit curve.
Creating Custom Report Sheet
- Right click on one of the worksheet tabs and select Add to add a new worksheet. Rename this worksheet as Custom Report.
- Make the Custom Report sheet active and add multiple blank columns.
- Go to FitNL1 worksheet and right click on the graph with data and fit curve and select Copy from the context menu.
- Go to Custom Report and right click in 1st column in a middle row and select Paste Link. This will paste a link to the embedded graph. Click and select a group of cells with this pasted cell at the top-left. Then click the Merge Cells button, which is the last button on the Styles toolbar. This will merge the group of cells and the graph image will be shown larger in size.
- Go to FitNL1 report sheet and right click on the Parameters node and select Copy Table from the context menu.
- Go to the Custom Report sheet and right click in a cell to the right of the graph and select Paste Link from the context menu. This will place links to all values of the parameter table entries in the custom report.
- Select the numeric value cells and right-click and select Format Cells... to bring up format dialog. Change the Digits drop-down to Set Decimal Places= and enter 2 in the Decimal Number edit box and click OK to format the numbers.
- Select various cells in the table and use the Style toolbar controls to change foreground and background color, and use the Standard toolbar to change font size etc.
- Right-click on top-left cell in the custom report sheet and select Insert Images from Files... context menu and select some image such as a company logo image. Click and drag to cover more cells and then click the Merge Cells button to increase the size of the logo display.
- Click inside a cell on top-right and type in the string var://@D and press Enter. Right click on cell and select Format Cells..., set the Format as Date, and then elect a suitable format from the Display drop-down. This will place the current date, pointed to by @D LabTalk variable, into the worksheet cell. Click and expand the selection to multiple cells and press the Merge Cells button to show the date with larger font size.
- Right-click on a cell below the logo and date, and select Insert Variables context menu. In the dialog that opens, select User.Variables branch and select Sample. Check the Insert as Link check box on top and press Insert to insert variable as link into the report sheet.

Click on a cell to the left of the inserted variable, and enter the static text Sample.
- Insert more variables and format the cells for color and font.
- Invoke the Format: Worksheet... menu item to open the Worksheet Properties dialog. Under the View tab, expand Show Headers and uncheck the column and row header check boxes. Expand the show Grid Lines branch and uncheck the column and row grid check boxes. Select the Format tab and check the Show Missing as Blank check box. Click OK to close this dialog.
- Right-click on worksheet title bar and select View: Long Name to turn off long name row. Also turn off Units and Comments.
- Select the File: Print menu item to open the print dialog, and press Options button, and uncheck the Horizontal/Vertical grid lines. Select File: Print Preview. Your custom report sheet should look like the image below:

Saving the Analysis Template
- Go to the source data sheet of the workbook, which should be the first sheet. Select the Worksheet: Clear Worksheet... menu item and press OK in the dialog that opens. This will clear all the data from the sheet. The analysis report sheet and the custom report sheet will now be empty. Clearing the data is optional, and it makes the size of the analysis template file to be smaller.
- Use the File: Save Window As... menu item and save the book as an OGW file under your User Files Folder with a suitable name such as My Custom Analysis. This OGW file can now serve as an Analysis Template for future analysis of similar data.
Re-using the Analysis Template
- Start a new project and then select the menu item File: Recent Books and from the fly-out options select the Analysis Template saved earlier.
- Make the data sheet active, and select File: Import Wizard... and select the file <Origin EXE path>\Samples\Import and Export\S21-235-07.dat.
- Make sure the filter drop-down shows VarsFromFileNameAndHeader and change the Import Mode drop-down to Replace Existing Data and click Finish.
- Press the Recalculate button, which is the last button on the Standard toolbar. Origin will recalculate the analysis results and update the custom report sheet links, and at this point you can view and print the custom report sheet.