CHT_OPT_SPC

This command sets options for the CHT_SPC command.

Syntax

CHT_OPT_SPC option_number, "setting"

Valid entries for the option_number and "setting" parameters are:

option

explanation

setting

description

0

Reset all CHT_OPT_SPC options to their default settings.

""

 

1

Data Source Name (DSN)

name of a GainSeeker DSN

The default setting is the GainSeeker DSN that was used to launch the SPC Data Entry module and run the current template.

You can use this option to chart data from a different GainSeeker DSN. For more information on specifying data source names, see dsn=.

2

User or Group Name

an existing user or group name

The default setting is the User or Group Name that was used to log in to the SPC Data Entry module and run the current template.

You can use this option to chart data from a different GainSeeker login name.

Note: This command uses the configuration of the user currently logged into GainSeeker. If you choose to Change Configuration for the current-running data entry session, the original configuration for the GainSeeker user is used with this command. The changed to configuration is not used.

3

Login password for User or Group Name

login password

The default setting is the login password for the User or Group Name that was used to log in to the SPC Data Entry module and run the current template.

If you specified a different GainSeeker DSN and/or User or Group Name, you can use this setting to specify the login password for the specified GainSeeker login name.

4

Database login name

database login name

The default database login name is configured by the Cms.ini setting dbnm=.

5

Database login password

database login password

The default database login password is configured by the Cms.ini setting dbpw= or dbpwe=.

6

Date Period.

When retrieving a desktop, this setting will be ignored.

number

The default setting is the date period currently being used for SPC entry. This is initially set in the specified user or group name's configuration but can be overridden by the DE_OPT 13 command or by using the Session menu during data entry.

The following numbers are valid for this setting:

Periods that include 'today'

 

Other periods

Today

1

 

Yesterday

2

Last n hours ending now

35

 

Last week

8

One day ending now

36

 

Last month

9

One week ending today

16

 

Last quarter

10

One month ending today

17

 

Last three months

33

One quarter ending today

18

 

Last six months

34

One year ending today

19

 

Last year

11

Today to default low

32

 

January this year

20

Current week

4

 

February this year

21

Current month

5

 

March this year

22

Current quarter

6

 

April this year

23

Current year

7

 

May this year

24

All dates

3

 

June this year

25

 

 

 

July this year

26

 

 

 

August this year

27

 

 

 

September this year

28

 

 

 

October this year

29

 

 

 

November this year

30

 

 

 

December this year

31

 

 

 

First quarter

12

 

 

 

Second quarter

13

 

 

 

Third quarter

14

 

 

 

Fourth quarter

15

 

 

 

Custom by date

0

Note: As with all "setting" parameters for this command, the number you specify should be formatted as a string.

7

High Date/Time for date period 0.

When retrieving a desktop, this setting will be ignored.

date/time stamp

If you use this setting to specify a High Date/Time, you must also use CHT_OPT_SPC 8 to specify a Low Date/Time.

You can specify a date/time stamp using one of two formats:

 the date format that is valid for your Windows regional options

 the HSI date format. This is a 16-character string format (YYYYMMDDHHmmsshh) used to store date/time stamps in GainSeeker tables.

8

Low Date/Time for date period 0.

When retrieving a desktop, this setting will be ignored.

date/time stamp

If you use this setting to specify a Low Date/Time, you must also use CHT_OPT_SPC 7 to specify a High Date/Time.

You can specify a date/time stamp using one of two formats:

 the date format that is valid for your Windows regional options

 the HSI date format. This is a 16-character string format (YYYYMMDDHHmmsshh) used to store date/time stamps in GainSeeker tables.

9

Filter name.

The default setting is the traceability filters set for the current template row by the FILTER command.

When retrieving a desktop, this setting will be ignored.

name of existing SPC filter

You can use this setting to name an existing filter that is available to the specified user or group name.

"DE:Rown"

Use the traceability filters set by the FILTER command for template row n.

"Content:filter_contents"

You can use this setting to specify the SQL string to use for filter_contents.

To view an example of an SQL string, use the SPC Charts and Reports module to create or edit a filter. On the Traceability Filter screen, click the SQL Statement button. For more information on creating and editing filters, see Working with Filters.

To specify that no filters should be applied to the data you are charting, leave the filter_contents blank.

10

Use anchor points to limit retrieval.

When retrieving a desktop, this setting will be ignored.

"Y"

Apply the specified user or group name's configuration setting for the number of Anchor Points to display on SPC Data Entry charts (the default setting).

"N"

Disregard anchor points when retrieving data.

11

Maximum number of subgroups to retrieve and display.

When retrieving a desktop, this setting will be ignored.

number

The default setting is the number of display points on SPC data entry charts, from the Cms.ini command de_data_display=.

You can specify any number greater than 0 for this setting.

20

Single report format.

When retrieving a desktop, this setting will be ignored.

name of existing SPC Report Writer format

You can use this setting to name an existing Report Writer report format that is available to the specified user or group name.

This report format will be used when using CHT_SPC 5 to generate a "Report Writer (single)" chart window.

The default setting is the Cms.ini command rw_single=.

21

Multiple report format.

When retrieving a desktop, this setting will be ignored.

name of existing SPC Report Writer format

You can use this setting to name an existing Report Writer report format that is available to the specified user or group name.

This report format will be used when using CHT_SPC 103 to generate a "Report Writer (multiple)" chart window.

The default setting is the Cms.ini command rw_multiple=.

22

Statistics list format.

When retrieving a desktop, this setting will be ignored.

name of existing SPC statistics list format

You can use this setting to name an existing statistics list format that is available to the specified user or group name.

This report format will be used when using CHT_SPC 2 to generate a "Statistics List" chart window.

The default setting is the Cms.ini command stat_list=.

23

Statistics table format.

When retrieving a desktop, this setting will be ignored.

name of existing SPC statistics list format

You can use this setting to name an existing statistics list format that is available to the specified user or group name.

This report format will be used when using CHT_SPC 102 to generate a "Statistics Table" chart window.

The default setting is the Cms.ini command stat_list_mult=.

30

Image size

"0"

The size of the chart area for the current row of the template (the default setting).

"-1"

The full width and height of your screen.

"-2"

The chart size specified by the System-wide settings for Chart picture size.

"Rown"

The size of the chart area for template row n.

"wwwwhhhh"

Any eight-digit number in the format wwwwhhhh, where wwww is the width and hhhh is the height.

For Windows XP, the number of pixels is exact.  For Windows 98, 2000, and NT; you must subtract 7 pixels from the height value (hhhh).

Example:     CHT_OPT_SPC 30, "08000600"

This example would create the chart image at 800 by 600 pixels for Windows XP and files at 800 by 607 for Windows 98, 2000, and NT.

This setting allows you to select the size of a chart image up to but not exceeding the current screen resolution. For example, if you screen resolution is set at 800x600, you cannot set the chart image size to 1024x768.

31

Image attributes

attributes for the <IMG> HTML tag

By default, GainSeeker does not apply any HTML image attributes to the charts generated by the CHT_SPC command.

You can use this setting to specify the HTML attributes that will be applied to the charts generated by CHT_SPC. A list of <IMG> tag attributes is available at the w3schools website

Example:

CHT_OPT_SPC 31, ' title="Use the Interact menu to interact with this data."'

This example would add the "title" attribute to the <IMG> tag when the HTML file is generated.

32

Image only

"Y"

When using the SPC Charts and Reports module to send a graphic chart to HTML – such as a control chart, histogram, etc. – some charts are automatically followed by a statistics list, a statistics table, a control limit legend, etc.

Also, when using the SPC Charts and Reports module to send a text window to HTML – such as a data table, a statistics list, etc. – headers and/or footers may be displayed on the resulting HTML page.  

You can use this setting (the default) to avoid saving this additional information to HTML.

"N"

Include the additional information in the HTML.

33

Body attributes

attributes for the <BODY> HTML tag

By default, GainSeeker automatically applies the HTML body attributes scroll='auto', style='margin:0px' and BGCOLOR="#FFFFFF" to the web pages generated by the CHT_SPC command.

You can use this setting to specify the HTML attributes that will be applied to the web pages generated by CHT_SPC. A list of <BODY> tag attributes is available at the w3schools website

Example:

CHT_OPT_SPC 33, ' title="Use the Interact menu to interact with this data."'

This example would add the "title" attribute to the <BODY> tag when the HTML file is generated.

34

Table attributes

attributes for the <TABLE> HTML tag

By default, GainSeeker automatically applies the HTML table attributes border=1 and cellpadding=3 to the tables generated by the CHT_SPC command.

You can use this setting to specify the HTML attributes that will be applied to the tables generated by CHT_SPC. A list of <TABLE> tag attributes is available at the w3schools website

Example:

CHT_OPT_SPC 34, 'border="2"'

This example would set the border="2" attribute for the <TABLE> tag when the HTML file is generated.

40

Title (first line).

This setting applies only to graphic charts such as control charts, histograms, etc. It does not apply to text windows such as data tables, statistics lists, etc.

When retrieving a desktop, this setting will be ignored.

"-"

Use the Title from the specified user or group name's configuration setting for Print title.

text

Specify free-form text.

""

Do not display the Title (the default setting).

41

Subtitle (second line).

This setting applies only to graphic charts such as control charts, histograms, etc. It does not apply to text windows such as data tables, statistics lists, etc.

When retrieving a desktop, this setting will be ignored.

"-"

Use the subtitle specified by the Cms.ini command title_2_spc=.

text and/or
statistics codes

Specify free-form text and/or specialized codes for SPC statistics.

You can determine which codes you want to use by launching the SPC Charts and Reports module and changing the chart titles. When copying a code to the template formula, be sure to include the square brackets [ ] or curly brackets { } that surround it.

""

Do not display the Subtitle (the default setting).

42

Chart title (third line).

This setting applies only to graphic charts such as control charts, histograms, etc. It does not apply to text windows such as data tables, statistics lists, etc.

When retrieving a desktop, this setting will be ignored.

"-"

Use the subtitle specified by the Cms.ini command title_3_spc=.

text and/or
statistics codes

Specify free-form text and/or specialized codes for SPC statistics.

You can determine which codes you want to use by launching the SPC Charts and Reports module and changing the chart titles. When copying a code to the template formula, be sure to include the square brackets [ ] or curly brackets { } that surround it.

""

Do not display the Chart title (the default setting).

43

"Data grouped by" title (fourth line) on control and CuSum charts.

When retrieving a desktop, this setting will be ignored.

"Y"

Display a "Data grouped by:" title at the top of control charts and CuSum charts.

"N"

Do not display the "Data grouped by:" title at the top of control charts and CuSum charts (the default setting).

44

Data Group labels on control and CuSum charts.

When retrieving a desktop, this setting will be ignored.

"Y"

Display a label for each data group on the chart.

"N"

Do not display a label for each data group on the chart (the default setting).

99

Unloads the chart object so it is recreated the next time a chart is drawn when used in conjunction with these commands:

""

When used in conjunction with CHT_OPT_DMS 99, "" and  CHT_OPT_DASH 99, "" commands, the chart COM object is destroyed so it can be recreated the next time a chart is drawn.

Note: These settings do not modify or reset any previously executed CHT_OPT_* settings.

Return value

This command does not return a value.

Notes

These commands can be executed in any order.

Example

CHT_OPT_SPC 41, "{Part Number}   {Low date/time} - {High date/time}" :
MySVar "HTML" = CHT_SPC 0, ""

This formula first specifies the Subtitle to display on charts. Then it generates a control chart for the standard that has been selected on the current row of the template, and it uses this chart to create an HTML file.

CHT_OPT_SPC 6, "9" : MySVar "HTML" = CHT_SPC 0, ""

This formula first sets the date period for charts to "Last Month". Then it generates a control chart for the standard that has been selected on the current row of the template, and it uses this chart to create an HTML file.