Not getting report Object

Answered
Abbas asked on January 28, 2026

Hello, 

I’m using a Pivot component in Vue and want to apply pre-filtering before fetching data. After configuring the fields, I replaced the default Apply button with a custom button on fieldsListOpen event, I’m using gettingMembers to get the members for the selected row (first index) and the first column (if present) through the UI list since im unable to get report with getReport.

 

However, I’m unable to retrieve the existing slice using getReport, so I can’t access the current report configuration. After applying all my logic, I want to append a new filter slice to the existing slice, but since getReport doesn’t return the existing report, I’m stuck. Is there any way to achieve this?

6 answers

Public
Maksym Diachenko Maksym Diachenko Flexmonster January 28, 2026

Hello, Abbas,

Thank you for writing to us and providing a detailed description.

This behavior is expected and occurs because the getReport method was designed to capture the current state of the grid - specifically, the rows and columns that have already been rendered. When you are working in the Field list and replace the default "Apply" button, the UI changes are not applied to the report. As a result, the slice state cannot be retrieved at that point.

If you need to implement pre-filtering logic before data is fetched, we recommend creating a custom Field List with pre-filtering, allowing you to fully control slice construction before applying it to the component and loading the data. This approach is illustrated in the following JSFiddle: https://jsfiddle.net/flexmonster/7g8eLnrv/

As a workaround, you could also try accessing the Field List state directly from the UI using querySelector and extracting the selected fields from the DOM. But keep in mind that field captions may differ from uniqueName, and measure captions in the Field List include aggregation information, which can lead to inconsistencies, since each field is included in the slice by its uniqueName.

Please let us know if any further questions arise.

Best regards,
Maksym

Public
Abbas January 28, 2026

Hey, thanks for getting back to me.

 

I checked out the fiddle you sent earlier, and the problem is it's not as clear as the original UI about what belongs to which row or column. Also, how do you even set the order for row fields? In the default UI, if I have "name empid" as the first row and "city" as the second, I can easily tell I want "city by empid." That clarity is missing here.

 

Second, about selecting with querySelector  yeah, I know uniqueName and innerText are different. For measures, it turns into "operation" of "fieldName," which needs to be converted back to its original, supported format. Are there any other ways to do this? If I stick with what I've already built, do you have any work-around suggestions while keeping the UI the same?

Public
Maksym Diachenko Maksym Diachenko Flexmonster January 29, 2026

Hello, Abbas,

Thank you for your reply.

The example Field List we shared earlier is meant to be a basic reference that demonstrates the overall workflow. It can be further customized to display the field order for each area or enable reordering fields with drag-and-drop functionality.

That said, we understand that replicating the existing Field list UI functionality requires a big development effort and may be an overhead. If you prefer using the current approach with custom "Apply" handling, we suggest using the getAllHierarchies API call. It returns both the caption and the unique name of each field, which may be useful in case the caption was changed via mapping.

Measure captions with aggregation labels require additional processing. In this case, you would need to strip the aggregation part yourself. A simple and reliable approach is measureLabel.split(' of ').pop(), since the field name always appears after the last " of ". This approach also safely handles spaces in the label itself and aggregation labels with multiple " of " substrings (for example, "% of Parent Row Total of Field"). After stripping the aggregation label, the field caption can be mapped to its unique name using the data returned by getAllHierarchies.

Alternatively, aggregation labels can be completely disabled, which removes the need for label preprocessing: https://jsfiddle.net/flexmonster/ecet3kw6/

Please let us know if our answer helped you.

Best regards,
Maksym

Public
Abbas January 30, 2026

Hello Maksym,

The provided solution worked for me. Thank you for that. I have one more question. I have gone through the documentation thoroughly but could not find a way to query or search members directly.

Currently, I am fetching up to 5k members for each field. In cases where a field has more than 10k distinct values, I implemented a server-side search, but I am unable to find a way to search through members using the getMembers method.

Additionally, I would like to avoid fetching members for all fields upfront and instead fetch them on demand i.e whenever the dialog is opened and then cache it, Could you please advise if there is a recommended approach for this?

 

Thanks in advance

Public
Maksym Diachenko Maksym Diachenko Flexmonster February 2, 2026

Hello, Abbas,

Thank you for your reply.

The getMembers API call, when used with a custom API, works asynchronously via a callback handler:

pivot.getMembers("Category","",members => console.log(members)) 

Alternatively, you can use the getMembersAsync API call, which returns a promise that resolves to an array of members:

await pivot.getMembersAsync("Category")

Both methods can also trigger the /members request for members that are not currently loaded on the client.

Regarding your question about fetching members only when the corresponding filter is opened, this cannot be implemented in Flexmonster.

We are looking forward to hearing your feedback.

Best regards,
Maksym

Public
Maksym Diachenko Maksym Diachenko Flexmonster 5 hours ago

Hello, Abbas,

Hope you are doing well.
Just checking in to ask if our recommendation helped you retrieve the members to add to the custom filter.
Please let us know if any further assistance is needed.

Best regards,
Maksym

Please sign in or register to submit your answer