OpenFilter is not reliable, it does not open always

Answered
Marcelo Galperin asked on August 22, 2024

I have a report with custom api that when including a certain field in it, I require to use a hierarchy filter. Server side I return nothing if it was not filtered and client side I use the querycomplete event to check if they have not filtered by it and display a notice that you can't see data without filtering by it.

I want to additinally open the filter to help the user understand what's needed, but using openFilter works sometimes and sometimes not. I have noticed that using timeout 200ms to do the openFilter improves and it works most of the times, but it is still not reliable. I would guess that the component that holds the filter is being redrawn after querycomplete for some reason and thus the opened filter is lost. What would be a way to get the filter to open reliably?

5 answers

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster August 23, 2024

Hello Marcelo,

Thank you for reaching out to us.

We could not reproduce the described behavior. Could you please provide us with the sample project where this issue can be reproduced? It would greatly help us.

Looking forward to hearing from you.

Kind regards,
Nadia

Public
Marcelo Galperin August 23, 2024

Sure, here is an example: https://jsfiddle.net/juvian/htj70yfb/2/. It correctly opens the filter about 1/3 of times

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster August 27, 2024

Hello Marcelo,

Thank you for providing us with the example.

Instead of using the querycomplete event, we recommend using the reportcomplete event. Feel free to check the following JSFiddle for reference: https://jsfiddle.net/flexmonster/twc6bup1/.

Please let us know if it works for you. Looking forward to hearing from you.

Kind regards,
Nadia

Public
Marcelo Galperin August 27, 2024

That seems to work perfectly, thanks!

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster August 28, 2024

Hi Marcelo,

Thank you for the feedback!

We are glad to hear that it works for you.

Do not hesitate to contact us if other questions arise.

Kind regards,
Nadia

Please login or Register to Submit Answer