This subroutine sets report preferences and creates a Crystal Ball report. For any preferences not manually set, the default is the current setting in the Create Report dialog. Use CB.CheckData before using this call.
Although Full is the default report type in the Create Report dialog, Custom (cbRptCustom) is the default report for CB.CreateRptND. |
To create a custom report, call CB.CreateRptND as follows before creating the report:
CB.CreateRptND cbRptDefinedType, cbRptCustom
Table 30. CB.CreateRptND Parameters
Specifies which report preference you are setting. See Table 31. | ||
Specifies settings for the preference indicated by Index. See Table 31. | ||
Specifies settings for the preference indicated by Index. See Table 31. |
Table 31 shows each Index value and the corresponding Value1 and Value2 parameter values.
Table 31. Index and corresponding Value1 and Value2 Parameters
Generates the report. Use this parameter after setting other report options. | ||||
Includes all open trend charts in the report at a specified scale | ||||
Includes all open sensitivity charts in the report at a specified scale | ||||
Includes the frequency chart for each included forecast at a specified scale | ||||
Includes the percentile statistics for each included forecast | (Integer) See Table 32. | |||
enables you to clear, add, and set the list of forecasts to include in the report | (Integer) See table Table 33, following. | |||
Includes the distribution parameters for each included assumption | ||||
Includes the distribution graph for each included assumption at the specified scale | ||||
Clears, adds, and sets the assumptions to include in the report | (Integer) See table Table 34 following. | |||
(Integer) See Table 35 following. | ||||
Includes all open overlay charts in the report at a specified scale | ||||
(Boolean) True creates the report in a new page of the existing workbook. False creates the report in a new workbook. | ||||
Specifies which summary information to include in the report | (Boolean) True includes the parameter specified in Value2; False does not. | (Integer) See Table 36. | ||
Clears, adds, and sets the list of decision variables to include in the report | (Integer) See Table 37. | |||
(Integer) Same as that for cbRptFore-Percentiles. See Table 32 following. | ||||
Includes the distribution graph for each included overlay chart | ||||
Clears, adds, and sets the overlay charts to include in the report (when used with CB.SelectChart) | (Integer) See Table 38. If cbChartAdd, the selected chart is added. | |||
Clears, adds, and sets the trend charts to include in the report (when used with CB.SelectChart) | (Integer) See Table 38. If cbChartAdd, the selected chart is added. | |||
Clears, adds, and sets the sensitivity charts to include in the report (when used with CB.SelectChart) | (Integer) See Table 38. If cbChartAdd, the selected chart is added. | |||
Clears, adds, and sets the scatter charts to include in the report (when used with CB.SelectChart) | (Integer) See Table 38. If cbChartAdd, the selected chart is added. | |||
Selects a predefined report type or uses the settings defined by the various CB.CreateRptND constants | (Integer) See Table 39. | |||
(Boolean) True includes the cell location information; False does not. | ||||
Indicates whether to include or exclude entire report sections | (Boolean) True includes the report section specified in Value2; False excludes the specified section. | (Integer) See Table 40. | ||
(String) A string of ten comma-separated values (listed in Table 40) that specify the section order. For example: 1,6,7,8,2,3,4,5,9,10 indicates that the report should include sections in this order: Summary, Forecasts, Assumptions, Decision Variables, Overlay, Trend, Sensitivity, Scatter, OptQuest results, Predictor forecasts | ||||
Specifies whether to report capability metrics for forecasts in custom reports | True includes the metrics; False does not include the metrics. | |||
Includes all open scatter charts in the report at a specified scale | ||||
Includes the OptQuest Summary section in the report following an optimization run | (Boolean) True includes the OptQuest summary information; False does not. | |||
Includes the optimization solution graph in the report following an optimization run | ||||
Includes the OptQuest Best Solution section in the report following an optimization run | (Boolean) True includes the OptQuest best solution information; False does not. | |||
Includes the OptQuest Constraints section in the report following an optimization run | (Boolean) True includes the OptQuest constraints information; False does not. | |||
Includes the OptQuest Decision Variables section in the report following an optimization run | (Boolean) True includes the OptQuest decision variables information; False does not. | |||
cbRptPredictorChart | 45 | Includes Predictor results charts for each series in the report following a Predictor run. | ||
Includes the Predictor Statistics section in the report following a Predictor run | (Boolean) True includes the Predictor statistics information; False does not. | |||
Includes the Predictor Autocorrelations section in the report following a Predictor run | (Boolean) True includes the Predictor autocorrelations information; False does not. | |||
Includes the Predictor Forecasts section in the report following a Predictor run | (Boolean) True includes the Predictor forecasts information; False does not. | |||
Includes the Predictor Confidence Intervals section in the report following a Predictor run | (Boolean) True includes the Predictor confidence intervals information; False does not. | |||
(Integer) See Table 41 following. |
The following constants have been removed since Crystal Ball 2000.5 (5.5): cbRptForeFrequencies = Index 8 (obsolete), cbRptDecVar = Index 15 (included in CB 7.1 and later for compatibility; users should migrate to using cbRptChooseDecVar instead). cbRptScatterChart [38] and similar constants such as cbRptOverlayChart [14] include all open charts of the selected type, as stated in their descriptions. These constants override any previous settings made with “Choose” commands, such as cbRptChooseScatter [31]. The cbRptOptimizer... constants (39-43) were added in Crystal Ball 11.1.1.0.00 |
With Index set to cbRptForePercentiles, you can specify which percentile ranges to include in the report (see Table 32).
With Index set to cbRptChooseFore, you can specify which forecasts to include in the report (see Table 33).
Table 33. For Index = cbRptChooseFore, Value1 Values — Optional, Integer
Includes chosen forecasts. Run this option after adding forecasts. | ||
Adds the forecast in the selected cell to the list of chosen forecasts | ||
With Index set to cbRptChooseAssum, you can specify which assumptions to include in the report (see Table 34).
Table 34. For Index = cbRptChooseAssum, Value1 Values — Optional, Integer
Includes chosen assumptions. Run this option after adding assumptions. | ||
Adds the assumption in the selected cell to the chosen assumptions. Use cbChaChosen after this option. | ||
With Index set to cbRptChartType, you can specify what type of chart the report uses (see Table 35).
With Index set to cbRptSummary, you can specify what to include in the summary (see Table 36).
With Index set to cbRptChooseDecVar, you can specify which decision variables to include in a report (see Table 37).
Table 37. Index = cbRptChooseDecVar, Value1 Values — Optional, Integer
Includes chosen decision variables. Include a statement with this constant after added decision variables | ||
Adds the decision variable in the selected cell to the list of chosen decision variables | ||
With Index set to cbRptChooseOverlay, cbRptChooseTrend, or cbRptChooseSensitivity, you can specify which individual charts to include in a report when charts are selected with CB.SelectChart (see Table 38).
With Index set to cbRptDefinedType, you can indicate which predefined report type to use (see Table 39).
Table 39. For Index = cbRptDefinedType, Value1 Values — Optional, Integer
With Index set to cbRptSection, you can use the following constants as the Value2 parameter to specify the order of report sections (see Table 40).
Table 40. For Index = cbRptSection, Value2 Values — Optional, Integer
Includes the OptQuest results section, following an OptQuest optimization run | ||
Includes the Predictor results section, following a Predictor forecasting run |
With Index set to cbRptPredictorMethods, you can use the following constants as the Value1 parameter to specify which forecasting methods to include in Predictor report data (see Table 41).
Table 41. For Index = cbRptPredictorMethods, Value1 Values — Optional, Integer
Named Constant Value | Index Value | Description |
---|---|---|
cbPredictorMethodsNone | 1 | Includes no methods |
cbPredictorMethodsAll | 2 | Includes all methods |
cbPredictorMethods1Best | 3 | Includes the method with the best accuracy |
cbPredictorMethods2Best | 4 | Includes the method with the second-best accuracy |
cbPredictorMethods3Best | 5 | Includes the method with the third-best accuracy |
Use cbRptOK to generate the report after you use the other index values to set report preferences.
A simulation must not be in progress. If a simulation has not yet run, the report only includes assumption information.
To add individual charts, use constants cbRptChooseOverlay, cbRptChooseTrend, and cbRptChooseSensitivity from Table 30. Use these constants with CB.SelectChart and the constants in Table 38. If you create a chart through the Developer Kit, open it before including it in a report. Otherwise, the chart will show up in the report with a “no data available” message. See the Oracle Crystal Ball User's Guide for more information on creating reports. |