Reporting

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

Namespace: Telerik.Reporting
Assembly: Telerik.Reporting (in Telerik.Reporting.dll)

Syntax

C#
public class XmlReportSource : ReportSource
Visual Basic
Public Class XmlReportSource _
	Inherits ReportSource

Examples

The following example shows how to create a XmlReportSource:
CopyC#
Telerik.Reporting.XmlReportSource 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"));
CopyVB.NET
Dim xmlReportSource As 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"))

Inheritance Hierarchy

System..::..Object
  Telerik.Reporting..::..ReportSource
    Telerik.Reporting..::..XmlReportSource

Version Information

Supported in: 1.0.1

See Also