Search Results for

    Show / Hide Table of Contents

    Class Config

    Contains some configuration properties and settings that will be applied to the FastReport.Net environment, including Report, Designer and Preview components.

    Inheritance
    System.Object
    Config
    Namespace: FastReport.Utils
    Assembly: FastReport.dll
    Syntax
    public static class Config

    Properties

    ApplicationFolder

    Gets or sets the application folder.

    Declaration
    public static string ApplicationFolder { get; set; }
    Property Value
    Type Description
    System.String

    CheckFontFamily

    Additional check FamilyName in function FastReport.Utils.FromString(Type type, string value); By default option is set to FALSE value and engine works in classic mode. If option is set to TRUE value, then engine checks family name of report's font and trying to find correct font within PrivateFontCollection.

    Declaration
    [Obsolete("This check is not used anymore. Use FontManager.AddSubstituteFont to substitute non-existing fonts.")]
    public static bool CheckFontFamily { get; set; }
    Property Value
    Type Description
    System.Boolean

    CompilerSettings

    Settings of report compiler.

    Declaration
    public static CompilerSettings CompilerSettings { get; set; }
    Property Value
    Type Description
    CompilerSettings

    EnableScriptSecurity

    Enable report script validation. For WebMode only

    Declaration
    public static bool EnableScriptSecurity { get; set; }
    Property Value
    Type Description
    System.Boolean

    Folder

    Gets or sets the path used to load/save the configuration file.

    Declaration
    public static string Folder { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    By default, the configuration file is saved to the application local data folder (C:\Documents and Settings\User_Name\Local Settings\Application Data\FastReport). Set this property to "" if you want to store the configuration file in the application folder.

    FontCollection

    Get access to font collection

    Declaration
    public static TrueTypeCollection FontCollection { get; }
    Property Value
    Type Description
    TrueTypeCollection

    FontListFolder

    Gets or sets the path used to font.list file.

    Declaration
    public static string FontListFolder { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    By default, the font.list file is saved to the FastReport.config folder If WebMode enabled (or config file path is null), then file is saved in the application folder.

    ForbidLocalData

    Gets or sets a value indicating is it impossible to specify a local data path in Xml and Csv.

    Declaration
    public static bool ForbidLocalData { get; set; }
    Property Value
    Type Description
    System.Boolean

    FullTrust

    Gets a value indicating that the ASP.NET hosting permission level is set to full trust.

    Declaration
    public static bool FullTrust { get; }
    Property Value
    Type Description
    System.Boolean

    IsStringOptimization

    Gets or sets the optimization of strings. Is experimental feature.

    Declaration
    public static bool IsStringOptimization { get; set; }
    Property Value
    Type Description
    System.Boolean

    PreparedCompressed

    Enable or disable the compression in files with prepared reports (fpx).

    Declaration
    public static bool PreparedCompressed { get; set; }
    Property Value
    Type Description
    System.Boolean

    PrivateFontCollection

    Gets a PrivateFontCollection instance.

    Declaration
    [Obsolete("Use FastReport.FontManager instead")]
    public static FRPrivateFontCollection PrivateFontCollection { get; }
    Property Value
    Type Description
    FRPrivateFontCollection

    ReportSettings

    Gets or sets the settings for the Report component.

    Declaration
    public static ReportSettings ReportSettings { get; set; }
    Property Value
    Type Description
    ReportSettings

    RightToLeft

    Gets or sets a value indicating whether RTL layout should be used.

    Declaration
    public static bool RightToLeft { get; set; }
    Property Value
    Type Description
    System.Boolean

    Root

    Gets the root item of config xml.

    Declaration
    public static XmlItem Root { get; }
    Property Value
    Type Description
    XmlItem

    ScriptSecurityProps

    Properties of report script validation

    Declaration
    public static Config.ScriptSecurityProperties ScriptSecurityProps { get; }
    Property Value
    Type Description
    Config.ScriptSecurityProperties

    SystemTempFolder

    Gets the path to the system temporary folder used to store temporary files.

    Declaration
    public static string SystemTempFolder { get; }
    Property Value
    Type Description
    System.String

    TempFolder

    Gets or sets the path to the temporary folder used to store temporary files.

    Declaration
    public static string TempFolder { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    The default value is null, so the system temp folder will be used.

    Version

    Gets FastReport version.

    Declaration
    public static string Version { get; }
    Property Value
    Type Description
    System.String

    WebMode

    Gets a value that determines whether to disable some functionality to run in web mode.

    Declaration
    public static bool WebMode { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    Use this property if you use FastReport in ASP.Net. Set this property to true before you access any FastReport.Net objects.

    Methods

    CompilerWarmup()

    Warms up the Roslyn compiler asynchronously.

    Declaration
    public static async void CompilerWarmup()
    Remarks

    Call this method at an application start to warm up the Roslyn compiler (used in NetCore).

    OnScriptCompile(ScriptSecurityEventArgs)

    Invokes ScriptCompile event.

    Declaration
    public static void OnScriptCompile(ScriptSecurityEventArgs e)
    Parameters
    Type Name Description
    ScriptSecurityEventArgs e

    Event args.

    Exceptions
    Type Condition
    CompilerException

    Events

    BeforeEmitCompile

    Declaration
    public static event EventHandler<CompilationEventArgs> BeforeEmitCompile
    Event Type
    Type Description
    System.EventHandler<FastReport.Code.CodeDom.Compiler.CompilationEventArgs>

    FilterConnectionTables

    Occurs when getting available table names from the connection.

    Declaration
    public static event Config.FilterConnectionTablesEventHandler FilterConnectionTables
    Event Type
    Type Description
    Config.FilterConnectionTablesEventHandler
    Remarks

    Use this handler to filter the list of tables returned by the connection object.

    Examples

    This example demonstrates how to hide the table with "Table 1" name from the Data Wizard.

    Config.FilterConnectionTables += FilterConnectionTables;
    
    private void FilterConnectionTables(object sender, FilterConnectionTablesEventArgs e)
    {
      if (e.TableName == "Table 1")
        e.Skip = true;
    }

    OnEnableScriptSecurityChanged

    Throws when property EnableScriptSecurity has been changed

    Declaration
    public static event EventHandler OnEnableScriptSecurityChanged
    Event Type
    Type Description
    System.EventHandler

    ScriptCompile

    Called on script compile

    Declaration
    public static event EventHandler<ScriptSecurityEventArgs> ScriptCompile
    Event Type
    Type Description
    System.EventHandler<ScriptSecurityEventArgs>
    Back to top © 1998-2025 Copyright Fast Reports Inc.