Loading javascript API report with filters
Answered
Hello,
We're integrating our reports using the Javascript API, but we're having trouble loading filters prior to the first render of a report.
Our use case is a report that just needs to be filtered by column before being rendered to the user.
A simple example of this might be:
All Customers Page -> Customers Report showing all customers
Department >> Customers Page -> Shows Customers filted by department ID
What we have now:
yellowfin.reports.loadReportFilters(uuid, this.loadReport); this.loadReport = () => { // ... filters report correctly and sets options and runs yellowfin.loadReport(options) }The issue we are having is that on the first load of this report, it does not have the filters or the report loaded.
Is there something I'm missing, or is it mandatory to load the report first, then filter against it?
Another acceptable solution would be a way to load the report without rendering it (we do not want the full dataset to show until it has been rendered with the filters)
Thanks!
Hi Will,
Thanks for reaching out.
I can point you to the resources we have available for Web Services. We have a General Report Services Wiki and a Legacy Report Services Wiki entry, that seem may be pertinent here, if you haven't already come across these.
All of our Report Web Service options should be contained within the above referenced documentation. As far as I can tell, to filter a report you'd use a FILTEROPTIONS request. You need to look into the ReportFilter table for both the FilterID and the ReportID in the Yellowfin configuration Database in order to accomplish this. Our documentation does provide an example of this:
Unfortunately though, I'm afraid it is outside the scope of Standard Support to write any code, so I can really only provide high-level information and links to assist with this. Any specific coding solutions would fall in the realm of Consulting services, if that's something you'd be interested in obtaining or if you have purchased consulting hours left... I believe you've worked with our Consultant Justin in the past. He may able to provide quick pointers on how to set this specific to your environment should our documentation prove insufficient.
Hopefully this clears things up a bit though. Please let me know if you have any further questions or concerns regarding this.
Regards,
Mike
Hi Will,
Thanks for reaching out.
I can point you to the resources we have available for Web Services. We have a General Report Services Wiki and a Legacy Report Services Wiki entry, that seem may be pertinent here, if you haven't already come across these.
All of our Report Web Service options should be contained within the above referenced documentation. As far as I can tell, to filter a report you'd use a FILTEROPTIONS request. You need to look into the ReportFilter table for both the FilterID and the ReportID in the Yellowfin configuration Database in order to accomplish this. Our documentation does provide an example of this:
Unfortunately though, I'm afraid it is outside the scope of Standard Support to write any code, so I can really only provide high-level information and links to assist with this. Any specific coding solutions would fall in the realm of Consulting services, if that's something you'd be interested in obtaining or if you have purchased consulting hours left... I believe you've worked with our Consultant Justin in the past. He may able to provide quick pointers on how to set this specific to your environment should our documentation prove insufficient.
Hopefully this clears things up a bit though. Please let me know if you have any further questions or concerns regarding this.
Regards,
Mike
Hi Will,
I just wanted to check in and see how things are going with this.
Regards,
Mike
Hi Will,
I just wanted to check in and see how things are going with this.
Regards,
Mike
We spoke to a support engineer that is helping us with this case – I’ll try my best to explain the resolution once we’ve figured it out 😊
Thanks for your help!
We spoke to a support engineer that is helping us with this case – I’ll try my best to explain the resolution once we’ve figured it out 😊
Thanks for your help!
Hi Will,
Great! Thanks for the update.
Regards,
Mike
Hi Will,
Great! Thanks for the update.
Regards,
Mike
Hi Will,
I just wanted to check in and see how things are going with this.
Regards,
Mike
Hi Will,
I just wanted to check in and see how things are going with this.
Regards,
Mike
Hello!
Because we're using a single page application, we'll likely have to load the filters on the first request on the server side using GETUUIDBYID for reports.
Timing between React renders causes a lot of issues with elements existing or not existing at any given point. We've though about potentially using React.Portal, but we're hoping to make a long term solution using GETUUIDBYID.
Thanks for your help!
(also can you moderate my above post to get rid of personal info)
Thanks!
Hello!
Because we're using a single page application, we'll likely have to load the filters on the first request on the server side using GETUUIDBYID for reports.
Timing between React renders causes a lot of issues with elements existing or not existing at any given point. We've though about potentially using React.Portal, but we're hoping to make a long term solution using GETUUIDBYID.
Thanks for your help!
(also can you moderate my above post to get rid of personal info)
Thanks!
Hi Will,
Thanks for your response. I've gone ahead and removed the info from your previous reply.
I'm not sure Support can offer much assistance at this point - are we okay to close this case out for now, or do you want us to keep this open and monitor a bit longer? If needed, if you wind up with any specific questions (that are non-code related, as this would be outside the scope of Support) you can still reach out in this ticket and the ticket would re-open and I'd be happy to assist further.
Regards,
Mike
Hi Will,
Thanks for your response. I've gone ahead and removed the info from your previous reply.
I'm not sure Support can offer much assistance at this point - are we okay to close this case out for now, or do you want us to keep this open and monitor a bit longer? If needed, if you wind up with any specific questions (that are non-code related, as this would be outside the scope of Support) you can still reach out in this ticket and the ticket would re-open and I'd be happy to assist further.
Regards,
Mike
Go ahead and close!
Thanks for your help!
Just as a note for any passerby's, the documentation notes in the functional report services here:
https://wiki.yellowfinbi.com/display/user80/Functional+Report+Services
that you should use GETIDFROMUUID to handle the request.
After digging deeper, this is not the request you need. You should however user GETIDFORUUID as noted at the bottom of the page here:
https://wiki.yellowfinbi.com/pages/viewpage.action?pageId=20709582
For Ruby using Savon to make the SOAP requests, a message request can look like:
to get passed the serialization error of simply using an array on parameters
Go ahead and close!
Thanks for your help!
Just as a note for any passerby's, the documentation notes in the functional report services here:
https://wiki.yellowfinbi.com/display/user80/Functional+Report+Services
that you should use GETIDFROMUUID to handle the request.
After digging deeper, this is not the request you need. You should however user GETIDFORUUID as noted at the bottom of the page here:
https://wiki.yellowfinbi.com/pages/viewpage.action?pageId=20709582
For Ruby using Savon to make the SOAP requests, a message request can look like:
to get passed the serialization error of simply using an array on parameters
Hi Will,
Awesome! Thanks for supplying this info. Much appreciated.
Please don't hesitate to reach out with any other questions or concerns.
Regards,
Mike
Hi Will,
Awesome! Thanks for supplying this info. Much appreciated.
Please don't hesitate to reach out with any other questions or concerns.
Regards,
Mike
Replies have been locked on this page!