Introduced in QPR 7.3.1
Last changed in QPR 2012
Stores the graphical image of a selected element and period to the file GraphFileName. GraphFileName i.e. Graphics File Name with the full path is given as a parameter. This is useful e.g. for creating reports. Additional options can also be defined in the function call.
SCModel.GetGraph(ElementId, GraphFileName, Options)
ElementId: Integer. ID of the desired element.
GraphFileName: String. Graph file name with a full path included. In the case this parameter is empty, the graph is placed on the clipboard in BMP + metafile format.
Options: String. A ";" separated list of additional options. The following options are supported:
|•||WMF (Windows metafile)|
|•||JPG (Jpeg, default)|
|•||INDICATOR: Returns measure's graph area with indicators and history charts included|
|•||CHART: Returns measure's graph area with indicators and history charts included|
|•||SCORECARDVIEW: Returns scorecard's Hierarchy View.|
|•||STRATEGYMAPVIEW: Returns scorecard's Dashboards view.|
|•||TREND: Returns measure's trend arrow symbol. This requires that SERIES and PERIOD (or PERIODNAME) options are defined as well.|
|•||-1 (default series)|
|•||-3 (latest for all)|
|•||-4 (chart period, uses settings defined in QPR Metrics client)|
Note that the period defined either by the PERIOD or PERIODNAME option also defines the period level used. For example, if the period name is "2005", period level of "Year" is used.
PERIODNAME: Name of the selected period. The PERIOD option (if defined) overrides this option.
PERIODMIN: Offset of periods to show before the selected period. This option is applicable only if the GRAPHTYPE option is set to CHART. Also positive offset (i.e. referring to periods after the selected period) is allowed.
PERIODMAX: Offset of periods to show after the selected period. This option is applicable only if the GRAPHTYPE option is set to CHART. Also negative offset (i.e. referring to periods before the selected period) is allowed.
WIDTH: Graph's width in pixels. 640 by default.
HEIGHT: Graph's height in pixels, 480 by default.
TEMPLATE: ID or name of a graph layout template. Selects the graph layout template that is used when creating the graph layout image. This option is applicable only if the GRAPHTYPE option is set to INDICATOR or CHART. In the case the TEMPLATE parameter is empty, the currently selected graph layout template is used.
VIEW: ID or name of view settings to be used for the generated graph. This option is applicable only when the GRAPHTYPE option is set to SCORECARDVIEW or STRATEGYMAPVIEW. If this parameter is omitted, the default view settings are used.
At least view rights for an element. In the case of Dashboards or Hierarchy View, at least Model Administrator rights for the SCModel.
Below are listed the return values that this function can return:
iResult = SCModel.GetGraph(98765,"C:\temp\graph.jpg", _