We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

Add custom headers

Resolved
Rushi Lonkar asked on June 27, 2023

Hello,
I want to have a report layout as shown in the attached sample. My data does not contain the category headers "Savings" and "WIP". Can this be achieved? Maybe using hierarchies? If I add Category in the data and use that as a column, all my measures will appear for both the categories which I do not want.
Thank you,
Rushi
My sample data is as follows:
[
{
"HealthSystemName": "Appalachian Regional Healthcare",
"FacilityName": "Hazard Med Ctr (Hazard, KY)",
"ProgramName": "PAN: Non-Small Cell Lung Cancer (Medicare)",
"ProductName": "Tecentriq",
"BatchStatusID": 1,
"BatchStatusName": "New",
"ServiceName": "Foundation",
"ITDValue": 200.00,
"YTDValue": 120.00,
"PriorMonthValue": 60.00,
"MTD": 0.00,
"Shipped": 0.00,
"InProgress": 10.00
},
{
"HealthSystemName": "Baptist Health FL",
"FacilityName": "Baptist Medical Center – Clay\/ED",
"ProgramName": "Generic Devices",
"ProductName": "Balloon Generic",
"BatchStatusID": 1,
"BatchStatusName": "New",
"ServiceName": "Device",
"ITDValue": 5000.00,
"YTDValue": 120.00,
"PriorMonthValue": 50.00,
"MTD": 0.00,
"Shipped": 0.00,
"InProgress": 0.00
},
{
"HealthSystemName": "Baptist Health FL",
"FacilityName": "Baptist Medical Center – North\/ED",
"ProgramName": "AbbVie PAP-Humira",
"ProductName": "Humira",
"BatchStatusID": 1,
"BatchStatusName": "New",
"ServiceName": "Drug",
"ITDValue": 100.00,
"YTDValue": 5.00,
"PriorMonthValue": 24.00,
"MTD": 8.00,
"Shipped": 8.00,
"InProgress": 0.00
}
]

Attachments:
ReportLayout.png

3 answers

Public
Maksym Diachenko Maksym Diachenko Flexmonster June 28, 2023

Hello, Rushi!

Thank you for reaching out to us.

There are several ways to create a similar layout.
Please note that Flexmonster does not provide a way to create a layout identical to the one shown on ReportLayout.png. However, several approaches could achieve similar results. We prepared brief descriptions and JSFiddle examples for each of them: 

Using measure captions (Example)
As a possible solution, you could change the captions for each measure to show the top-level category using the measure.caption property. This way, they would be visually distinguishable from different groups of values. Also, options.showAggregationLabels should be used to remove the "Total Sum of" caption before each measure's name. 

Using tabs to select grid configuration (Example)
This solution uses the setReport() API call to switch between different report configurations which contain different measures groups. To identify which group is currently shown, the options.grid.title property is used. The options.showAggregationLabels should be used as well.

Changing the data structure (Example)
This approach allows us to achieve a similar layout by changing the data structure. Firstly, all the values should be stored in a single measure. This will require creating more objects, one per each non-zero value in existing objects. Instead of using the measure name to identify the values subcategory ("ITDValue", "YTDValue"), the new column can be added. Also, a new column would be required to store the top-level categories ("Savings", "WIP"). The resulting data structure should be the following:

{  
BatchStatusID: 1,  
BatchStatusName: "New",  
FacilityName: "Hazard Med Ctr (Hazard, KY)",  
HealthSystemName: "Appalachian Regional Healthcare",  
ProductName: "Tecentriq",  
ProgramName: "PAN: Non-Small Cell Lung Cancer (Medicare)",  
ServiceName: "Foundation",  
Subcategory: "ITDValue",  
Type: "Savings",  
Value: 200
}

Our example uses a script to transform the data in a way allowing to split values by category.

Please let us know if one of the suggested solutions would fit your project.

Best Regards,
Maksym

Public
Rushi Lonkar June 28, 2023

Hello Maksym,
Thank you so much for providing the possible options to achieve the desired layout. I feel the 3rd option Changing the data structure would be more in line to what our users want. I can try it and reach our to you if I have any issues.
Thanks,
Rushi

Public
Maksym Diachenko Maksym Diachenko Flexmonster June 30, 2023

Hello, Rushi!

Thank you for your feedback.
We are glad to hear that one of the provided solutions worked for you.
Feel free to contact us if more questions arise.

Best Regards,
Maksym

Please login or Register to Submit Answer