Caption of aggregated values, hide columns

Answered
Jan Strohbehn asked on July 6, 2016

Hi, we are currently evaluating Pivot Table and facing two issues that are maybe easy to solve:

  • We need to change the caption of aggregated values in the attached example ('$ YTD' instead of 'Sum of salesgrossvalue_total_cy')
  • We like to hide/unhide some of the columns on click, as our default reports are quite detailed. In the attached examples show 'Sum of salesgrossvalue_total_cy' only when clicking on the day of the week. Guess that can be solved with clickHandlers, but maybe there is a more elegant way.

Any help especially on the first topic would be highly appreciated as this currently is a show-stopper for our use-case.
Thanks in advance

4 answers

Public
Roman Petrusha Roman Petrusha Flexmonster July 6, 2016

Hi!

1. You can define caption in report like this:
measures: [{uniqueName: "salesgrossvalue", caption: "Price"}, {uniqueName: "Quantity"}], 
2. Sorry, but I'm not sure that I understand your question? Could you please provide more info?
Regards,
  Roman

Public
Jan Strohbehn July 6, 2016

Thanks a lot for your swift reply.
Unfortunately in your example it still end up as "Sum of Price" whereas I like to have "Price" only, as our reports are quite wide and we tend to use abbreviations to keep reports readable. Regarding the second question I found what I was looking for using handlers simply adding measures on demand.
Best,
Jan

Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster July 7, 2016

Hi Jan,
The only way to configure the component like you want, is to set a new localization file with the empty "grandTotalCaption" and "totalCaption" attributes, here is an example of such localization file https://s3.amazonaws.com/flexmonster/2.2/loc-no-aggregations.xml. If you use .xml report it will look like this
<params>
....
<param name="localSettingsUrl"><![CDATA[https://s3.amazonaws.com/flexmonster/2.2/loc-no-aggregations.xml]]></param>
</params>
In order to set the different caption for measure, you should add the following:
<measure aggregation="sum" caption="PR" active="true" format="currency">Price</measure>.
Here is an example https://jsfiddle.net/Uaman23/btc73k82/. If you want to know more, you can look through our documentation (http://www.flexmonster.com/doc/localizing-component/). Hope it will help.
Best regards,
Dmytro

Public
Tanya Gryshko Tanya Gryshko Flexmonster December 5, 2016

Hello Jan and all Flexmonster users,
Starting from version 2.3, localization is set via JSON. All the details are available in the following article: Localizing component. We have prepared an updated sample for you:
https://jsfiddle.net/flexmonster/4ungg3ch/
Regards,
Tanya

Please login or Register to Submit Answer