# Setting parameter values

Learn how to set parameter values for a report before loading

## Content

Using [parameters](/activereportsjs/docs/v6.1/ReportAuthorGuide/Report-Parameters) is the recommended way to alter a report at runtime. End-users can specify parameter values in the [viewer sidebar](/activereportsjs/docs/v6.1/ReportAuthorGuide/Report-Viewer-Interface#parameters-panel). However, if you want to implement a custom parameters panel or use hidden parameters, an application should set parameter values at runtime.

The [open method](https://developer.mescius.com/activereportsjs/docs/DeveloperGuide/ActiveReportsJSViewer/LoadingReports/Parameters) of Report Viewer component accepts the second optional argument which is an object that can include the parameter values, for instance:

```js
viewer.open("products.rdlx-json", {
        ReportParams: [
            {
                Name: "CategoryId",
                Value: [1,2,3],
            },
        ],
    });  
```

The Value property of `ReportParams` items should be an array even if the parameter has a single value.

Visit the [Setting Parameter Values demo](/activereportsjs/demos/features/viewer-set-parameter-values/purejs) for the code samples for Angular, React, Vue and Pure JS applications.