Hey Guys,
We present reports in pivot table view by default but our users can switch to flat view. We'd like to be able to control the fields presented based on the view chosen. For example, we don't want calculated fields in flat view since it lists data at the most detailed level. Do you have a recommendation for how to handle this?
Thank you!
Hello Gennady,
Thank you for reaching out to us.
We recommend using the reportchange
event to check if the view type changes and then setting a new slice using the runQuery
API call. You are welcome to check the following JSFiddle for illustration: https://jsfiddle.net/flexmonster/L9w1phva/. Feel free to customize it for your needs.
Please let us know if it works for you. Looking forward to hearing from you.
Kind regards,
Nadia
Nadia, appreciate the response. We'll consider the approach you suggested and let you know if further questions come up. Thank you
Hello Gennady,
Thank you for the feedback.
Do not hesitate to contact us in case any questions arise.
Kind regards,
Nadia