# Configure ActiveReports Using Code

Learn how ActiveReports can be configured in Startup.cs.

## Content



The configuration for the viewer and the designer can be set at runtime by using [UseConfig(IConfigurationProvider)](/activereportsnet/api/v19.2/MESCIUS.ActiveReports.Web.Viewer/GrapeCity.ActiveReports.Aspnetcore.Viewer.ReportingSettings.html) method in the Startup.cs file.

```csharp
app.UseReportViewer(settings =>
 {
     settings.UseFileStore(ReportsDirectory);
     settings.UseConfig(new ConfigurationProvider(Path.Combine(CurrentDir, "ActiveReports.config")));
 });
```

## See Also

#### DevOps

[Configure ActiveReports using Config File](/activereportsnet/docs/v19.2/devops/customization/configure-ar)
