New to Telerik Reporting? Start a free 30-day trial

Represents a report source that contains the XML markup of a report document.

Definition

Namespace:Telerik.Reporting

Assembly:Telerik.Reporting.dll

Syntax:

C#
[AIAssistantExclude("")]
public class XmlReportSource : ReportSource

Inheritance: objectReportSourceXmlReportSource

Inherited Members ReportSource.Parameters

Example:

The following example shows how to create a XmlReportSource:

cs
var xmlReportSource = new Telerik.Reporting.XmlReportSource();

// Specifying the XML markup of the report
xmlReportSource.Xml = @"<?xml version='1.0' encoding='utf-8'?>
                        <Report Width='3in' Name='userReport1' xmlns='http://schemas.telerik.com/reporting/2012/2'>
                          <Items>
                            <DetailSection Height='1in' Name='detailSection1'>
                              <Items>
                                <TextBox Value='=Parameters.OrderNumber.Value' Size='2in, 0.4in' Location='0.5in, 0.3in' Name='textBox1' />
                              </Items>
                            </DetailSection>
                          </Items>
                          <PageSettings>
                            <PageSettings PaperKind='Letter' Landscape='False'>
                              <Margins>
                                <MarginsU Left='1in' Right='1in' Top='1in' Bottom='1in' />
                              </Margins>
                            </PageSettings>
                          </PageSettings>
                          <ReportParameters>
                            <ReportParameter Name='OrderNumber'>
                              <AvailableValues />
                            </ReportParameter>
                          </ReportParameters>
                        </Report>";

// Adding the initial parameter values
xmlReportSource.Parameters.Add(new Telerik.Reporting.Parameter("OrderNumber", "SO43659"));
vb
Dim xmlReportSource As New Telerik.Reporting.XmlReportSource()

' Specifying the XML markup of the report
xmlReportSource.Xml = "" &
                            "" &
                              "" &
                                "" &
                                  "" &
                                    "" &
                                  "" &
                                "" &
                              "" &
                              "" &
                                "" &
                                  "" &
                                    "" &
                                  "" &
                                "" &
                              "" &
                              "" &
                                "" &
                                  "" &
                                "" &
                              "" &
                            ""


' Adding the initial parameter values
xmlReportSource.Parameters.Add(New Telerik.Reporting.Parameter("OrderNumber", "SO43659")) 

Constructors

Initializes a new instance of the XmlReportSource class.

C#
public XmlReportSource()

Properties

Xml

string

Gets or sets the XML markup of a IReportDocument.

C#
public string Xml { get; set; }

This property can accept an expression when the report source is used in a SubReport item or a NavigateToReportAction.

Methods

Determines whether this instance and a specified object have the same value.

C#
public override bool Equals(object obj)
Parameters:objobject

The object to compare with this instance.

Returns:

bool

true if obj is an XmlReportSource and its value is the same as this instance; otherwise, false.

Overrides: ReportSource.Equals(object)

Returns the hash code for this XmlReportSource.

C#
public override int GetHashCode()
Returns:

int

A 32-bit signed integer hash code.

Overrides: ReportSource.GetHashCode()

Returns a string that represents the current XmlReportSource.

C#
public override string ToString()
Returns:

string

A string that represents the Xml of this XmlReportSource.

Overrides: ReportSource.ToString()