RunTime parameter access in angular using activereportsjs

Posted by: anjinera on 28 March 2023, 12:28 am EST

  • Posted 28 March 2023, 12:28 am EST - Updated 28 March 2023, 12:33 am EST

    hello I am trying to do drillthrough report as a part of active reports evaluation in activereportsjs using angular i have used reource locator by using the demo from the shared link https://www.grapecity.com/activereportsjs/docs/DeveloperGuide/ActiveReportsJSViewer/LoadingReports/ResourceLocator

    sample code:

    this.reportViewer.open(“MainReport”, {

    ResourceLocator: {

    getResource: async (resourceId: string) => {

    this.reportViewer.reportLoaded.subscribe(function () {

    console.log(report.parameters);

    });

    var report;

    var parameters;

    var Report;

    switch (resourceId) {

    case “MainReport”:

    return mainReport;

    case “Drillthroughreport.rdlx-json”:

    return drillthroughReport;

    case “DrillDown3.rdlx-json”:

    return drillthroughReport2;

    case “Theme”: return fetch(“assets/themes/light-theme.rdlx-json-theme”).then(response => response.json());

    }

    },

    },

    });

    }

    i was not able to find RDLReportDefinition mentioned in the documentation so i declared module in this way,

    declare module ‘*.rdlx-json’ {

    import { Rdl } from ‘@grapecity/activereports/core’;

    const report: Rdl.Report;

    export default report;

    }

    Issues:

    im able to load the reports but i dont want to use filters to implement drillthrough report i want to get the parameter that i need to send to the second report and capture the parameter into the code and do api call and register the data.

    In order to do this i need to get the parameter value that i need to send to second report but im not able to get it.

    i went through the grapecity forum https://www.grapecity.com/forums/activereportsjs/runtime-parameter-access

    but i was not able to acheive it because by using reportloaded event i was able to get only initial parameters but in my case i dont dont need the initial parameters because i only need parameters values in second and third report how can i acheive this?

    Help is greately apprecieated

    regards,

    RamKumar.

Need extra support?

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

Learn More

Forum Channels