________________________________________

Print or Create a Custom Report

Print out a copy of the part or information about the part



Custom reports allow you to create reports for various purposes and audiences. The reports can be as simple as showing the estimated time for a part, or a highly complex cost breakdown. This reporting feature is extremely powerful and flexible, and if configured and used properly, can result in much more efficient and cost-effective running of your machine.

Common uses for reports may include:

The Report choice from the Print command lets you print out a report using a template. The templates can be customized and used for purposes such as documenting the production of a part, or to quickly generate a custom quote for a part.

NOTE: 

This feature is only available if you have a registered version of the MAKE software. See Enter Passwords & Register Software for details on registering MAKE.

Using the Report command is straightforward--you will run the report chosen by the Pick Report Template. Customizing the report template takes some knowledge of formatting for the format you want to use.

Note that some reports may ask for you to enter information for the report. These values are "remembered" from the last time you ran this report. The information asked for depends on the report designer.

This report asks for values to be entered

 

Pick Report Template

The Pick Report Template command lets you pick the template to use for the report. Whatever template was last chosen is the one used for the Print Report command.

You can use the template dialog to navigate to different folders to pick the reports you want to run. You will find all the OMAX supplied templates in the OMAX_Templates folder, and you should keep all your templates in the User_Templates folder.

NOTE: 

There are several custom report templates that ship with the OMAX software that you can use to learn from. These are in the [SHARED]\Reports\OMAX_Templates folders. Study them to learn additional tips and tricks.

Creating and Modifying Report Templates

You can use any text-based file format to create a report, although the most commonly used ones are TXT, HTM and RTF formats. These formats provide the combination of being widely supported and easy to create. Report templates consist of formatted text with the names of variables. When the report is run, the variables are replaced with their actual values. This gives you a lot of control over the appearance of the report and what information the report contains. You can also build up a library of different templates to use for different applications.

The RTF format is a good, basic format that provides a lot of formatting power that can be quickly learned and used. Windows includes the WordPad application which can format RTF files, and you can also use Microsoft Word to work with RTF files.

You can also ask for input and insert figures into your templates. OMAX provides a number of examples that can help you get started.

All of your reports should be stored in the User_Templates folder in the Reports folder (see Folders and what to store in them). Once the template is saved there, you can choose it with the Pick Report Template command.

Using variables

The advantage of the report template comes from being able to use variables that will be replaced with the actual values when you run the report. For example, you can have the part name appear on the report, along with today's date and the name of the material used.

This is done by using variables in the report template. There are many pre-defined variables that let you display information, and you can also create new ones that ask for input when you run the report (see Prompting for input, below).

Variables are entered into the template just as you would enter any text. Variable names always start with a square bracket ( [ ) and the word "OMAX_" and end with another square bracket. Pre-defined variables don't contain any spaces.

You should format the variables exactly as you want the results to appear. For example, if you want the company name bolded and in a larger font, you would bold the variable [OMAX_FileName] and place it in a larger font.Prompting for Input

You can create your own variables that ask for input and then display (or manipulate) that input in the report. The values that are entered for the report are "remembered" the next time the report is run, so these can be used for persistent variables as well. This is particularly useful when the report format isn't easily edited, such as HTML files.

The general format of input variables is:

[OMAX_AskFor_<value>]

Where <value> is the prompt you want to appear on the form that appears to the user. The use of spaces in <value> should be avoided; instead, use the underscore ( _ ), which will be replaced with spaces when displayed. Be sure to close the variable with a closing bracket ( ] ).

For example:

[OMAX_AskFor_Company_Name]

[OMAX_AskFor_e-mail_address:]

[OMAX_AskFor_Please_enter_a_comment]

These will display as shown in the following figure:

Three input variables are specified for this report

There is no practical limit to the number of input variables you can have. You can, however, easily overwhelm a user by asking for lots of input to the report, so you should keep the number of fields at a reasonable level. Each field can hold many characters (on the order of 15,000).

You can manipulate and perform calculations on input variables (as you can with regular variables). There is no input verification, though, so you'll need to perform your own data checks (if you ask for a number, you'll need to make sure that you got a number).

You can use the same variable name more than once, and the user will only be prompted to enter it once. For example, you might ask for company name, use it once at the top of the page and again in smaller print at the bottom of the page.

Reading a Value from MakePreferences.INI with [OMAX_ReadINI_XXX]

There are a lot of variables exposed for custom reports, but what do you do if something you need is not exposed? In this case, you can read values directly from MakePreferences.INI (where MAKE's internal configuration values are kept), and include them in your reports. For example:

[OMAX_ReadINI_"MakePreferences.INI"_JobCosting_CostPerHour]

…reads in the "CostPerHour" value from the "JobCosting" section of "MakePreferences.INI".

The syntax is [OMAX_ReadINI_ followed by the name of the INI file to read in quotes, followed by an underscore followed by the section of the INI file to read followed by another underscore, followed by the variable within the INI file to read, followed by the closing bracket.

Doing Calculations on Values with QuickEval()

Besides displaying from a list of predetermined values, it is possible to perform calculations on one or more values prior to posting the result to the report. This is done using the QuickEval() function.

QuickEval is a special function that is useful for making custom reports that calculate something instead of simply displaying raw data. For example, one can show the volume of material removed by the kerf of the jet by multiplying the width of the jet times the length of the cut and then multiplying that times the thickness of the material.

When making a custom report using a spreadsheet (for example an XML file in Excel), the QuickEval function may not be necessary, as such programs already have sophisticated math capabilities built in (unless you need access to some of the more obscure functions built within QuickEval.) When making custom reports to open in programs that do not support such math capability, then the QuickEval function can be quite useful. This Rich Text Format document is a good example of a custom report where such math capabilities would otherwise be impossible.

QuickEval() will evaluate whatever expression is within its parenthesis and output the result. In your report template, simply type "QuickEval", and enclose within parenthesis the math function you wish to evaluate. For example, if your report template had the following text:

5+2+3 = QuickEval(5+2+3)

…then, when the report template is opened with MAKE, it would output the following text:

5+2+3 = 10

Expressions can be much more complex than simple math, however. As with any numeric input in the OMAX software, you can use functions like "Sin()", "Cos()", "Max(A;B)", etc. You can also use [OMAX_XXX] variables within QuickEval as well. This allows you to calculate functions of arbitrary complexity such as:

The total material removed from the kerf of this path will be: QuickEval([OMAX_ToolOffset]*2*[OMAX_TotalLengthOfCutting]*[OMAX_Thickness]) cubic [OMAX_LengthUnits]

…Which when a report containing the above is opened in MAKE would become something to the effect of:

The total material removed from the kerf of this path will be: 123.45 cubic millimeters

NOTE: 

You can use the "Round" function to round to any number of significant digits, as shown in the following example:QuickEval(Round(MyNumberToRound*10)/10)

…where you substitute "MyNumber" with the expression you wish to round. In the above case, one digit will be displayed after the decimal point. To display 2 digits, replace the number "10" with "100", or use "1000" to display 3 digits, etc. For example, to round the number "1/3", which is normally "0.3333333…." to only 3 digits, use:

QuickEval(Round((1/3)*1000)/1000)

You can test your expressions using OMAX Calculator, as shown in this example:

NOTE: 

The QuickEval function is based on the same engine that drives the OMAX Calculator and other math expression evaluations in the OMAX software. Because of this, any of the functions these other features support (Sin, Cosine, Max(A;B), Min(A;B), FromINI(), Round() etc.) are available. For a complete list of supported functions, type "Math Functions" into the Index of the OMAX Interactive Reference.

Using Pictures in Files

Pictures and images are useful for including in reports--both to make the report look nice and to convey information (such as what the part looks like).

Pictures can be divided into two categories: static images such as company logos, that do not change; and dynamic images specific to the report--such as what the part looks like. Whether you can use dynamic images depends on what format your report is in.

Static Images

Both RTF and HTML formats support static images. Static images can be used for things like company logos and other images that appear on the report.

For the RTF format, you will need to "embed" the image in the file. In WordPad, this is done by using the Insert menu and choosing Object. Once the image is inserted in the file, you no longer need to keep the original image (a copy is inserted into the file).

In HTML format, you insert the image as you would any other image (using the IMG tag). The original image needs to be available, and should be stored in the User_Static_Media folder (see Folders and what to store in them). You should make sure that all your references are to the relative position of the image (that is, use ../user_static_media/imagename.jpg) so that they don't depend on the exact installation directory of MAKE.

Dynamic Images

Dynamic images are the images created when the report is run, which consists of images of the part in various sizes. The files all have the same basic name, but appear in different sizes:

OMAX_DrawingImage_64x48 The image at 64 pixels by 48 pixels

OMAX_DrawingImage_1024x768 The image at 1024 pixels by 768 pixels

The only format that supports using these dynamic images is the HTML format. Do not insert the images into an RTF report--because the image is copied into the RTF format, it will not be updated when the report is run, and your report will have the wrong image.

For the complete list of image sizes created when the report is run, look in the OMAX_Dynamic_Media folder, as new sizes are added as customers request them.

 

Folders and What to Store in Them

There are a number of folders available where you can store your templates, and some folders where you do not want to store your templates, as they may be erased when you upgrade the software.

All folders are stored under the OMAX_LAYOUT_and_MAKE folder in the Reports folder. If you accepted the default location during installation, this is in C:\Program Files\OMAX Corporation (if you did not accept the default, you will need to determine the location you did choose).

NOTE: 

File storage for the Vista operating systems is different. Refer to Windows Vista File Storage for the correct location.

Following is a list of the folders in the Reports folder and what each one is used for. You should not create additional folders, but use the ones provided.

Generated_Reports
Do not store your files in this folder. This folder holds the final reports after they have been generated by MAKE.

OMAX_Dynamic_Media
Do not store your files in this folder. This folder contains pictures of the current tool path. The pictures can be referenced from HTML files (see Using pictures in files). The picture updates whenever a report is generated, and is saved in several different sizes.

OMAX_Static_Media
Do not store your files in this folder. This folder contains images used for the supplied OMAX templates.

OMAX_Templates
Do not store your files in this folder. This folder contains example templates provided by OMAX. You can copy these files to the User_Templates folder and use them as a starting point for your own reports.

User_Static_Media
You can safely store files in this folder. This folder is intended as a storage location for pictures you regularly use in your reports, such as company logos and graphic images.

User_Templates
You can safely store files in this folder. Use this folder to store your own custom report templates.

 

Notes on Different File Formats

This section discusses considerations specific to particular file types.

RTF Files

These files are "Rich Text Files" or RTF files, a format that can include text, formatting, and graphics. They can be edited and viewed using WordPad (included with Windows), Microsoft Word, or other programs. (Note, however, that some formatting differences may appear depending on the program used to view the RTF files.)

A drawback to the RTF format is that you can't include references to images (the image must be embedded in the file), so you can't automatically include a picture of the current part.

TXT Files

Files with a TXT format are Text files, and cannot contain pictures or font selection. These files are the simplest file types and offer the widest compatibility and can be read by many different programs. Windows includes two programs, Notepad and WordPad, which can work with text files.

HTML Files

The HTML format is used for files that can be read in browsers (such as Internet Explorer) and ends in either HTML and HTM. This is a useful format because it can include images of the current part, as well as other images (such as company logos).

You can use any HTML editor (such as FrontPage or Dreamweaver), or even work directly with a text editor to set up the HTML template.

NOTICE

Do not use Microsoft Word to edit the report template. It will add active content to the template, which may prevent it from working correctly. You should also check the output from other HTML editors to make sure you get the desired results when the report is run.

When you include images, whether static or dynamic, you should always use relative file references--such as ../user_static_media/imagename.jpg) so that the template is not dependent on the exact installation location of the OMAX software.

XML files

XML (Extensible Markup Language) is a text-based format designed to organize data and allow programs to easily interchange information. It is supported by a variety of programs, although you may need newer versions of the software to correctly read XML (for example, Excel 2000 and older do not support XML, but newer versions of Excel do).

The XML standard is maintained at http://www.w3.org/XML/, which also has links to more information on how to use XML.

Note that you cannot use the variable OMAX_Statistics in XML format, because the text that is substituted for this value can prevent the XML file from opening.

Other Text-based File Formats

You can use any text-based format as a report template, although the ones listed above are the most useful. You might, for example, create a text file that could be imported into a billing system. The main thing is that the report must be text-based, so that the names of the OMAX variables can be replaced with their values when the report is run.

Security Risks

Because the Report feature relies on third party software to display the results, there is a security risk, and it is possible to make a template that can engage in malicious behavior. For example, a macro embedded into the template might execute and take control of your computer or delete files. For maximum security you should only use templates from trusted sources such as those supplied by OMAX, or make your own.

Troubleshooting

NOTE: 

Whenever a custom report is generated, a log file is also generated that can be useful for debugging your report template. This log file is a simple text file located in the root of the "[SHARED]\Reports" folder and named, _CustomReportLog.txt. This file is automatically overwritten each time a new report is generated.

Problem: Variable error message when report is run:

Solution: If the Report Generator doesn't recognize a variable in your report template, you'll get an error message like the above. In the report itself, the location of the error will be marked with the error message text. First check that the name is exactly correct (see List of all variables for a list). If the name is correct, then delete the variable name and retype it. The problem can be because the variable name as been formatted, and is no longer stored correctly in the file. Particularly in RTF file formats, any font changing or formatting inside the variable name will change how the variable is stored and it won't work correctly. You can bold the entire variable name and it will work correctly.

The easiest way to fix this is to simply retype the entire variable name.

NOTE: 

Some older HTML editors will substitute %20 for spaces in variable names. If you are using one of these editors, you should use the underscore (_) character in your variable names to avoid problems. Most modern HTML editors do not have this problem. For best results and the least troubles, always use the underscore character (_) for spaces.

Problem: I type in a variable and spell it perfectly, yet MAKE does not recognize it when I generate the report.

Solution: Many text editors insert special formatting or change tracking code invisibly into the document. This may split a word into pieces with hidden characters in between that MAKE cannot decode. To remove these hidden characters, simply re-type the variable from scratch, and avoid further edits to it later on. Also, be sure to use the underscore character (_) as a substitute for spaces in your “AskFor” variables. This prevents some text editors from converting the space itself into a goofy character.

Problem: I need some data exposed as a variable or calculated value from inside of MAKE, but this variable is not on the list of variables that get exposed.

Solution#1: Grab the data directly from INI files using the syntax [OMAX_ReadINI_"IniFileName.INI"_Section_Identifier], where "IniFileName.ini" is the name of the INI file to read from (for example, "MakePreferences.INI"), "Section", and "Identifier" indicate the section and variable name to read. This allows you to read just about any setting needed for a custom report that is not otherwise exposed specifically. For more information see INI file locations and INI files.

Solution#2: Contact OMAX Software Engineering to request that a new variable be added.