Using Parameter in JSViewer

Posted by: duonghb53 on 28 March 2021, 6:46 pm EST

  • Posted 28 March 2021, 6:46 pm EST

    Dear Support Team
    I have an issues.
    I want Parameter when select input from html form idYear but I can't set parameter to JSViewer.
    I read JSViewer API but it has too little information:

    What do I need to do?
    Please help me.
    Thank a lot.

    export class ReportViewerComponent {
    private viewer: any;
    private prms: any;

    @Input() idYear;

    @Input() set reportId(reportId: string) {
    if (!this.viewer) {
    this.viewer = GrapeCity.ActiveReports.JSViewer.create({
    element: '#viewerPlaceHolder',
    //reportID: reportId,
    reportParameters: [{ name: 'testPrms', values: ['4'] }]

    //console.log("ReportViewerComponent:" + this.idYear);
  • Replied 31 March 2021, 2:47 pm EST


    You can pass the parameter value directly through the reportParameter API as follow:
    reportParameters: [{ name: 'ParameterName', values: [VariableName] }]

    If issue still reproducible, then you can share the stripped down sample so that I can able to replicate the issue.

Need extra support?

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

Learn More

Forum Channels