The CREPORTINPUT allows you to give users of your Published Reports a data entry field that can be used by other parts of your report.
CREPORTINPUT (Value, InputType)
(Required) Specify the default value to show when the report is published
Specify either “Number” or “Text” to let the formula know what type of data will be put into this input in a report. Specifying “Number” will mean that users can only enter numeric values.
Default value: “Number”
Whether changing the value will “automatically” trigger a calculate on the report
Default value: false
A classic usage scenario for this formula is to provide users of a report a field that can enter a number into to drive a top count.
In the design of a report, this cell will be used in the MDX as the number of rows to return in a top count.
This simple number example calculates a number of values based upon two numbers input. Input of number A will trigger an automatic recalculation, whereas number B won’t.
Entering 10 into number A and pressing Enter results in the following screen. A number of fields have updated automatically:
Entering 2 into number B and pressing Enter still leaves the selector on number B:
Clicking on number A allows us to move off the input, but has not updated the calculations
To update the calculations we must press F9 (or recalculate)
Any time Number A changes, we just need to press Enter for a recalculation to occur. For Number B the user must explicitly request the recalculation (F9).
Utilising the CALUMO CREFLEX function, we can obtain the top x products from Adventure Works. Relevant formulas are:
CReportInput Cell B5:
MDX Cell B10:
ReflexReportCell Cell A14:
Formatting has been defined in cells B12:D12.
Cell B15 has the constant 1.
On publish we see
Changing the CReportInput value to 20 (in the web) and recalculating (F9) changes our list of products to
Changing to 5, we obtain