The ReportVariable function pulls data from a data source and inserts it into a spreadsheet. It is similar to the ReportFixed function because it takes row names as input in addition to column names. Only data that is mapped to both these row and column names from the data source will be inserted. Consequently, the range where data is inserted is defined by the boundaries of the RowDefRange and the ColDefRange. Data returned by this function can be filtered, formatted, and customized for a specific desired report.
This function differs from the ReportFixed function in that it will group the data based on the values defined in the RowDefRange argument. The grouping feature allows the data to be collapsed and expanded by category. Note: Entries for each group must contain an empty row above in order to populated with data correctly.
This function will use the "NorthwindVariable" DataPortal for the data source.
The names found in B18:B54 will be used to map to the column names found in row 2 (ColDefRange). Only data that intersects these names will be inserted on these rows. Data will be grouped by the names found in this range.
The names found in row 2 will be used to map to the row names found in row B14:B27 (RowDefRange). Only data that intersects these names will be inserted on these columns.
The formatting used in row 4 will be used as a template for the inserted data.
Cells I14 and I15 will correspond to the parameters in the data source to filter the inserted data.
Left blank to indicate not to retain any data in the TargetDataRange (B14:H15).
This value is automatically set to false since RetainRowColumns is blank.
Data will be inserted on the first row (18) defined in RowDataRange.