Need a special offer?Find out if your project fits.
+

Bug in Captions?

Answered
John W asked on May 6, 2019

Hi,
I'm using Flexmonster Version 2.7.4 (build 04/22/2019 11:02:52), with FireFox 60.0.2.
I have a pivot grid that has "Pat ID" on the row, and also as a column (measure).  The measure is a "distinctcount".  I've used the "caption" tag to label the measure column as "Distinct Cnt of Pats".  If I add another measure column to the grid using the "Fields" dialog, the caption "Distinct Cnt of Pats" is lost, and replaced with "Pat ID".
Here is the slice definition:

"slice": {
"rows": [
{
"uniqueName": "Guar Name"
},
{
"uniqueName": "Pat ID",
"caption": "Pat ID"
},
{
"uniqueName": "Pop"
},
{
"uniqueName": "T19"
}
],
"columns": [
{
"uniqueName": "[Measures]"
}
],
"measures": [
{
"uniqueName": "Pat ID",
"aggregation": "distinctcount",
"caption": "Distinct Cnt of Pats"
}
]
},

If I configure the two columns within the report section when the pivot is created, it works correctly.  If I try to add the second column interactively with the "Fields" dialog, it fails.  Am I doing something wrong, or is this a bug?
Thank you,
John
 

1 answer

Public
Vera Didenko Vera Didenko Flexmonster May 8, 2019

Hello, John,
 
Thank you for writing to us and for sharing your slice configurations.
 
The reason why the caption switches back is that one field can only have one caption.
 
A way to achieve the desired output is to use calculated values :

{
"uniqueName": "Distinct Cnt of Pats",
"formula": "distinctcount(\"Pat ID\")",
"caption": "Distinct Cnt of Pats"
}

 
Here is a JSFiddle example for illustration.
 
 
Please let us know if this works and if you have further questions.
 
 
Best Regards,
Vera

Please login or Register to Submit Answer