CREPORTINPUT

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.

Syntax

CREPORTINPUT (Value, InputType)

Arguments

Value

(Required)   Specify the default value to show when the report is published

InputType

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” 

AutoCalc

Whether changing the value will “automatically” trigger a calculate on the report

Default value: false

Usage Scenarios

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.

Examples

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.

A

B  

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:

=CREPORTINPUT(10,"Number",TRUE)

MDX Cell B10:

=CCONCAT(B4:B8)

ReflexReportCell Cell A14:

=CREFLEX(B1,B2,B10,$C$15:$D$24,B12:D12,1,0,0,0,B5+1,-1,"-")

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