Back to Devexpress

XtraReport.ScriptLanguage Property

xtrareports-devexpress-dot-xtrareports-dot-ui-dot-xtrareport-4371def6.md

latest4.0 KB
Original Source

XtraReport.ScriptLanguage Property

Gets or sets the scripting language of all the scripts used in this XtraReport object.

Namespace : DevExpress.XtraReports.UI

Assembly : DevExpress.XtraReports.v25.2.dll

NuGet Package : DevExpress.Reporting.Core

Declaration

csharp
[DefaultValue(ScriptLanguage.CSharp)]
[SRCategory(ReportStringId.CatBehavior)]
public ScriptLanguage ScriptLanguage { get; set; }
vb
<SRCategory(ReportStringId.CatBehavior)>
<DefaultValue(ScriptLanguage.CSharp)>
Public Property ScriptLanguage As ScriptLanguage

Property Value

TypeDefaultDescription
ScriptLanguageCSharp

One of the ScriptLanguage enumeration’s values specifying the language of the scripts used in the report.

|

Available values:

NameDescription
CSharp

The C# programming language will be used in the current report’s scripts.

| | VisualBasic |

The Visual Basic .NET programming language will be used in the current report’s scripts.

| | JScript |

The Java Script programming language will be used in the current report’s scripts.

|

Remarks

Note : All the scripts used in a report should be written in the same language specified by the ScriptLanguage property.

To learn more about using scripts in XtraReports, see the Using Report Scripts topic.

Note

You can set the ScriptLanguage property globally, so that all the newly created reports have this property set to the required value. For this purpose, use the Report Designer Options dialog available within the XtraReports menu.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ScriptLanguage property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-reporting-create-a-custom-script-editor-designer/CS/Program.cs#L17

csharp
report.ScriptsSource = "// write code here\r\n";
report.ScriptLanguage = DevExpress.XtraReports.ScriptLanguage.CSharp;
using(report)

winforms-reporting-create-a-custom-script-editor-designer/VB/Program.vb#L17

vb
report.ScriptsSource = "// write code here" & vbCrLf
report.ScriptLanguage = DevExpress.XtraReports.ScriptLanguage.CSharp
Using report

See Also

Use Report Scripts

XtraReport Class

XtraReport Members

DevExpress.XtraReports.UI Namespace