Passing Parameters for React Viewer

Posted by: hfeldman on 8 January 2020, 11:18 am EST

  • Posted 8 January 2020, 11:18 am EST

    I'm trying to implement the viewer for my ReactJS front end. However, I'm completely unsure as to how parameters are meant to be passed in when creating the report? I've tried adding it through 'reportParams' similar to the pureJS demo but this clearly does not work.


    import React from 'react';
    import { Viewer } from '@grapecity/activereports-react';
    import { PdfExport, HtmlExport, XlsxExport, Core } from '@grapecity/activereports';
    import '@grapecity/activereports/styles/ar-js-viewer.css';

    class Portal extends React.Component {
    _viewer = Viewer;

    render() {
    const parameters = [
    { Name: 'TestParam', Value: ['Hello World']}
    return (
    <div className="demo-app" style={{ height: '1000px'}} >
    report={{ Uri: "Test_Report.rdlx-json", ReportParams: parameters}}
    sidebarVisible={true} toolbarVisible zoom='100%'
    export default Portal;
  • Marked as Answer

    Replied 14 January 2020, 4:54 pm EST

    Hello Harrison,

    Sorry, we missed this case. As I see, you have asked the same question in the following forum post and which has been answered already.

Need extra support?

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

Learn More

Forum Channels