XtraReport.ScriptReferences Property
Specifies the collection of file names (with full or relative paths) of the assemblies used by the scripts in a report.
Namespace: DevExpress.XtraReports.UI
Assembly: DevExpress.XtraReports.v24.2.dll
NuGet Package: DevExpress.Reporting.Core
Declaration
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.v24.2.Core
- DevExpress.Data.v24.2
- DevExpress.Office.v24.2.Core
- DevExpress.PivotGrid.v24.2.Core
- DevExpress.Printing.v24.2.Core
- DevExpress.RichEdit.v24.2.Core
- DevExpress.Sparkline.v24.2.Core
- DevExpress.XtraCharts.v24.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 an assembly that is in the same folder where the application executable is located, specify only the relative file name.
- To reference any other assembly, specify its full file path.
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";