Fetch per page in viewer

Posted by: danijelamati on 19 November 2023, 10:01 pm EST

    • Post Options:
    • Link

    Posted 19 November 2023, 10:01 pm EST

    Hello, I have few questions regarding only client side report

    1. Is it possible to fetch data page by page from viewer? As I go page by page viewer fetches new data from my api on new page? Is this possible and if not is there a similar way to get this behaviour? I have large data sets and loading all of them every time isn’t an good option for me, I would only need it on export.
    2. And if 1. is possible is there a way to dynamically set number of items on page? Or page size is dictated by content size? For example if I want to give user a option to have 10/50/100 items per page and if I go to another page it will fetch another x amount of items.

    If you need more info or better explanation I will be happy to explain. And if there is another solution to this I will be happy to listen.

    Thanks in advance!

  • Posted 20 November 2023, 8:00 pm EST

    Hi Danijel,

    Unfortunately, pagination is not supported with ActiveReportsJS. However, if your API supports parameter-based results then you can pass in the number of results you want from your API by using a parameter in your query.

    Regards,

    Anand

  • Posted 20 November 2023, 10:34 pm EST

    Hi, thanks for the help, if you can answer me this also

    1. Can I dynamically set query parameters to API, for example if I want to have a custom start/end date, some random parameters or sorting and can switch beetween them?

    2. If not is there a way to dynamically send parameters in report?

    Thank you in advance, if I need to explain in more detail I will

  • Posted 21 November 2023, 10:56 pm EST - Updated 21 November 2023, 11:01 pm EST

    Hi Danijel,

    Yes, you can pass your parameters dynamically to your report by assigning your parameters to the ‘ReportParameters’ property after which in the query you can add a ‘Query Parameter’ and bind it to your report parameter so that when the API call is made to your report it uses the parameter you passed into your report dynamically through code.

    To learn more about dynamically passing your parameter please refer to Report Viewer Component - Setting Parameter Values.

    You may also refer to the attached sample implementing the same.

    Regards,

    Anand

    RuntimeParameter.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels