Skip to main content
A newer version of this page is available. .

XtraReport.ScriptReferences Property

Specifies the collection of file names (with full paths, or file names only if the assemblies are located in GAC) of the assemblies used by the scripts in a report.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v19.2.dll

NuGet Package: DevExpress.Reporting.Core

Declaration

[SRCategory(ReportStringId.CatBehavior)]
public string[] ScriptReferences { get; set; }

Property Value

Type Description
String[]

An array of String values, specifying the referenced assemblies.

Remarks

This property value should list all the assemblies whose namespaces are included in scripts via using (C#) or Imports (Visual Basic) directives.

The following assemblies are always accessible from report scripts and adding them to the ScriptReferences collection is not required.

  • Core assemblies that are referenced by any reporting application:

    • DevExpress.Charts.v19.2.Core
    • DevExpress.Data.v19.2
    • DevExpress.Office.v19.2.Core
    • DevExpress.PivotGrid.v19.2.Core
    • DevExpress.Printing.v19.2.Core
    • DevExpress.RichEdit.v19.2.Core
    • DevExpress.Sparkline.v19.2.Core
    • DevExpress.XtraCharts.v19.2
  • Several standard .NET framework assemblies that are always referenced by XtraReports:

    • Microsoft.CSharp.dll
    • System.dll
    • System.Data.dll
    • System.Xml.dll
    • System.Drawing.dll
    • System.Windows.Forms.dll
    • System.Core.dll
  • Other assemblies that are currently loaded into your application’s domain.

To enable other assemblies in report scripts, they should be listed in the XtraReport.ScriptReferences property (or its runtime counterpart - XtraReport.ScriptReferencesString).

  • To reference .NET framework assemblies in the ScriptReferences property, specify only their file name (a report will always locate them in the “C:\Windows\Microsoft.NET\Framework” directory).
  • To reference any other assembly, specify its file path (either full or relative) along with the file name.

To learn more, see Using Report Scripts.

Example

The following example demonstrates how to add references to external assemblies whose classes can be used in scripts. While at design time this can be done via the XtraReport.ScriptReferences property, at runtime the XtraReport.ScriptReferencesString property should be used.

XtraReport1 report = new XtraReport1();
report.ScriptReferencesString = "Dlls\\MyAssembly1.dll\r\nDlls\\MyAssembly2.dll";
See Also