Populate reports when adding subreport

Posted by: cibarra on 4 September 2024, 1:44 pm EST

    • Post Options:
    • Link

    Posted 4 September 2024, 1:44 pm EST

    Hi,

    I’m exploring the subreport feature of the ActiveReportsJS Editor and I noticed that there is a dropdown component when setting up the configuration of a subreport element (when filling the input of the Report Name that acts as the identifier of the report that the getResource method of the ResourceLocator object uses to fetch).

    Is that dropdown input supposed to show options to choose the report to use as subreport? and if so, how can I populate that dropdown?, my implementation only shows the dropdown empty and I need to writhe manually the identifier that I defined for my getResource method overwrite.

    Does anyone know about this?

  • Posted 5 September 2024, 3:11 am EST - Updated 5 September 2024, 3:16 am EST

    Hi Cesar,

    >> Is that dropdown input supposed to show options to choose the report to use as subreport? and if so, how can I populate that dropdown?

    Yes, the dropdown shows the available ‘.rdlx-json’ reports present in the same directory as the report you have opened or in a subfolder that contains ‘.rdlx-json’ reports.

    Please find attached a sample for the same, try opening the MainReport and then Select the SubReport and check the Drop Down that shows available reports to choose from.

    Regards,

    Anand

    SubReports.zip

  • Posted 5 September 2024, 4:47 pm EST

    Hi,

    Thank you for answering to my question, but what I was referring is how to populate the option that appear in that dropdown list. I couldn’t find anything on the docs but I manage to found in the API that exists a getReportList that does exactly what I need, I only had to overwrite the getReportsList function and provide it to a call of the setResourceProvider method of the Designer instance.

    Thanks again.

Need extra support?

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

Learn More

Forum Channels