xtrareports-devexpress-dot-xtrareports-dot-ui-dot-xtrareport-ad0d8eb4.md
Gets or sets an XML/XSD file, containing a schema of a report’s data source.
Namespace : DevExpress.XtraReports.UI
Assembly : DevExpress.XtraReports.v25.2.dll
NuGet Package : DevExpress.Reporting.Core
[DefaultValue("")]
[SRCategory(ReportStringId.CatDesign)]
public string DataSourceSchema { get; set; }
<DefaultValue("")>
<SRCategory(ReportStringId.CatDesign)>
Public Property DataSourceSchema As String
| Type | Default | Description |
|---|---|---|
| String | String.Empty |
A String value.
|
This property is retained for backward compatibility and should no longer be used. See Bind a Report to a Data Source Schema for information on how to bind a report to an XSD file.
The following example demonstrates how to specify the data source schema at runtime.
using DevExpress.XtraReports.UI;
//...
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
XtraReport report = CreateReport();
ReportDesignTool designTool = new ReportDesignTool(report);
designTool.ShowRibbonDesignerDialog();
}
private XtraReport CreateReport()
{
XtraReport report = new XtraReport();
report.DataSourceSchema = "schema.xsd";
report.DataSource = new nWindDataSet();
return report;
}
}
Imports DevExpress.XtraReports.UI
'...
Partial Public Class Form1
Inherits Form
Public Sub New()
InitializeComponent()
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
Dim report As XtraReport = CreateReport()
Dim designTool As New ReportDesignTool(report)
designTool.ShowRibbonDesignerDialog()
End Sub
Private Function CreateReport() As XtraReport
Dim report As New XtraReport()
report.DataSourceSchema = "schema.xsd"
report.DataSource = New nWindDataSet()
Return report
End Function
End Class
See Also
Bind a Report to a Data Source Schema
Bind a Report to a List Object at Design Time and Supply Data at Runtime