How to select all column automaticly default
How to select all column automaticly default
2 answers
And how to expand all fields (column) automaticly default true
Hello,
Thank you for reaching out to us.
Field selection for the report is defined by the properties of the slice
object. In case such properties are undefined in the report, the fields will be selected in the following way:
- For classic and compact views the first hierarchy from the data source is put into the rows and the first measure is put into columns.
- In case the flat view is used, all fields will be chosen for the report.
More information about slice
object and its properties: Slice Object.
Speaking about your second request, when all fields in all hierarchies have to be expanded by default, the expandAll
property of the expands
object has to be set to true. The expands
object itself is a property of the slice
object. More information about expands
object: Expands Object.
If only a specific hierarchy or its members have to be expanded, we recommend using one of the following approaches:
- Using an
expandData
API call with the desired hierarchy as a parameter. The method should be executed right after the report is completed; we recommend using areportcomplete
event to implement such a functionality. Check out an example we have prepared for you. More information aboutreportcomplete
event can be found by the link: reportcomplete event. - If only specific members of the hierarchy have to be expanded, an
expands
object has to be used. The object itself is a property of theslice
object. More about theslice
object and its properties can be found by the link: Slice object.
You are welcome to check out an example we have prepared for you.
Kind regards,
WebDataRocks Team