|
CHARTrunner 3.0 Software Developer's Kit |
|
Reference Manual |
|
Date: 5-July-2007 |
This document applies only to CHARTrunner version 3.0. It does not apply to earlier versions.
CHARTrunner is a software application for creating, displaying, and publishing statistical process control (SPC) charts. The charts may use data from a wide variety of sources including Microsoft Access, SQL Server, Microsoft Excel, Oracle, and even simple text files. It runs on Microsoft Windows 98 and above. CHARTrunner may be used as an SPC charting component that is integrated with other systems or applications. This document describes many of the classes, methods and properties available for performing this integration.
CHARTrunner-e is the web server version of CHARTrunner. It may be used to publish charts defined in CHARTrunner so that the charts may be viewed by anyone with a web browser and access to the web server where CHARTrunner-e is installed.
CHARTrunner was created by PQ Systems, Inc. the developers of SQCpack™. To learn more about PQ Systems, visit:
To learn more about CHARTrunner, visit:
http://www.chartrunner.com and http://www.chartrunner.com/sdk
If you install CHARTrunner or any CHARTrunner component on a computer, you must purchase a CHARTrunner license for that computer. CHARTrunner and/or CHARTrunner components are licensed on a per-computer basis. Any system or application derived from CHARTrunner and/or CHARTrunner components may be used only on computers for which a CHARTrunner license has been purchased. Please review the complete terms of the license agreement at:
http://www.chartrunner.com/license
Click here for the Programmer's Guide which provides an overview of programming using the CHARTrunner ActiveX components. Click here for the most recent version on the web.
The changes that have been made to the API (Application Programming Interface) for the CHARTrunner 3.0 SDK are detailed in CrSDK_API_Changes.htm.
Returns a Boolean indicating if the user cancelled the definition edit during Me.EditDefinition().
Data type
Boolean
Returns a Boolean indicating if the user modified the definition during Me.EditDefinition().
Data type
Boolean
Returns a Boolean indicating if the CHARTrunner30.Application object could find the appropriate license file.
Data type
Boolean
bNoChartNameInWindowTitle Property
Returns or sets whether the chart name will be displayed as part of the chart window title.
Data type
Boolean
bPrintBlackAndWhite Property
Returns or sets whether "Black and White" printing mode is enabled. On some black & white printers lines and text are not printed visibly due to the way the printer driver converts colors to the black and white space. This boolean forces all chart lines and text to be printed as Black. Fills still behave as expected and show up as a shade of gray.
Data type
Boolean
bShowProgressBar Property
Returns or sets whether the progress bar will be displayed as part of a lengthy charting operation.
Data type
Boolean
Returns or sets whether message boxes will be displayed when errors occur. Set this to True to suppress messages boxes. This is useful for unattended or batch processing where you do not want a single error to put up a message box and prevent the rest of the batch from processing.
Data type
Boolean
Default value
False
The Env property is of type AppEnv and contains properties and methods related to CHARTrunner's operating environment. Among other things, this object handles language localization and registry information management.
Data type
AppEnv (object)
fPrintMarginBottom
fPrintMarginLeft
fPrintMarginRight
fPrintMarginTop Properties
These properties return or set the printer margins to be used when printing charts. These will default to values set by users of the CHARTrunner application.
Data type
Single
This property is returns a PqStrList object which contains a list of strings, one string for each .CRF chart definition in the current chart folder. Each string entry contains the full path to the .CRF chart definition file. This list is populated by CHARTrunner30.Application.GetPeerChartLists().
Data type
PqStrList (object)
This property is returns a PqStrList object which contains a list of strings, one string for each .CRM Multi-chart definition in the current chart folder. Each string entry contains the full path to the .CRM Multi-chart definition file. This list is populated by CHARTrunner30.Application.GetPeerChartLists().
Data type
PqStrList (object)
An SqcOOC object. This object contains a list of out-of-control test rules that will be used to evaluate data for out-of-control conditions. These rules are used when any control chart is created that has the ControlChartSettings.bDoOOCTests property set to True. The SqcOOC object contains a list of tests. The tests take the following form:
1 Point beyond limits 7 Points ascending 2 of 3 above 2 sigma
Data type
SqcOOC
Remarks
In CHARTrunner the user can choose Setup | Out-of-control tests to set the active set of test rules; these rules are stored in the CHARTrunner30.Application.oOocTests property. In CHARTrunner 1.1 this set of test rules was applied to all control charts when the chart was drawn.
Starting in CHARTrunner 1.5 the active set of test rules is copied into the PQCrDef.oOocTests property when a PQCrDef object is created. Also, the Boolean CHARTrunner30.Application.bUseMasterOocTests is copied into PQCrDef.bUseMasterOocTests when a PQCrDef object is created.
If PQCrDef.bUseMasterOocTests is False then the test rules stored in PQCrDef.oOocTests are used to evaluate "out-of-control" conditions when a chart is drawn. If a chart definition file doesn't contain any test rules (e.g. a CHARTrunner 1.1 chart definition) then the rules from CHARTrunner30.Application.oOocTests will apply to the chart (because these rules were copied into PQCrDef.oOocTests when the PQCrDef object was created and were never replaced by rules from the chart definition file).
If PQCrDef.bUseMasterOocTests is True then the test rules stored in CHARTrunner30.Application.oOocTests are used to evaluate "out-of-control" conditions when a chart is drawn.
See also: CHARTrunner30.Application.ReadOocDefinition, PQCrDef.ReadOocDefinition.
Example
Dim bRtn As Boolean
Dim j As Integer
Dim oChRunApp As New CHARTrunner30.Application
' Display the current set of test rules.
For j = 1 To oChRunApp.oOocTests.Tests.Count
MsgBox oChRunApp.oOocTests.Tests(j)
Next j
' Load a new set of test rules from a disk file. This will replace any existing
' tests with those from the file.
bRtn = oChRunApp.ReadOocDefinition("C:\MyRules\OocTests1.ooc")
' Add a new test rule to those we loaded from the file.
oChRunApp.oOocTests.Tests.Append "2 of 3 above 2 sigma"
Sets or returns the full path to the file containing templates for ADO data sources. Used primarily by the CHARTrunner application and not generally useful in scripting applications.
Data type
String
Sets or returns the full path to the folder where CHARTrunner is installed.
The CHARTrunner30.Application object needs access to certain files located in
the folder where CHARTrunner is installed. Setting this property to a
folder path causes the sSysDataFolder, sStyleFolder
and
sLogFile,
properties to be updated if they have not already been set.
Data type
String
Sets or returns the full path to the current folder containing the chart definition files.
Data type
String
Returns the current height of the screen in twips as reported by Screen.Height.
Data type
Integer
Returns the current width of the screen in twips as reported by Screen.Width.
Data type
Integer
This read-only property returns the current hex Locale ID that is in effect
Data type
String
Sets or returns a string that is the name of the printer that will be used (by default) for printing charts. If this is an empty string, the Windows default printer will be used. Note that the printer dialog box will allow the user to override this printer before charts are printed.
Data type
String
Default value
An empty string or the name of the printer selected by the CHARTrunner user.
Sets or returns the full path to the last output web page folder used for a Cpk analysis.
Data type
String
Many methods return a Boolean value. When the return value of False indicates an error, this property may be examined for a description of the error. This is a read-only property.
Data type
String
A read-only property that returns the full path to the CHARTrunner license file.
Data type
String
A read-only property that returns only the filename portion of the CHARTrunner license file.
Data type
String
Sets or returns the full path to the log file. If the property bSilentMode is True, no message boxes will be displayed when errors occur. However, if errors occur, the messages will be written into the file specified by this property.
Data type
String
Sets or returns the current hex Locale ID that is stored in LocaleID in the CHARTrunner section of the Registry. In CHARTrunner if the current language is set to a language other than U.S. English then this property holds the Locale ID of the specified language.
Data type
String
Sets or returns the full path to the folder that contains the chart style definitions. A chart style definition contains information about colors, fonts, and styles that will be used when charts are drawn.
Data type
String
Sets or returns the full path to the folder that is the SysData folder for the current CHARTrunner installation. This folder is used to store out-of-control test files, default chart files, and other system level files used by CHARTrunner. This property will default to the correct folder and is generally not changed by scripting code.
Data type
String
Displays a dialog box allowing the user to browse for and select CHARTrunner chart definitions. If the user selects one or more definitions, the full path to each definition is returned to the caller as an element of the returned string array.
Syntax
Public Function BrowseForChartDefs(ByVal bShowCRF As
Boolean, _
ByVal bShowCRM As Boolean, ByVal bShowCRW As Boolean) _
As String()
Returns
An array of String where each element in the array is the path to a selected CHARTrunner definition.
Example
Dim oChRunApp As New CHARTrunner30.Application Dim sDefPathArray() As String sDefPathArray() = oChRunApp.BrowseForChartDefs(True, True, True)
Remarks
If bShowCRF is True then regular Chart files will be shown. If bShowCRM is True then MultiChart files will be shown. If bShowCRW is True then Workspace files will be shown.
Check to see if the CHARTrunner license is valid.
Syntax
Public Function CheckLicense(Optional ByVal sLicFile as String = “”) as Boolean
Remarks
Note that sLicFile is an optional argument that defaults to an empty string. If present it specifies the full path to the license file.
Returns
True = Success.
False = Failure (see sLastError).
Example
Dim oChRunApp As New CHARTrunner30.Application Dim bRtn As Boolean bRtn = oChRunApp.CheckLicense()
Close all currently open chart display windows.
Syntax
Public Sub CloseAllCharts()
This method is used to create various CHARTrunner objects and returns a reference to the created object. Many objects used by the CHARTrunner30.Application may not be created directly. Instead, use this method to instantiate these objects.
Syntax
Public Function CreatePqObject(eObjType As CrObjTypeEnum) As Object
Returns
An object reference to an object of the type requested.
Nothing = Failure (see sLastError)
Example
Dim oChRunApp As New CHARTrunner30.Application Dim oCrDef as PQCrDef Set oCrDef = oChRunApp.CreatePqObject(eObjPQCrDef)
Remarks
A table of valid object types follows. Notice that the object variable being Set is usually declared as an object of the type you are asking to create.
|
eObjPQCrDef |
1 |
Chart definition object |
|
eObjPQCrDefDesc |
2 |
File descriptor object |
|
eObjPQCrColDef |
3 |
Column definition object |
|
eObjPQCrLimit |
4 |
Control limit object |
|
eObjCrRsViewer |
5 |
Recordset viewer object |
|
eObjSqcControlChartStyle |
6 |
Control chart style object |
|
eObjSqcHistogramStyle |
7 |
Histogram chart style object |
|
eObjSqcParetoStyle |
8 |
Pareto chart style object |
|
eObjSqcOOC |
9 |
Out-of-control test object |
|
eObjSqcOOCMgr |
10 |
Out-of-control test manager object |
|
eObjPQCrWeb |
13 |
Save as web page object |
|
eObjPQCrDashboard |
14 |
Dashboard definition object |
|
eObjPQCrIndicator |
15 |
Dashboard Indicator definition object |
Displays a CHARTrunner chart from an existing chart definition file. sChartPath specifies the full path to an existing CHARTrunner chart definition.
Syntax
Public Function DisplayChart(ByVal sChartPath As String, _
Optional ByVal bShowModal As Boolean = False, _
Optional ByVal bReadOnly As Boolean = False, _
Optional ByVal bAllowRefresh As Boolean = True, _
Optional ByVal vTagVariant As Variant) As Boolean
Remarks
When the chart is displayed the user may use the Edit | Chart definition menu to alter the definition of the chart. They may also highlight subgroups and compute new sets of control limits. If you prefer that the user only view the chart and not have the ability to change it, set the bReadOnly argument to True. Some scripting environments do not allow a non-modal form to be displayed. If this is the case, you must set the bShowModal argument to True. If you do not want to allow the user to Refresh (F5) the chart then set bAllowRefresh to False. If vTagVariant is specified then it will be used to set the PQCrDef.TagVariant property.
Returns
True = Success.
False = Failure (see sLastError).
Example
Dim oChRunApp As New CHARTrunner30.Application
Dim bRtn as Boolean
bRtn = oChRunApp.DisplayChart("C:\MyCharts\MyChart.crf")
If Not bRtn then
Msgbox oChRunApp.sLastError
End if
DisplayChartFromClipboard Method
Display a CHARTrunner chart using data currently on the Windows clipboard.
Syntax
Public Sub DisplayChartFromClipboard()
Remarks
The user is prompted to specify the type of chart and other information, then the chart is displayed.
In versions prior to 2.5, this method took a chart type argument and did not prompt the user for any further information. This was changed in 2.5. The chart type parameter was eliminated, and a form prompts the user for the information needed to create a chart from data on the clipboard, then DisplayChartFromTextData() is called to actually display the chart.
DisplayChartFromTextData Method
Display a CHARTrunner chart using text data in the specified string.
Syntax
Public Function DisplayChartFromTextData(ByVal sTextData
As String, ByVal
eChartType As CrChartTypeEnum, _
Optional ByVal sSeparatorChars As String, _
Optional ByVal bConsecutiveSeparatorsAsOne As Boolean = False) As Boolean
Remarks
Display a chart of type 'eChartType' from the text data in 'sTextData'.
If 'bSeparatorChars' contains any characters these will be treated as separator characters when deciding how to form columns of data from the data on the clipboard. The default characters are Tab and Comma.
If 'bConsecutiveSeparatorsAsOne' is True then consecutive separators found in the clipboard data will be treated as if they were one single separator.
Returns
True = Success.
False = Failure (see sLastError).
Display a preview of the Indicators contained in the Dashboard having storage path 'sDefPath'.
Syntax
Public Function DisplayDashboard(ByVal sDefPath As String) As Boolean
Remarks
Display the first indicator in the specified dashboard. Subsequent indicators in the dashboard can be viewed using the supplied controls on the viewing window.
Returns
True = Success.
False = Failure (see sLastError).
Display the out-of-control summary form for the workspace having storage path 'sDefPath'.
Syntax
Public Function DisplayOocSummary(ByVal sDefPath As String) As Boolean
Returns
True = Success.
False = Failure (see sLastError).
CHARTrunner is installed with several on-line help files. Use this method to launch the on-line help file of your choice.
Syntax
Public Function DisplayHelp(eHelpFileType As
CrHelpFileTypeEnum, _
hWndParent As Long, eCmdType As HelpCommandTypeEnum, _
Optional lTopic As Long = 0) As Boolean
The enum definitions used for the parameters are:
Public Enum CrHelpFileTypeEnum eCrHelpFileChartRunner = 1 eCrHelpFileAdvisor End Enum 'CrHelpFileTypeEnum' Public Enum HelpCommandTypeEnum eHlpCmdTypeContext = cdlHelpContext eHlpCmdTypeQuit = cdlHelpQuit eHlpCmdTypeIndex = cdlHelpIndex eHlpCmdTypeContents = cdlHelpContents eHlpCmdTypeHelpOnHelp = cdlHelpHelpOnHelp eHlpCmdTypeSetIndex = cdlHelpSetIndex eHlpCmdTypeSetContents = cdlHelpSetContents eHlpCmdTypeSetContextPopup = cdlHelpContextPopup eHlpCmdTypeForceFile = cdlHelpForceFile eHlpCmdTypeHelpKey = cdlHelpKey eHlpCmdTypeCommandHelp = cdlHelpCommandHelp eHlpCmdTypePartialKey = cdlHelpPartialKey End Enum 'HelpCommandTypeEnum'
hWndParent is the window handle of the parent window that launches the help.
Returns
True = Success.
False = Failure (see sLastError).
Example
Dim oChRunApp As New CHARTrunner30.Application Dim bRtn as Boolean bRtn = oChRunApp.DisplayHelp(eCrHelpFileChartRunner, Me.hWnd, eHlpCmdTypeContents)
This method lets the user edit the chart, dashboard or style definition specified by sDefPath.
Syntax
Public Function EditDefinition(ByVal sDefPath As String,
Optional ByVal bAllowNameChange As Boolean=False, _
ByVal oDefDesc As _PQCrDefDesc) As Boolean
Remarks
The user will be allowed to change the name of the definition
if bAllowNameChange is True.
If the definition name is changed, the new name will be available in
Me.sNewDefinitionName. If the definition name was not changed, then
Me.sNewDefinitionName = "". If the old definition was deleted then
Me.bOldDefinitionDeleted will be True, else False.
If the user saved changes to the definition then Me.bChangedDuringEdit will be
True, else False.
If the user cancels the definition edit then Me.bCanceledByUser will be True,
else False.
Returns
True = Success.
False = Failure (see sLastError).
This method displays a dialog box that provides information about a chart image file that a user wants to generate. The caller must provide arguments for file name, image type, width, and height. Returns True if user specifies all valid information and clicks OK. Returns False if the user cancels or if information is invalid or incomplete. This method changes the contents of its arguments. If the method returns True, the arguments will contain the user selections from the dialog box.
Syntax
Public Function GetImageInfoFromUser(sFileName As String,
_
eType As CrImageTypeEnum, lWidthInPixels
As Long, _
lHeightInPixels As Long) As Boolean
Remarks
Can be used before calling SaveChartAsImage to allow the programmer to override parameters such as image type and image size that are stored in the chart definition file.
Returns
True = Success.
False = Failure (see sLastError).
Syntax
Public Sub GetPeerChartLists(ByVal eWhichList As PeerListEnum, _
ByVal sChartFolder As String)
Remarks
This method fills CHARTrunner30.Application.oChartListCRF and/or CHARTrunner30.Application.oChartListCRM with a list of the available peer charts that are found in the chart folder specified by sChartFolder. The parameter eWhichList specifies which list (or both) to be filled.
Print the CHARTrunner chart definition specified by sChartPath.
Syntax
Public Function PrintChart(ByVal sChartPath As String, _
Optional ByVal bPrintWithDialog As Boolean = True, _
Optional ByVal bPrnMCSep As Boolean = False, _
Optional ByVal sPrinterName As String) As Boolean
Parameters
| sChartPath | Full path to the chart definition to be printed |
| bPrintWithDialog | Show a printer dialog? |
| bPrnMCSep | Print Multi-Chart children on separate pages? |
| sPrinterName | Name of the printer to send the output to |
Remarks
Note that like the DisplayChart and SaveChartAsImage methods, this method will query the chart's data source and create a fresh chart based on the current data. If this method returns False, the caller should check the contents of sLastError for a description of the problem.
Returns
True = Success.
False = Failure (see sLastError).
This method reads an out-of-control test definition file and stores the rules into the CHARTrunner30.Application.oOocTests object. An out-of-control test definition is a text file containing out-of-control test rules. Here is an example of an out-of-control test rule:
1 Point beyond limits
This means that if a data point is beyond the control limits (on a control chart) it will be considered an “out-of-control” data point. Several example OOC files can be found in the SysData folder where CHARTrunner is installed.
Syntax
Public Function ReadOocDefinition(ByVal sOocPath As String) As Boolean
Remarks
If sOocPath contains valid out-of-control test rules, they will be read and will become the current out-of-control tests stored in CHARTrunner30.Application.oOocTests.
In CHARTrunner the user can choose Setup > Out-of-control tests to set the active set of test rules; these rules are stored in the CHARTrunner30.Application.oOocTests property. In CHARTrunner 1.1 this set of test rules was applied to all control charts when the chart was drawn.
Starting in CHARTrunner 1.5 the active set of test rules is copied into the PQCrDef.oOocTests property when a PQCrDef object is created. Also, the Boolean CHARTrunner30.Application.bUseMasterOocTests is copied into PQCrDef.bUseMasterOocTests when a PQCrDef object is created.
If PQCrDef.bUseMasterOocTests is False then the test rules stored in PQCrDef.oOocTests are used to evaluate "out-of-control" conditions when a chart is drawn. If a chart definition file doesn't contain any test rules (e.g. a CHARTrunner 1.1 chart definition) then the rules from CHARTrunner30.Application.oOocTests will apply to the chart (because these rules were copied into PQCrDef.oOocTests when the PQCrDef object was created and were never replaced by rules from the chart definition).
If PQCrDef.bUseMasterOocTests is True then the test rules stored in CHARTrunner30.Application.oOocTests are used to evaluate "out-of-control" conditions when a chart is drawn.
Returns
True = Success.
False = Failure (see sLastError).
Save the chart definition specified by the full storage path sChartPath as a clipCHART file specified by sClipChartPath.
Syntax
Function Public Function
SaveChartAsClipChart(ByVal sChartPath As String, _
Optional ByVal sClipChartPath As String) As Boolean
Remarks
If sClipChartPath is a zero length string then prompt the user for the clipCHART file. If the user cancels then True is returned since no error occurred.
See also: PQCrDef.CreateClipChart
Returns
True = Success.
False = Failure (see sLastError).
Example
Dim oChRunApp As New CHARTrunner30.Application
Dim bRtn As Boolean
bRtn = oChRunApp.SaveChartAsClipChart("C:\MyCharts\MyChart.crf", "C:\ClipCharts\MyChart.ccf")
Save the chart definition specified by 'sChartPath' as a Cpk analysis web page.
Syntax
Function Public Function SaveChartAsCpkAnalysis(ByVal
sChartPath As String, _
Optional ByVal oAnalysis As CrCpkAnalysis = Nothing, _
Optional bInteractive As Boolean = False) As Boolean
Remarks
The properties of the analysis are defined by 'oAnalysis'.
If 'oAnalysis' is not passed into this method, then use the specs from 'Me' and the output path will be defined by sLastCpkOutputFolder.
If 'bInteractive' is True then allow the user to edit the parameters of 'oAnalysis' prior to creating the Cpk analysis.
Returns
True = Success.
False = Failure (see sLastError).
Generate an image file based on an existing CHARTrunner chart definition. The image will be either a Windows bitmap file (*.bmp), a Windows enhanced metafile (*.emf), a Portable Network Graphic (*.png) or a JPEG compressed image file (*.jpg).
Syntax
Public Function SaveChartAsImage(ByVal sChartPath
As String, _
Optional ByVal sOutputImagePath As String = "", _
Optional ByVal eType As CrImageTypeEnum =
0, _
Optional ByVal lWidthInPixels As Long = 0, _
Optional ByVal lHeightInPixels As Long = 0) As Boolean
Remarks
The sChartPath argument specifies the full path to an existing CHARTrunner chart (*.crf) or multi-chart (*.crm) definition.
The only required argument to this method is sChartPath. All the other arguments have corresponding settings stored in the chart definition file itself. If the caller does not specify these arguments, the contents of the chart definition will determine the settings used for the optional arguments.
Returns
True = Success.
False = Failure (see sLastError).
This method saves the chart definition specified by sChartPath as a web page.
The configuration of the web page is defined by the properties of oPage. If oPage is not passed into this method, then use the chart's default web page parameters in PQCrDef.oWebPage.
Syntax
Public Function SaveChartAsWebPage(ByVal sChartPath As String,
_
Optional ByVal oPage As PQCrWeb =
Nothing) As Boolean
Returns
True = Success.
False = Failure (see sLastError).
This method generates images of the indicators contained in the dashboard having storage path 'sDefPath'.
Syntax
Public Function SaveDashboardImages(ByVal sDefPath As String, _
Optional ByVal sFolder As String, _
Optional ByVal eImageType As CrImageTypeEnum = 0, _
Optional ByVal lWidth As Long = -1, _
Optional ByVal lHeight As Long = -1) As Boolean
Returns
True = Success.
False = Failure (see sLastError).
Remarks
If 'eImageType' is zero then the user will be prompted to specify the
image type to use.
If 'lWidth' or 'lHeight' is less than zero then the user will be prompted
to specify the height and width to be used for all indicator images.
If the value specified for 'lWidth' or 'lHeight' is zero then the value
of height or width specified by each Indicator definition will be used,
else these specify the size of the images to create.
The images will be generated in the folder specified by 'sFolder'.
If 'sFolder' is a zero length string then the user will be prompted
to specify the folder where the images will be created.
It is possible that this routine will generate one or more images (from
the Dashboard) successfully but return False because one or more of the
images encountered an error. So the caller should examine Me.sLastError
if this function returns False.
Saves the results of an OOC summary to the specified output file.
Syntax
Public Function SaveOOCSummary(ByVal sDefPath As String, _
ByVal sOutPath As String, _
ByVal eOutFmt As OocSummaryOutputFmtEnum, _
Optional ByVal eRowOpt As OocRowOptionEnum = eAllRows, _
Optional ByVal iRows As Integer) As Boolean
Parameters
sDefPath - Full path to the workspace definition to evaluate.
sOutPath - Full path for the output results file.
eOutFmt - Results file format: eTextFile or eExcelFile.
eRowOpt - Whether to evaluate all rows (eAllRows) or only the last N rows (eLastNRows).
iRows - Specifies the last N rows to evaluate when eRowOpt=eLastNRows.
Returns
True = Success.
False = Failure (see sLastError).
This method generates a chart image file for each chart defined in the chart workspace definition specified by sChartPath.
A chart workspace is a collection of one or more CHARTrunner charts.
Syntax
Public Function SaveWorkspaceImages(ByVal sChartPath As String, _
Optional ByVal eImageType As CrImageTypeEnum
= 0, _
Optional ByVal lChartWidth As Long = 0, _
Optional ByVal lChartHeight As Long = 0, _
Optional ByVal sFolder As String) As Boolean
Returns
True = Success.
False = Failure (see sLastError).
Remarks
As with DisplayChart and PrintChart, this method will query the data source for each chart and generate a fresh chart based on current data each time it is called. If you create image files for a number of charts on a regular basis, this method allows you to automate and/or streamline this task by handling all the charts in the workspace with one call.
This method generates a web page for each chart defined in the chart workspace definition specified by sChartPath.
A chart workspace is a collection of one or more CHARTrunner charts.
Syntax
Public Function SaveWorkspaceWebPages(ByVal sChartPath As
String, _
Optional ByVal sOutputFolder As String) As Boolean
Returns
True = Success.
False = Failure (see sLastError).
Remarks
The configuration of the web pages is defined by each child chart definition.
However, if sOutputFolder is specified, then all web pages will be saved in that folder, rather than the output folder specified in each child chart definition.
It is possible that this routine will generate one or more web pages (from the Workspace) successfully but return False because one or more of the child charts encountered an error. So the caller should examine sLastError if this function returns False.
As with DisplayChart and PrintChart, this method will query the data source for each chart and generate a fresh web page based on current data each time it is called. If you create web pages for a number of charts on a regular basis, this method allows you to automate and/or streamline this task by handling all the charts in the workspace with one call.
E-mail the chart image(s) specified by the sChartDef chart definition.
Syntax
Function SendChartImageAsEmail(ByVal sChartDef As String) As Boolean
Remarks
This method always interacts with the user to allow the user to specify or change the parameters via a dialog. Use the PQCrDef.SendChartImageAsEmail method if you do not want interaction with the user.
If an error occurs the error message will be displayed to the user.
Multiple e-mail addresses must be separated by a comma, e.g. "a@abc.com,b@abc.com". At least one destination e-mail address must be specified.
If the chart definition in Me specifies a Workspace then all child chart image files will be sent as attachments in a single e-mail message. If an error is encountered while generating a child chart image then False will be returned but the e-mail will still be sent if possible. A progress bar will be displayed as the child chart images are generated.
Returns
True = Success.
False = Failure (see sLastError).
Setup the application to localize for the locale specified by sLocaleID.
Syntax
Function SetLocale(Optional ByVal sLocaleID As String = "") As Boolean
Returns
True = Success (see sHexLocaleID for the current Hex
Locale ID).
False = Failure (see sLastError).
Remarks
Normally sLocaleID specifies a locale ID that
looks like "080A" (a standard hex Windows LCID) or "PQHC" (a
PQ special ID). If the LLD file that corresponds to sLocaleID is
not found, then no localization will be done and the active language defaults to
U.S. English.
However, sLocaleID can also specify one of these special values:
|
"" |
Do not localize. |
|
"=" |
Localize based upon the current windows Locale ID. |
|
"@" |
Localize based upon LocaleID in the Registry. |
|
"!" |
Localize in "Test String Width" mode. |
Open the specified sLanguageDB language database and use the specified sLanguageColumn column for the foreign language. Setup the Env.lg localization engine object as appropriate for the chosen language.
If either sLanguageDB or sLanguageColumn are zero length strings then the application will use the native language (U.S. English) because the current language database (if any) will be closed.
Syntax
Function SetupLanguage(sLanguageDB As String,
sLanguageColumn As String) _
As Boolean
Returns
True = Success.
False = Failure.
Update the images in folder 'sFolder' from the Indicators contained in the Dashboard having storage path 'sDefPath'.
Syntax
Public Function UpdateDashboardImages(ByVal sDefPath As String,
_
Optional ByVal sFolder As String) As Boolean
If 'sFolder' is not specified or doesn't exist, the user will be prompted to specify the image folder.
All image files of type EMF or PNG in 'sFolder' will be updated if the image filename matches an indicator name in the specified Dashboard. The width and height of the newly created indicator image will match that of the image file being replaced.
It is possible that this routine will generate one or more images (from the Dashboard) successfully but return False because one or more of the images encountered an error. So the caller should examine Me.sLastError if this function returns False.
Returns
True = Success.
False = Failure (see Me.sLastError).
Update the indicator statistics for the dashboard specified by 'sDefPath'.
Syntax
Function UpdateDashboardStats(ByVal sDefPath As String) As Boolean
If an error occurs while updating an individual indicator statistic value then that indicator will not be updated and this method will return False. However, the dashboard definition will always be saved back to storage whether or not any errors occurred while updating the individual indicators.
Returns
True = Success.
False = Failure (see Me.sLastError).
This event is raised from the Form_Unload event of a frmChartDisplay form that is used to display a chart in a window. A reference to the frmChartDisplay is passed as the oFrmChart argument. If Cancel is set to a non-zero value the unload of the form will be canceled.
This event is supported in version 1.6.68 and higher.
Syntax
Public Event ChartUnload(oFrmChart As Object, Cancel As Integer)
Example
Private WithEvents oChRunApp As New CHARTrunner30.Application
Public Sub DrawMyChart()
Dim bRtn as Boolean
bRtn = oChRunApp.DisplayChart("C:\MyCharts\MyChart.crf")
If Not bRtn then
Msgbox oChRunApp.sLastError
End if
End Sub 'DrawMyChart'
Private Sub oChRunApp_ChartUnload(oFrmChart As Object, Cancel As Integer)
MsgBox "The chart " & oFrmChart.mCrDef.sChartName & " is unloading."
End Sub 'oChRunApp_ChartUnload'
A PQCrDef is a chart definition object. It is the in-memory representation of a CHARTrunner chart definition file. The following describe the properties and methods of the PQCrDef object.
This property sets or returns a Boolean indicating if the chart window should always be on top of other windows.
Data type
Boolean
Default value
False
Use this property to return or set a value indicating whether Advanced Row Selection is enabled. The checkbox to the left of the Advanced button on the data definition tab (when editing a chart definition in CHARTrunner) corresponds to this bArsEnabled property. See also: eArsMode, eArsUseTheseRows, eArsChooseRowsUnit, eArsRowsToLookAt, lArsLookAtEveryNRows, lArsUseFirstLastXRows, sArsColChangeColName.
Data type
Boolean
This property sets or returns a Boolean that determines whether automatic scaling of the scattergram chart's X-axis is performed.
Data type
Boolean
Default value
False
bAutoYAxisControlChart Property
This property sets or returns a Boolean that determines whether automatic scaling of the control chart's Y-axis is performed.
Data type
Boolean
Default value
False
This property sets or returns a Boolean that determines whether automatic scaling of the histogram chart's Y-axis is performed.
Data type
Boolean
Default value
False
bAutoYAxisMultiLineChart Property
This property sets or returns a Boolean that determines whether automatic scaling of the Multi-line chart's Y-axis is performed.
Data type
Boolean
Default value
False
This property sets or returns a Boolean that determines whether automatic scaling of the scattergram chart's Y-axis is performed.
Data type
Boolean
Default value
False
bCanCalculateStatistic Property
Get whether 'eStatistic' can be returned by Me.GetStatisticValue() or Me.GetStatisticAsText() for the chart definition in 'Me'..
Syntax
Public Property Get bCanCalculateStatistic(ByVal eStatistic As pqEnumChartStat) As Boolean
Data type
Boolean
This property sets or returns a Boolean that determines whether the user canceled the operation.
Data type
Boolean
Default value
False
This property is set False by the ReadChartDefinition and Initialize methods. It is set True by the Edit method if the chart definition is modified during the edit session, else it is set False. The bChangedDuringEdit property lets you know if the chart definition was changed during the last call to the Edit method, whereas the bChanged property lets you know if the chart definition has been changed during any call to the Edit method.
Data type
Boolean
Default value
False
This property sets or returns a Boolean that determines whether the user changed the chart definition during the previous call to the Edit method. If no change is made during Edit this will be False. This property is set False by the ReadChartDefinition and Initialize methods.
Data type
Boolean
Default value
False
This property sets or returns a Boolean that determines whether the connection to the chart's data source is closed immediately after the chart data has been fetched. This property corresponds to the Close data source after drawing chart? checkbox on the Misc tab of the chart definition form in CHARTrunner.
Setting this property to True will eliminate the problem where CHARTrunner locks a data source (such as Excel or a text file) while the chart is displayed so that other users are unable to open or edit the data source. It also corrects the problem where changes made to the chart data are not seen in the chart after the chart is refreshed. Even though CHARTrunner opens all data sources for "read-only" this results in a lock on some data sources which may prevent other users from opening the data source once CHARTrunner has displayed the chart. With bCloseDbAfter set to True CHARTrunner will open the data source only long enough to get the chart data and then the data source is closed. If the chart has a refresh interval, it will re-open the data source only when needed to refresh and then close it immediately.
This makes the Excel chart refresh problem much less frequent. However, it might still occur if CHARTrunner and another user try to access the data source at exactly the same time. For customers who are charting Excel data best results will be obtained when the Close data source after drawing chart? option is checked in the CHARTrunner chart definition and the Excel spreadsheet is setup in Shared Workbook mode.
When charting from a database like SQL Server or Oracle it is a good idea to set bCloseDbAfter to True so that connections to the database, which typically are a limited resource, are not held open while the chart is being displayed.
Data type
Boolean
Default value
True
This property sets or returns a Boolean that determines whether the chart definition can be saved to disk. New in CHARTrunner 2.0.
When this property is True, both SaveChartDefinition() and SaveChartDefinitionAs() return True but do not actually save the chart definition to disk.
Data type
Boolean
Default value
False
This property sets or returns a Boolean that determines whether the current chart style definition (contained in oControlChartStyle, oHistogramStyle or oParetoStyle) is embedded into the XML chart definition (returned by the sXmlDefinition property). When bEmbedStyleDef is False the XML chart definition contains only the name of the chart style that is to be used with the chart.
Data type
Boolean
Default value
False
bExternalRecordsetAllowFiltering Property
This property sets or returns a Boolean that determines whether to allow the filter definition (if any) to be applied to an external recordset. New in CHARTrunner 2.0.
Data type
Boolean
Default value
True
This property sets or returns a Boolean that determines whether the current filter definition (as defined by the FilterDef property) is applied to the chart.
Data type
Boolean
Default value
False
This is a read-only property. A PQCrDef contains several properties that together define the data that will be used for this chart. This property returns True if the database for this PQCrDef is currently open. Scripting code which instantiates a PQCrDef object will not directly open the database. Instead, other methods such as GetChartRecordset will open the database internally.
Data type
Boolean
Default value
False
This property sets or returns a Boolean that determines whether to retain the data object(s) used by a chart generation method such as PrintChart() or SaveChartAsImage().
If True, then a call to GetDataObject() allows you to get a reference to the data object(s) used by the last chart generation method such as PrintChart(). The data object for a chart gives you access to statistics such as Grand Mean, Sigma and Kurtosis for the chart.
Any change made to this property for a Multi-chart definition will be applied to all the child charts of that Multi-chart.
This property is available in version 1.6.68 and higher. See the VBScript example file Sample9.vbs for an example of using GetDataObject() to get access to chart statistics.
Data type
Boolean
Default value
False
bNoChartNameInWindowTitle Property
Returns or sets whether the chart name will be displayed as part of the chart window title.
Data type
Boolean
This property sets or returns a Boolean indicating if this PQCrDef (which describes a Pareto chart) should count records where the category name is missing or blank.
Data type
Boolean
bParetoIncludeMissingBar Property
This feature sets or returns a Boolean indicating whether this PQCrDef (which describes a Pareto chart) should display a bar on the chart indicating how many records contained a blank or missing category.
Data type
Boolean
bParetoShowTotalsChart Property
This property sets or returns a Boolean that determines whether a Pareto Totals Chart is shown.
Data type
Boolean
If this PQCrDef is a Pareto chart, this property sets or returns a value indicating that the Pareto bars should be displayed in Descending order. See also: eParOrderBy
Data type
Boolean
This property sets or returns a Boolean indicating whether to prompt the user to update the parameter query values prior to rendering the chart. See also: cQueryParameters
Data type
Boolean
This property sets or returns a value indicating whether the user should be prompted for user name and password when opening the database associated with this chart definition. This is generally an issue when the source database requires all users to login with a name and password. See also: sAdoOdbcConnect, sAdoOdbcUser, and sAdoOdbcPassword.
Data type
Boolean
Use this property to return or set a Boolean indicating whether the chart definition may be edited while the chart is displayed.
Data type
Boolean
This Read-Only property indicates whether the cSrcColDefs collection has been filled via the GetSrcColDefsCollection method.
Data type
Boolean
Charts may be defined with 10 rows and 3 columns of titles both above and below the chart. If you want these titles to be formatted with grid lines between the rows and columns, set this to True; otherwise, set it to False.
Data type
Boolean
Use this command to return or set a value indicating whether SQL statements should surround table names and column names with brackets. For example:
If True: SELECT * FROM [Data Table]
If False: SELECT * FROM Data Table
This property works in conjunction with the sSQLBracketLeft and sSQLBracketRight properties, which specify the character that should be used for bracketing. Note that these will almost always be the [ and ] characters. If your table names and/or column names contain spaces, this must usually be set to True.
Data type
Boolean
bUseExternalRecordset Property
This property returns a Boolean that determines whether an external (i.e. programmer supplied) recordset is being used to fetch the chart's data. See also: eRecSelectType
Data type
Boolean
This property sets or returns a Boolean that determines which set of Out-of-Control tests are used when a chart is drawn for this PQCrDef object.
Remarks
In CHARTrunner the user can choose Setup | Out-of-control tests to set the active set of test rules; these rules are stored in the CHARTrunner30.Application.oOocTests property. In CHARTrunner 1.1 this set of test rules was applied to all control charts when the chart was drawn.
Starting in CHARTrunner 1.5 the active set of test rules is copied into the PQCrDef.oOocTests property when a PQCrDef object is created. Also, the Boolean CHARTrunner30.Application.bUseMasterOocTests is copied into PQCrDef.bUseMasterOocTests when a PQCrDef object is created.
If PQCrDef.bUseMasterOocTests is False then the test rules stored in PQCrDef.oOocTests are used to evaluate "out-of-control" conditions when a chart is drawn. If a chart definition file doesn't contain any test rules (e.g. a CHARTrunner 1.1 chart definition) then the rules from CHARTrunner30.Application.oOocTests will apply to the chart (because these rules were copied into PQCrDef.oOocTests when the PQCrDef object was created and were never replaced by rules from the chart definition file).
If PQCrDef.bUseMasterOocTests is True then the test rules stored in CHARTrunner30.Application.oOocTests are used to evaluate "out-of-control" conditions when a chart is drawn.
Data type
Boolean
A collection of PqCrColDef objects, each member of this collection describes a column from the data source recordset and information about how CHARTrunner should treat or use this column when creating the chart. When running CHARTrunner, this collection is created based on information the user specifies on the Data definition tab. This collection is highly coupled to the data source definition for the chart. In other words, each member of this collection must describe a column from the current data source recordset.
Data type
Collection
Example 1
Dim oChRunApp As New CHARTrunner30.Application Dim oCrDef As PQCrDef Dim oCrCol As PQCrColDef ' Assume you have a data table with 2 columns ' named: Date, DownTimeMinutes ' Create a chart definition object. Set oCrDef = oChRunApp.CreatePqObject(eObjPQCrDef) ' Create the first column object. Set oCrCol = oChRunApp.CreatePqObject(eObjPQCrColDef) ' Set some properties of the column object. oCrCol.sName = "Date" oCrCol.eTreatColAs = eCrColId ' Add it to the charts collection of column definition objects. oCrDef.cColDefs.Add oCrCol ' Create the second column object. Set oCrCol = oChRunApp.CreatePqObject(eObjPQCrColDef) ' Set some properties of the column object. oCrCol.sName = "DownTimeMinutes" oCrCol.eTreatColAs = eCrColMeasurement ' Add it to the charts collection of column definition objects. oCrDef.cColDefs.Add oCrCol
Example 2
Dim bRtn As Boolean
Dim oChRunApp As New CHARTrunner30.Application
Dim oCrDef As PQCrDef
Dim oCrCol As PQCrColDef
' Create a chart definition object.
Set oCrDef = oChRunApp.CreatePqObject(eObjPQCrDef)
' Read a chart definition file.
bRtn = oCrDef.ReadChartDefinition("C:\MyCharts\Machine1.crf", eCrPathFull)
' Look at each member of the cColDefs collection.
For Each oCrCol In oCrDef.cColDefs
MsgBox "Column name is: " & oCrCol.sName
Next
A collection of ADODB.Parameter objects. Each member of this collection describes an input query parameter that is used with the parameterized query associated with the data source for the chart.
Only the name and value properties of the ADODB.Parameter object are used to store the name and value of the query parameter.
See the example code below for sample code that demonstrates the proper method of adding a new query parameter to the cQueryParameters collection. The important item to note is that the parameter name MUST be passed as the second argument to the Add() method.
If bPromptForParameters is True then CHARTrunner will prompt the user to enter query parameter values when the data source for the chart is opened.
Data type
Collection
Example
Dim oChRunApp As New CHARTrunner30.Application
Dim oCrDef As PQCrDef
Dim oParm as ADODB.Parameter
' Create a chart definition object.
Set oCrDef = oChRunApp.CreatePqObject(eObjPQCrDef)
' Read a chart definition file that uses a parameterized query.
bRtn = oCrDef.ReadChartDefinition("C:\MyCharts\MyQueryParmChart.crf", eCrPathFull)
' Here is an example of how to add a new query parameter to the chart definition.
' In this case the query parameter that is added is not actually used by this chart,
' but that's not a problem since CHARTrunner ignores query parameters that don't apply.
Set oParm = New ADODB.Parameter
oParm.Name = "[Added By Code]"
oParm.Value = 44
' When you add the parameter to the oCrDef.cQueryParameters collection, you MUST pass
' the parameter name as the second argument!
Call oCrDef.cQueryParameters.Add(oParm, oParm.Name)
' Look at each member of the cQueryParameters collection.
For Each oParm In oCrDef.cQueryParameters
MsgBox "Query parameter name is: " & oParm.name _
& ", value is: " & oParm.value
Next
cSrcColDefs Property
This property returns a reference to a collection of PqCrColDef objects that describe the current chart data source. This collection is created as a result of calling the GetSrcColDefsCollection method. See also: bSrcColDefsCurrent
Data type
Collection
ChartPositionList Property
List of PQCrChartSize objects that describe the chart window size and position for each chart of a Workspace. If the chart is a Multi-Chart or normal single chart then ChartPositionList(1) contains the information for the single chart window.
When a chart display window of a Workspace is closed the current chart window size and position information is written back to the parent Workspace chart definition file.
When the chart display window of a normal single chart or a Multi-chart is closed the current chart window size and position information is written back to the chart definition file for that chart.
The following code fragment demonstrates how to set the size and position of a chart window using the ChartPositionList property.
Dim oChartSize As New PQCrChartSize
' Specify the size and position for the chart display window using the
' oChartSize object that was instantiated earlier in this routine. This
' object lets you specify chart size and position information either in
' normalized units or twips. The normalized units represent the chart window
' size and position in normalized percent of the screen. The units are
' (FractionalPercent * 10000), i.e. 40% ==> (0.40 * 10000) = 4000.
#If True Then
' Make the chart 60% of screen height and width and in the upper right corner
' of the screen using the "normalized units" properties.
oChartSize.lNormTop = 0
oChartSize.lNormLeft = 4000
oChartSize.lNormHeight = 6000
oChartSize.lNormWidth = 6000
#Else
' Alternatively, you could use this code which sets the size and position
' of the chart as above, i.e. 60% of screen height and width and in the upper
' right corner of the screen, but uses "absolute" units of Twips. Setting one of
' these "absolute" properties results in the corresponding "normalized" property
' being changed to the appropriate value, i.e. the value for .lTop is actually
' stored as a normalized number in the .lNormTop property.
oChartSize.lTop = 0
oChartSize.lLeft = Screen.Width * 0.4
oChartSize.lHeight = Screen.Height * 0.6
oChartSize.lWidth = Screen.Width * 0.6
#End If
' Specify whether or not to maximize the chart window.
oChartSize.bMaximized = False
' Give the chart size/position object to the chart definition so that it can
' properly size and position the chart display window on the screen. For a
' normal chart (CRF) or Multi-Chart (CRM) the first position in the list, i.e.
' ChartPositionList(1), contains the size/position information for the chart.
' A new PQCrDef object will have ChartPositionList(1) equal to Nothing, which
' defaults to a centered chart occupying 80% of the screen height and width.
Set oCrDef.ChartPositionList(1) = oChartSize
' Display the chart. The chart size/position specified by oCrDef.ChartPositionList(1)
' defines the size and position of the chart display window on the screen.
bRtn = oCrDef.Display()
If Not bRtn Then
MsgBox oCrDef.sLastError, vbExclamation
End If
Data type
PqObjList (object)
This property is returns a PqStrList object which contains a list of strings, one string for each child chart that is a member of a MultiChart or Workspace. Each string entry contains the full path to the child CHARTrunner chart definition file. This property is only relevant for Multi-Charts and Workspaces. A PqStrList is similar to a collection in that it has a .Count property.
Data type
PqStrList (object)
Example
Dim oChRunApp As New CHARTrunner30.Application
Dim oCrDef As PQCrDef
Dim bRtn As Boolean
Dim j As Integer
' Create a chart definition object.
Set oCrDef = oChRunApp.CreatePqObject(eObjPQCrDef)
' Open a chart definition file that is a multi-chart.
bRtn = oCrDef.ReadChartDefinition("C:\Charts\MyMultiChart.crm", eCrPathFull)
For j = 1 To oCrDef.ChartFileList.Count
MsgBox "The file for child chart " & j & " is " & oCrDef.ChildChartList(j)
Next j
Each member of this collection of PQCrLimitSet objects is a set of control limits. This collection is relevant only if the chart is defined as a control chart. A set of control limits has a name and several values that represent the limits to be used on the chart. Note that the chart type determines what limits exist. For example, a set of limits for an X-bar and Range chart contains upper, center, and lower limit values for both the X-bar chart and the Range chart. A chart may be defined with zero or more sets of control limits in this collection. This collection is filled by calling the ReadChartDefinition method.
Data type
Collection (of PqCrLimitSet objects)
ControlChartSettings
HistogramSettings
MlChartSettings
ParetoChartSettings
ScatterChartSettings
Properties
Each of these properties represents a different type of settings object. Depending on the type of chart, only one of these objects will contain properties that are relevant to the current chart. For example, if the chart is an X-bar chart, only the ControlChartSettings object will be used; if the chart is a Pareto chart, only the ParetoChartSettings will be used. These are documented together because their use is identical for all charts; the only difference being which object is used.
There are many properties contained by each of these settings objects. See Interface_PQCM.html for more detailed information about the public properties of each type of settings object.
Each type of settings object shares the overall design of being a "bag" where chart settings are stored. Each chart setting is identified in the "bag" by its enum identifier. For instance, the enum identifier for a PqControlChartSettings object is the pqEnumChartSetting type. Many of the most frequently used chart settings are explicitly exposed via a property of the settings object, such as oCrDef.ControlChartSettings.bDoOOCTests. All the chart settings in the "bag" are accessible via the Prop property as shown in the example below.
Data Type
ControlChartSettings is a PqControlChartSettings object.
HistogramSettings is a PQHistogramChartSettings object.
MlChartSettings is a PqControlChartSettings object (Multi-line charts use this)
ParetoChartSettings is a PQCategoryChartSettings object.
ScatterChartSettings is a PQScattergramChartSettings object.
Example
Dim bRtn As Boolean
Dim oChRunApp As New CHARTrunner30.Application
Dim oCrDef As PQCrDef
' Create a chart definition object.
Set oCrDef = oChRunApp.CreatePqObject(eObjPQCrDef)
' Open a chart definition file.
bRtn = oCrDef.ReadChartDefinition("C:\MyCharts\Sample 01.crf", eCrPathFull)
' Change some chart settings via properties of the ControlChartSettings object.
oCrDef.ControlChartSettings.bDoOOCTests = False
oCrDef.ControlChartSettings.bDrawDataPoints = False
oCrDef.ControlChartSettings.bDrawVerticalGrid = True
oCrDef.ControlChartSettings.bDrawHorizontalGrid = True
' Change the same chart settings via the Prop property of the ControlChartSettings object.
oCrDef.ControlChartSettings.Prop(eControlChart_bDoOOCTests) = False
oCrDef.ControlChartSettings.Prop(eControlChart_bDrawDataPoints) = False
oCrDef.ControlChartSettings.Prop(eControlChart_bDrawVerticalGrid) = True
oCrDef.ControlChartSettings.Prop(eControlChart_bDrawHorizontalGrid) = True
If the chart is defined to use Advanced Row Selection, i.e. bArsEnabled is True, this property determines whether sampling or grouping is performed on the "rows to look at" specified by eArsRowsToLookAt.
Grouping creates a subgroup out of each group of "used rows". Sampling passes only the "used rows" of data to the chart. See also: eArsRowsToLookAt.
Data type
Public Enum pqEnumTreatARSRows eTreatARSRowsGroup = 0 eTreatARSRowsSample = 1 End Enum 'pqEnumTreatARSRows'
If the chart is defined to use Advanced Row Selection, i.e. bArsEnabled is True, and eArsRowsToLookAt = eCrArsSelectRowsOnColChange, and the recordset column specified by sArsColChangeColName is a date or date/time column, then the eArsChooseRowsUnit property specifies the interval of time over which each "group of rows" is formed.
After a "group of rows" has been formed, then depending on the values of eArsUseTheseRows and lArsUseFirstLastXRows, either "All the rows in the group of rows are used", "The first X rows in the group of rows are used", or "The last X rows in the group of rows are used".
Finally, if eArsMode = eTreatARSRowsSample the "used rows" are passed to the chart. And if eArsMode = eTreatARSRowsGroup the "used rows" are grouped together to form a subgroup for the chart.
Data type
Public Enum CrDateGroupingUnitEnum eCrDateGroupNone = 0 eCrDateGroupMinute = 1 eCrDateGroupHour = 2 eCrDateGroupDay = 3 eCrDateGroupWeek = 4 eCrDateGroupMonth = 5 eCrDateGroupQuarter = 6 eCrDateGroupYear = 7 End Enum 'CrDateGroupingUnitEnum'
Sets or returns a value indicating how to look at rows when the bArsEnabled property is set to True, i.e. Advanced Row Selection is enabled.
This property corresponds to the "Look at every N rows of data, where N =" and the "Look at every row of data until column Y data changes" radio buttons on the Advanced Row Selection dialog box.
If eArsRowsToLookAt = eCrArsSelectEveryNRows then each N consecutive rows of the recordset are "looked at as a group", where N is defined by lArsLookAtEveryNRows.
If eArsRowsToLookAt = eCrArsSelectRowsOnColChange then consecutive rows of the recordset are "looked at as a group" as long as the column specified by sArsColChangeColName contains the same value. In other words, a new "group of rows" is formed whenever this column's value changes. If the column is a date or date/time column then eArsChooseRowsUnit allows you to specify the units of the "form a group of rows" interval, e.g. by day, week, month, etc.
After a "group of rows" has been "looked at", then depending on the values of eArsUseTheseRows and lArsUseFirstLastXRows, either "All the rows in the group of rows are used", "The first X rows in the group of rows are used", or "The last X rows in the group of rows are used".
Finally, if eArsMode = eTreatARSRowsSample the "used rows" are passed to the chart. And if eArsMode = eTreatARSRowsGroup the "used rows" are grouped together to form a subgroup for the chart.
Data type
' Options for how rows are selected in Advanced Row Selection. Public Enum CrAdvRowSelectEnum eCrArsSelectEveryNRows = 1 eCrArsSelectRowsOnColChange = 2 End Enum 'CrAdvRowSelectEnum'
eArsUseTheseRows Property
If the chart is defined to use Advanced Row Selection, i.e. bArsEnabled is True, this property determines whether "All the rows in the group of rows are used", "The first X rows in the group of rows are used", or "The last X rows in the group of rows are used".
If the value of eArsUseTheseRows is eCrRowsToUseFirstX or eCrRowsToUseLastX then lArsUseFirstLastXRows determines the value of X.
Data type
' Which rows to use in Advanced Row Selection. Public Enum CrAdvRowsToUseEnum eCrRowsToUseAll = 1 eCrRowsToUseFirstX = 2 eCrRowsToUseLastX = 3 End Enum 'CrAdvRowsToUseEnum'
Sets or returns the enum value that describes what operation was in progress when the user canceled the operation.
Data type
Sets or returns the current chart type enum value.
Data type
Remarks
Note that setting this property will automatically set the sChartType read-only property which will return a human readable version of the chart type. For example, if eChartType = eCrTypeXbarRange then sChartType will be “X-bar and Range”.
This property sets or returns the CHARTrunner chart definition type.
A PQCrDef object may only be one of these definition types:
Regular chart, eCrDefTypeChart, *.crf file extension.
Multi-chart, eCrDefTypeMultiChart, *.crm file extension.
Chart Workspace, eCrDefTypeWorkspace, *.crw file extension.
Data type
Public Enum CrDefTypeEnum eCrDefTypeChart = 1 eCrDefTypeMultiChart = 2 eCrDefTypeWorkspace = 3 eCrDefTypeControlChartStyle = 4 eCrDefTypeHistogramStyle = 5 eCrDefTypeParetoStyle = 6 eCrDefTypeOOC = 7 eCrDefTypeOldStyle_CST = 8 ' 05-11-04 RBS To handle old .CST style files. eCrDefTypeDashboard = 9 ' 03-30-06 RBS Add dashboards in 2.5. End Enum 'CrDefTypeEnum'
This property specifies the type of data source to be used for this chart.
Data type
This sets or returns a value indicating the type of graphic image that will be generated. See also: SaveChartAsImage
Data type
eJetDataType Property
When eDataSourceType is eCrDataSourceTypeJet this property specifies what type of Jet data source will be used to fetch chart data.
Data type
Public Enum CrJetDataTypeEnum eCrJetDataNotUsed = 0 eCrJetDataAccess = 1 eCrJetDataExcel3 = 2 eCrJetDataExcel4 = 3 eCrJetDataExcel5 = 4 ' Excel 95 / 5.0. eCrJetDataExcel8 = 5 ' Excel 97 / 8.0. eCrJetDataText = 6 eCrJetDataParadox3 = 7 eCrJetDataParadox4 = 8 eCrJetDataParadox5 = 9 eCrJetDataDBase3 = 10 eCrJetDataDBase4 = 11 eCrJetDataDBase5 = 12 eCrJetDataLotus123_WK1 = 13 eCrJetDataLotus123_WK3 = 14 eCrJetDataLotus123_WK4 = 15 End Enum 'CrJetDataSourceTypeEnum'
For control charts, this property sets or returns a value indicating which control limit option should be used. If the option eCrAllSavedLimits is selected and there are no members in the cLimits collection, the chart will be displayed with no control limits.
Data type
Public Enum CrLimitOptionEnum eCrNoLimits = 0 eCrTempLimi