Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

Set the sequence of columns

Answered
Anjali Changale asked on November 10, 2020

Hi,
I want to define the sequence of columns in report grid.
example- Suppose there are 3 columns- A,B and C
A and C are the simple text rows(not measures) and B is calculation (comes under measures)
slice: {
  rows: [
         { uniqueName: “A”, caption: “A”},
         { uniqueName: “C”, caption: “C” },                                                         
   ],
   columns: [{ uniqueName: “[Measures]” }],
   measures: [                              
      { uniqueName: “B”, aggregation: “sum”, format: “currency” , caption:”B”}
  ]
Here , the sequence will be -> A,C,B
How can i get it as -> A,B,C

2 answers

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster November 10, 2020

Hello,
 
Thank you for posting on our forum.
 
If we understand you correctly, the flat form is used in your case.
To define the order of fields on the flat table, use the flatOrder property of the Slice Object.
It should be specified like this: ["A", "B", "C"].
 
You are welcome to see the JSFiddle we have prepared for the demonstration.
 
Please let us know if it works for you.
Feel free to contact us in case any further questions arise.
 
Best regards,
Illia

Public
Anjali Changale November 12, 2020

It is working. Thank you!!!

Please login or Register to Submit Answer