ActiveReports 18 .NET Edition
DevOps / Customization / Configure ActiveReports
In This Topic
    Configure ActiveReports
    In This Topic

    The default location of the ActiveReports configuration file (ActiveReports.config) is the installer location: C:\Program Files (x86)\MESCIUS\ActiveReports 18. Otherwise, the file may be placed beside the application or the plugin assembly. See the Custom Tile Provider sample description as an example.

    You can control various settings from the configuration file, such as:   

    Note: For now, the WebDesigner and Js Viewer components have only limited support of the configuration file. It is planned to extend this support in future versions. Please check with our support for the details.

     

    Control Print Dialog Settings

    Set PrintDialogStyle key to the values shown below to change the default print dialog for the designer.

    ActiveReports.config file
    Copy Code
    <Configuration>
      <appSettings>             
                         
              <!-- For OS native print dialog -->
                    <add key="PrintDialogStyle" value="Standard"/>
                   
              <!-- For OS native print dialog shown in Windows XP style
                    <add key="PrintDialogStyle" value="XpStyle"/>
    
                   For Print dialog with advanced printing settings, used by default 
                    <add key="PrintDialogStyle" value="Advanced"/> --> 
      </appSettings>
    </Configuration>
    

    Enable Classic Charts

    Set EnableChartClassic key to the value 'true' to enable the classic chart in the designer.

    ActiveReports.config file
    Copy Code
    <Configuration>
      <appSettings>
        <add key="EnableChartClassic" value="true"/>
      </appSettings>
    </Configuration>
    

    See the Classic Chart topic.

    Disable New Charts in Page/RDLX Reports

    Set the EnableChart key to the value 'false' to disable the classic chart in the designer.

    ActiveReports.config file
    Copy Code
    <Configuration>
      <appSettings>
        <add key="EnableChart" value="false"/>
      </appSettings>
    </Configuration>
    

    See the Chart topic.

    Enable Report Library

    Set the ShowReportsLibrary key to the value 'true' to show the Library panel in the designer.

    ActiveReports.config file
    Copy Code
    <Configuration>
       <appSettings>
         <add key="ShowReportsLibrary" value="true"/>
       </appSettings>
     </Configuration>
    

    Control the directory for Report Parts

    Set the ReportPartsDirectory key to some folder path to specify the reports folder for the designer. This is valid only if Report Library is enabled.

    ActiveReports.config file
    Copy Code
    <Configuration>
      <appSettings>
        <add key="ReportPartsDirectory" value="path to folder"/>
      </appSettings>
    </Configuration>
    

    Enable the OleObject Control

    Set the EnableOleObject key to the value 'true' to enable OLEObject control in Visual Studio Designer for Section report.

    ActiveReports.config file
    Copy Code
    <Configuration>
      <appSettings>
        <add key="EnableOleObject" value="true"/>
      </appSettings>
    </Configuration>
    

    Enable Matrix Control

    Set the EnableMatrix key to the value 'true' to enable the Matrix control in the designer.

    ActiveReports.config file
    Copy Code
    <Configuration>
      <appSettings>
        <add key="EnableMatrix" value="true"/>
      </appSettings>
    </Configuration>
    

    Specify Line Breaking Algorithm

    Set the LineBreakingAlgorithm key to 'Legacy' to enable legacy mode for wrapping lines when preparing text with numerical values for display. By default, 'Unicode' line breaking algorithm is used.

    ActiveReports.config file
    Copy Code
    <Configuration>
        <appSettings>
            <add key="LineBreakingAlgorithm" value="Legacy"/>
        </appSettings>
    </Configuration>
    

    Custom Report Items

    Page and RDLX reports allow extending the functionality of existing controls in the ActiveReports Designer. The config file should be similar to the following.

    ActiveReports.config file
    Copy Code
    <?xml version="1.0" encoding="utf-8" ?>
    <Configuration>
        <Extensions>
            <ReportItems>
                <ReportItem Name="RadarChart" Type="GrapeCity.ActiveReports.Samples.Radar.RadarChart, RadarChart" />
            </ReportItems>
            <ReportItemDesigner>
                <ReportItem Name="RadarChart" Type="GrapeCity.ActiveReports.Samples.Radar.RadarDesigner, RadarDesigner" BitmapResource="GrapeCity.ActiveReports.Samples.Radar.RadarIcon.png" />
            </ReportItemDesigner>
        </Extensions>
    </Configuration>
    

    See the Custom Chart sample.

    Specify Custom Fonts

    In the ActiveReports.config file, you can also specify custom fonts to be used in Page, RDLX, and Section reports (in the CrossPlatform compatibility mode) as in the following example.

    Note: Custom font settings have higher priority over default font settings.
    ActiveReports.config file
    Copy Code
    <Configuration>
        <Extensions>
            <FontFactory>
                 <AddFolder Path="%WINDIR%/Fonts" Recurse="true" />
                 <AddFolder Path="%USERPROFILE%/AppData/Local/Microsoft/Windows/Fonts" Recurse="true" />
                 <Substitute Font="Arabic Transparent" To="Arial" />
                 <Substitute Font="Coutier" To="Coutier New" />
                 <Substitute Font="Helv" To="Arial" />
                 <Substitute Font="Helvetica" To="Arial" />
                 <Substitute Font="MS Sans Serif" To="Microsoft Sans Serif" />
                 <Substitute Font="MS Serif" To="Times New Roman" />
                 <Substitute Font="Times" To="Times New Roman" />
                 <Substitute Font="Tms Rmn" To="Times New Roman" />
                 <SetFallbackFont Font="Microsoft Sans Serif" />
                 <SetFallbackFont Font="MS UI Gothic" />
                 <SetFallbackFont Font="Arial" />
                 <AddFontLink Font="Lucida Sans Unicode" List="MS UI Gothic,PMingLiU,SimSun,Gulim,Yu Gothic UI,Microsoft JhengHei UI,Microsoft YaHei UI,Malgun Gothic" />
                 <AddFontLink Font="Microsoft Sans Serif" List="MS UI Gothic,Yu Gothic UI,PMingLiU,SimSun,Gulim,Microsoft JhengHei UI,Microsoft YaHei UI,Malgun Gothic" />
                 <AddFontLink Font="Tahoma" List="MS UI Gothic,PMingLiU,SimSun,Gulim,Yu Gothic UI,Microsoft JhengHei UI,Microsoft YaHei UI,Malgun Gothic" />
                 <AddFontLink Font="Segoe UI" List="Tahoma,Meiryo UI,MS UI Gothic,Microsoft JhengHei UI,Microsoft YaHei UI,Malgun Gothic,PMingLiU,SimSun,Gulim,Yu Gothic UI" />
                 <AddFontLink Font="Ebrima" List="Segoe UI,Meiryo UI,Microsoft JhengHei UI,Microsoft YaHei UI,Malgun Gothic,Yu Gothic UI" />
                 <AddFontLink Font="Gadugi" List="Segoe UI,Meiryo UI,Microsoft JhengHei UI,Microsoft YaHei UI,Malgun Gothic,Yu Gothic UI" />
                 <AddFontLink Font="Khmer UI" List="Segoe UI,Meiryo UI,Microsoft JhengHei UI,Microsoft YaHei UI,Malgun Gothic,Yu Gothic UI" />
                 <AddFontLink Font="Lao UI" List="Segoe UI,Meiryo UI,Microsoft JhengHei UI,Microsoft YaHei UI,Malgun Gothic,Yu Gothic UI" />
                 <AddFontLink Font="Leelawadee" List="Segoe UI,Meiryo UI,Microsoft JhengHei UI,Microsoft YaHei UI,Malgun Gothic,Yu Gothic UI" />
                 <AddFontLink Font="Leelawadee UI" List="Segoe UI,Meiryo UI,Microsoft JhengHei UI,Microsoft YaHei UI,Malgun Gothic,Yu Gothic UI" />
                 <AddFontLink Font="Nirmala UI" List="Segoe UI,Meiryo UI,Microsoft JhengHei UI,Microsoft YaHei UI,Malgun Gothic,Yu Gothic UI" />
                 <AddFontLink Font="MingLiU" List="Microsoft Sans Serif,SimSun,MS Mincho,BatangChe,Microsoft JhengHei UI,Microsoft YaHei UI,Yu Gothic UI,Malgun Gothic" />
                 <AddFontLink Font="PMingLiU" List="Microsoft Sans Serif,SimSun,MS PMincho,Batang,Microsoft JhengHei UI,Microsoft YaHei UI,Yu Gothic UI,Malgun Gothic" />
                 <AddFontLink Font="Microsoft JhengHei" List="Segoe UI,MingLiU,Microsoft YaHei,Meiryo,Malgun Gothic,Yu Gothic UI" />
                 <AddFontLink Font="Microsoft JhengHei UI" List="Segoe UI,MingLiU,Microsoft YaHei UI,Meiryo UI,Malgun Gothic,Yu Gothic UI" />
                 <AddFontLink Font="SimSun" List="Microsoft Sans Serif,PMingLiU,MS PMincho,Batang,Microsoft YaHei UI,Microsoft JhengHei UI,Yu Gothic UI,Malgun Gothic" />
                 <AddFontLink Font="NSimSun" List="PMingLiU,MS Mincho,BatangChe,Microsoft YaHei UI,Microsoft JhengHei UI,Yu Gothic UI,Malgun Gothic" />
                 <AddFontLink Font="Microsoft YaHei" List="Segoe UI,Segoe UI,SimSun,Microsoft JhengHei,Meiryo,Malgun Gothic,Yu Gothic UI" />
                 <AddFontLink Font="Microsoft YaHei UI" List="Segoe UI,SimSun,Microsoft Jhenghei UI,Meiryo UI,Malgun Gothic,Yu Gothic UI" />
                 <AddFontLink Font="Yu Gothic UI" List="Segoe UI,Microsoft JhengHei,Microsoft YaHei,Malgun Gothic" />
                 <AddFontLink Font="Meiryo" List="Segoe UI,Yu Gothic UI,MS UI Gothic,Microsoft Jhenghei,Microsoft YaHei,Malgun Gothic" />
                 <AddFontLink Font="Meiryo UI" List="Segoe UI,Yu Gothic UI,MS UI Gothic,Microsoft Jhenghei UI,Microsoft YaHei UI,Malgun Gothic" />
                 <AddFontLink Font="MS Gothic" List="MingLiU,SimSun,GulimChe,Yu Gothic UI,Microsoft JhengHei UI,Microsoft YaHei UI,Malgun Gothic" />
                 <AddFontLink Font="MS PGothic" List="PMingLiU,SimSun,Gulim,Yu Gothic UI,Microsoft JhengHei UI,Microsoft YaHei UI,Malgun Gothic" />
                 <AddFontLink Font="MS UI Gothic" List="Microsoft Sans Serif,PMingLiU,SimSun,Gulim,Yu Gothic UI,Microsoft JhengHei UI,Microsoft YaHei UI,Malgun Gothic" />
                 <AddFontLink Font="MS Mincho" List="MingLiU,SimSun,Batang,Yu Gothic UI,Microsoft JhengHei UI,Microsoft YaHei UI,Malgun Gothic" />
                 <AddFontLink Font="MS PMincho" List="PMingLiU,SimSun,Batang,Yu Gothic UI,Microsoft JhengHei UI,Microsoft YaHei UI,Malgun Gothic" />
                 <AddFontLink Font="Batang" List="MS PMincho,PMingLiU,SimSun,Malgun Gothic,Yu Gothic UI,Microsoft JhengHei UI,Microsoft YaHei UI" />
                 <AddFontLink Font="BatangChe" List="MS Mincho,MingLiU,SimSun,Malgun Gothic,Yu Gothic UI,Microsoft JhengHei UI,Microsoft YaHei UI" />
                 <AddFontLink Font="Dotum" List="MS UI Gothic,PMingLiU,SimSun,Malgun Gothic,Yu Gothic UI,Microsoft JhengHei UI,Microsoft YaHei UI" />
                 <AddFontLink Font="DotumChe" List="MS Gothic,MingLiU,SimSun,Malgun Gothic,Yu Gothic UI,Microsoft JhengHei UI,Microsoft YaHei UI" />
                 <AddFontLink Font="Gulim" List="Microsoft Sans Serif,MS UI Gothic,PMingLiU,SimSun,Malgun Gothic,Yu Gothic UI,Microsoft JhengHei UI,Microsoft YaHei UI" />
                 <AddFontLink Font="GulimChe" List="MS Gothic,MingLiU,SimSun,Malgun Gothic,Yu Gothic UI,Microsoft JhengHei UI,Microsoft YaHei UI" />
                 <AddFontLink Font="Gungsuh" List="MS PMincho,PMingLiU,SimSun,Malgun Gothic,Yu Gothic UI,Microsoft JhengHei UI,Microsoft YaHei UI" />
                 <AddFontLink Font="GungsuhChe" List="MS Mincho,MingLiU,SimSun,Malgun Gothic,Yu Gothic UI,Microsoft JhengHei UI,Microsoft YaHei UI" />
                 <AddFontLink Font="Malgun Gothic" List="Segoe UI,Gulim,Meiryo UI,Microsoft Jhenghei UI,Microsoft YaHei UI,Yu Gothic UI" />
                 <DefaultEudcFont File="EUDC.tte" />
                 <AddEudcFont Font="MS UI Gothic" File="myEUDC1.tte" />
                 <AddEudcFont Font="Meiryo" File="myEUDC2.tte" />
             </FontFactory>
        </Extensions>
    </Configuration>
    

     

    ActiveReports provides a powerful Font Resolver feature for all report types. It allows running ActiveReports on any environment without fonts (like Red Hat OpenShift) and obtain WYSIWYG output on different environments. See the topic Custom Font Resolver and the sample FontResolver for the details on the implementation.

    See PDF Font Settings for Section report in GDI topic for information on default and custom font settings required in PDF in the Medium trust environment.

    Map Report Item and Map Tile Providers

    The Map report item allows configuring built-in tile providers and extensions with custom report items. External providers in general have limited support to the resources. They require something like an external key to access without limits. ActiveReports allows configuring the following keys:

     See the example below.

    ActiveReports.config file
    Copy Code
    <?xml version="1.0" encoding="utf-8" ?>
    <Configuration>
        <Extensions>
            <MapTileProviders>
                <MapTileProvider Name="MapQuest" DisplayName="MapQuest Tiles">
                    <Settings>
                        <add key="ApiKey" value="Fmjtd%7Cluur21ua2l%2C2x%3Do5-90t5h6" />
                        <add key="Timeout" value="5000" />
                    </Settings>
                </MapTileProvider>
                <MapTileProvider Name="Google" DisplayName="Google Tiles">
                    <Settings>
                        <add key="ApiKey" value="AIzaSyBdJ88HN7LTGkHHK5whfaVv8a5ozlx2E_k" />
                        <add key="Timeout" value="5000" />
                    </Settings>
                </MapTileProvider>
                <MapTileProvider Name="Bing" DisplayName="Bing Tiles" >
                    <Settings>
                        <add key="ApiKey" value="Al3SxHf0LOva-5GI5fOajO0LCuKjYKLarjWQFcdGiKfaJNRrE6SBbH9o3-HJDOX7" />
                        <add key="Timeout" value="5000" />
                    </Settings>
                </MapTileProvider>
            </MapTileProviders>
        </Extensions>
    </Configuration>
    

    Custom Map Tile Providers

    You can implement your own tile provider and register it in ActiveReports.

    ActiveReports.config file
    Copy Code
    <?xml version="1.0" encoding="utf-8" ?>
    <Configuration>
        <Extensions>
            <MapTileProviders>
                <MapTileProvider Name="MapQuest-Sample" DisplayName="MapQuest-Sample" Type="GrapeCity.ActiveReports.Samples.CustomTileProviders.MapQuestTileProvider, CustomTileProviders, Version=1.0.0.0">
                    <Settings>
                        <add key="ApiKey" value="Fmjtd%7Cluur21ua2l%2C2x%3Do5-90t5h6" />
                        <add key="Timeout" value="3000" />
                    </Settings>
                </MapTileProvider>
            </MapTileProviders>
        </Extensions>
    </Configuration>
    

    See the Custom Tile Provider sample.

    Custom Data Providers

    You can configure custom data providers by adding just a few lines in the configuration file.

    SQLite Provider

    The following example shows configuring SQLite data provider:

    ActiveReports.config file
    Copy Code
    <?xml version="1.0" encoding="utf-8" ?>
    <Configuration>
        <Extensions>
            <Data>
                <Extension Name="SQLITE" Type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" DisplayName="SQLite Provider" />
            </Data>
        </Extensions>
    </Configuration>
    
    Note: System.Data.SQLite or System.Data.SQLite.Core NuGet package must be installed to be able to use Sqlite data.

    CSV Provider

    If you require custom UI, use CommandTextEditorType key as shown. The following example shows configuring a custom CSV data provider:

    ActiveReports.config file
    Copy Code
    <?xml version="1.0" encoding="utf-8" ?>
    <Configuration>
        <Extensions>
            <Data>
                <Extension Name="CustomCSV"
                 DisplayName="CSV Data Provider"
                 Type="GrapeCity.ActiveReports.Samples.CustomDataProvider.CSVDataProvider.CsvDataProviderFactory,CustomDataProvider, version=0.0.0.0, Culture=neutral"
                 CommandTextEditorType="GrapeCity.ActiveReports.Samples.CustomDataProviderUI.QueryEditor,CustomDataProviderUI, Version=1.0.0.0, Culture=neutral"
                />
            </Data>
        </Extensions>
    </Configuration>
    

     

    Custom Data Providers with ADO.NET

    To bind reports to ADO.NET Providers like SQLite, Oracle, and PostgreSQL, you need to add the following lines in configuration file.

    MS SQLite Provider

    The following example shows configuring SQLite data provider:

    ActiveReports.config file
    Copy Code
    <?xml version="1.0" encoding="utf-8" ?>
    <Configuration>
        <Extensions>
            <Data>
                <Extension Name="MSSQLITE" Type="Microsoft.Data.Sqlite.SqliteFactory, Microsoft.Data.Sqlite” DisplayName="MS SQLite Provider" />
            </Data>
        </Extensions>
    </Configuration>
    

    Note: Following NuGet packages must be installed to be able to use MS SQLite data:

    After updating the configuration file like above, you can easily use SQLite through UI in the designer. 

    Note: The WebDesigner component requires some extra steps to specify the data providers on client-side. See the WebDesigner Custom Data Providers sample for details.

    Oracle Provider

    The following example shows configuring Oracle data provider:

    ActiveReports.config file
    Copy Code
    <?xml version="1.0" encoding="utf-8" ?>
    <Configuration>
        <Extensions>
            <Data>
                <Extension Name="ORACLE" Type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess" DisplayName="Oracle Provider" />
            </Data>
        </Extensions>
    </Configuration>
    
    Note: Oracle.ManagedDataAccess or Oracle.ManagedDataAccess.Core NuGet package must be installed to be able to use Oracle data.

    See the Oracle Data Provider sample for details.

    PostgreSQL Provider

    The following example shows configuring PostgreSQL data provider:

    ActiveReports.config file
    Copy Code
    <?xml version="1.0" encoding="utf-8" ?>
    <Configuration>
        <Extensions>
            <Data>
                <Extension Name="POSTGRESQL" Type="Npgsql.NpgsqlFactory, Npgsql" DisplayName="PostgreSQL Provider" />
            </Data>
        </Extensions>
    </Configuration>
    
    Note: Npgsql (last for .NET 4) or Npgsql NuGet package must be installed to be able to use PostgreSQL data.

    Prevent Report Crashing

    You can disable the report validation in WinViewer and End User Designer, which is performed to prevent report crashing. By default, the report validation is enabled.

    ActiveReports.config file
    Copy Code
    <add key="SkipReportValidation" value="true"/>
    

    To disable the report validation in WebViewer, the configuration file has to be specified in the settings in UseReportViewer method.

    ActiveReports.config file
    Copy Code
    app.UseReportViewer(settings =>
    {
    //...
    settings.UseConfig("C:\\Program Files (x86)\\MESCIUS\\ActiveReports 18\\ActiveReports.config");
    });