This is a migrated thread and some comments may be shown as answers.

Using Telerik Report Designer with XML Datasource

8 Answers 458 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Rishee
Top achievements
Rank 1
Rishee asked on 06 Jun 2013, 08:52 PM
Hello,

I have found lots of documentation on binding an XML datasource to a report when working in Visual Studio, but it is unclear how to use an XML datasource when using the standalone designer.  I believe I am supposed to use the Object Data Source type, but when I select this, there are no available data source types listed.

Thanks.

8 Answers, 1 is accepted

Sort by
0
Umadhav
Top achievements
Rank 1
answered on 07 Jun 2013, 01:46 AM
I have posted the same question yesterday. 
Need to make a decision if Telerik fits our needs. 

Thanks
Umadhav.
0
Peter
Telerik team
answered on 10 Jun 2013, 12:43 PM
Hi Rishee,

In Telerik Report Designer you can utilize ObjectDataSource components as elaborated in the Extending Report Designer help article.

Regards,
Peter
Telerik

Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

0
Jared
Top achievements
Rank 1
answered on 06 Aug 2013, 09:10 PM
Peter,

I'm afraid the Extending Report Designer topic you refer to in your answer doesn't help me.

Internally we use Crystal to design reports, and we have clients who also use it. We simply export an XML dataset (NOT strongly typed), connect to it from the Crystal designer, and design the report against it. Then, when the report is run from inside our application, our code on-the-fly supplies the Crystal template with the DataSet to use -- the same structure used to design the report -- and the report is generated.

We are looking to switch to Telerik, but I fail to see in your standalone report designer the ability to do this or anything like it. We need to be able to use an untyped XML dataset file (XSD is embedded) as the datasource in design mode using the standalone designer, and then at runtime associate a dataset with the same structure.

How is this done?

Here is example XML data set (wasn't able to attach):

<NewDataSet>
  <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
      <xs:complexType>
        <xs:choice minOccurs="0" maxOccurs="unbounded">
          <xs:element name="Performance">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="rundate" type="xs:dateTime" minOccurs="0" />
                <xs:element name="acct_num" type="xs:string" minOccurs="0" />
                <xs:element name="stdate" type="xs:dateTime" minOccurs="0" />
                <xs:element name="norder" type="xs:int" minOccurs="0" />
                <xs:element name="acname" type="xs:string" minOccurs="0" />
                <xs:element name="retm" type="xs:decimal" minOccurs="0" />
                <xs:element name="retm1" type="xs:decimal" minOccurs="0" />
                <xs:element name="retm2" type="xs:decimal" minOccurs="0" />
                <xs:element name="ret3m" type="xs:decimal" minOccurs="0" />
                <xs:element name="retytd" type="xs:decimal" minOccurs="0" />
                <xs:element name="reti" type="xs:decimal" minOccurs="0" />
                <xs:element name="retq0" type="xs:decimal" minOccurs="0" />
                <xs:element name="retq1" type="xs:decimal" minOccurs="0" />
                <xs:element name="retq2" type="xs:decimal" minOccurs="0" />
                <xs:element name="retq3" type="xs:decimal" minOccurs="0" />
                <xs:element name="ret1" type="xs:decimal" minOccurs="0" />
                <xs:element name="ret2" type="xs:decimal" minOccurs="0" />
                <xs:element name="ret3" type="xs:decimal" minOccurs="0" />
                <xs:element name="ret4" type="xs:decimal" minOccurs="0" />
                <xs:element name="ret5" type="xs:decimal" minOccurs="0" />
                <xs:element name="ret7" type="xs:decimal" minOccurs="0" />
                <xs:element name="ret10" type="xs:decimal" minOccurs="0" />
                <xs:element name="cy1" type="xs:decimal" minOccurs="0" />
                <xs:element name="cy2" type="xs:decimal" minOccurs="0" />
                <xs:element name="cy3" type="xs:decimal" minOccurs="0" />
                <xs:element name="cy4" type="xs:decimal" minOccurs="0" />
                <xs:element name="lcqtr1" type="xs:string" minOccurs="0" />
                <xs:element name="lcqtr2" type="xs:string" minOccurs="0" />
                <xs:element name="lcqtr3" type="xs:string" minOccurs="0" />
                <xs:element name="lcqtr4" type="xs:string" minOccurs="0" />
                <xs:element name="mtd" type="xs:decimal" minOccurs="0" />
                <xs:element name="ytd" type="xs:decimal" minOccurs="0" />
                <xs:element name="year1" type="xs:decimal" minOccurs="0" />
                <xs:element name="year3" type="xs:decimal" minOccurs="0" />
                <xs:element name="year5" type="xs:decimal" minOccurs="0" />
                <xs:element name="rolling1yr" type="xs:decimal" minOccurs="0" />
                <xs:element name="rolling2yr" type="xs:decimal" minOccurs="0" />
                <xs:element name="rolling3yr" type="xs:decimal" minOccurs="0" />
                <xs:element name="rolling5yr" type="xs:decimal" minOccurs="0" />
                <xs:element name="footnote" type="xs:string" minOccurs="0" />
              </xs:sequence>
            </xs:complexType>
          </xs:element>
          <xs:element name="PerfGraphData">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="label" type="xs:string" minOccurs="0" />
                <xs:element name="portfolio" type="xs:decimal" minOccurs="0" />
                <xs:element name="index" type="xs:decimal" minOccurs="0" />
                <xs:element name="pfoname" type="xs:string" minOccurs="0" />
                <xs:element name="idxname" type="xs:string" minOccurs="0" />
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:choice>
      </xs:complexType>
    </xs:element>
  </xs:schema>
  <Performance>
    <rundate>2010-10-31T00:00:00-06:00</rundate>
    <acct_num>SAMPLE</acct_num>
    <stdate>1995-10-01T00:00:00-06:00</stdate>
    <norder>60</norder>
    <acname>Sample Client Portfolio</acname>
    <retm>0.5900</retm>
    <retm1>0.1700</retm1>
    <retm2>1.3800</retm2>
    <ret3m>2.1600</ret3m>
    <retytd>9.2400</retytd>
    <reti>6.8500</reti>
    <retq0>2.8500</retq0>
    <retq1>3.9800</retq1>
    <retq2>1.5400</retq2>
    <retq3>1.0000</retq3>
    <ret1>9.5200</ret1>
    <ret2>13.5800</ret2>
    <ret3>7.4300</ret3>
    <ret4>7.1200</ret4>
    <ret5>6.8400</ret5>
    <ret7>6.2100</ret7>
    <ret10>6.9600</ret10>
    <cy1>12.8500</cy1>
    <cy2>-0.8000</cy2>
    <cy3>7.0500</cy3>
    <cy4>4.8900</cy4>
    <lcqtr1>Q3 10</lcqtr1>
    <lcqtr2>Q2 10</lcqtr2>
    <lcqtr3>Q1 10</lcqtr3>
    <lcqtr4>Q4 09</lcqtr4>
    <mtd>0.5900</mtd>
    <ytd>9.2400</ytd>
    <year1>9.5200</year1>
    <year3>7.4300</year3>
    <year5>6.8400</year5>
    <rolling1yr>9.5200</rolling1yr>
    <rolling2yr>13.5800</rolling2yr>
    <rolling3yr>7.4300</rolling3yr>
    <rolling5yr>6.8400</rolling5yr>
    <footnote />
  </Performance>
  <Performance>
    <rundate>2010-10-31T00:00:00-06:00</rundate>
    <acct_num>SAMPLE</acct_num>
    <stdate>2000-01-01T00:00:00-07:00</stdate>
    <norder>62</norder>
    <acname>Barclays Aggregate Bond Index</acname>
    <retm>0.3600</retm>
    <retm1>0.1100</retm1>
    <retm2>1.2900</retm2>
    <ret3m>1.7600</ret3m>
    <retytd>8.3300</retytd>
    <reti>6.4200</reti>
    <retq0>2.4800</retq0>
    <retq1>3.4900</retq1>
    <retq2>1.7800</retq2>
    <retq3>0.2000</retq3>
    <ret1>8.0100</ret1>
    <ret2>10.8600</ret2>
    <ret3>7.2300</ret3>
    <ret4>6.7600</ret4>
    <ret5>6.4500</ret5>
    <ret7>5.5400</ret7>
    <ret10>6.3800</ret10>
    <cy1>5.9300</cy1>
    <cy2>5.2400</cy2>
    <cy3>6.9700</cy3>
    <cy4>4.3300</cy4>
    <lcqtr1>Q3 10</lcqtr1>
    <lcqtr2>Q2 10</lcqtr2>
    <lcqtr3>Q1 10</lcqtr3>
    <lcqtr4>Q4 09</lcqtr4>
    <mtd>0.3600</mtd>
    <ytd>8.3300</ytd>
    <year1>8.0100</year1>
    <year3>7.2300</year3>
    <year5>6.4500</year5>
    <rolling1yr>8.0100</rolling1yr>
    <rolling2yr>10.8600</rolling2yr>
    <rolling3yr>7.2300</rolling3yr>
    <rolling5yr>6.4500</rolling5yr>
    <footnote />
  </Performance>
  <PerfGraphData>
    <label>MTD</label>
    <portfolio>0.5900</portfolio>
    <index>0.3600</index>
    <pfoname>Sample Client Portfolio</pfoname>
    <idxname>Barclays Aggregate Bond Index</idxname>
  </PerfGraphData>
  <PerfGraphData>
    <label>YTD</label>
    <portfolio>9.2400</portfolio>
    <index>8.3300</index>
    <pfoname>Sample Client Portfolio</pfoname>
    <idxname>Barclays Aggregate Bond Index</idxname>
  </PerfGraphData>
  <PerfGraphData>
    <label>ROLLING 3YR</label>
    <portfolio>7.4300</portfolio>
    <index>7.2300</index>
    <pfoname>Sample Client Portfolio</pfoname>
    <idxname>Barclays Aggregate Bond Index</idxname>
  </PerfGraphData>
  <PerfGraphData>
    <label>ROLLING 5YR</label>
    <portfolio>6.8400</portfolio>
    <index>6.4500</index>
    <pfoname>Sample Client Portfolio</pfoname>
    <idxname>Barclays Aggregate Bond Index</idxname>
  </PerfGraphData>
  <PerfGraphData>
    <label>INCEPTION TO DATE</label>
    <portfolio>6.8500</portfolio>
    <index>6.4200</index>
    <pfoname>Sample Client Portfolio</pfoname>
    <idxname>Barclays Aggregate Bond Index</idxname>
  </PerfGraphData>
</NewDataSet>
0
Stef
Telerik team
answered on 09 Aug 2013, 01:12 PM
Hello Jared,

In your support ticket on the same question you have verified that you have created a custom assembly where you load the XSD into a DataSet object and have successfully configured the Standalone Designer to use this assembly. For anyone concerned more details about the needed settings can be found in the following KB article: How to use external assemblies with custom CLR objects in the Report Designer.

Regards,
Stef
Telerik

Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.

0
Eugenio
Top achievements
Rank 1
answered on 28 Oct 2013, 03:33 PM
Hello !

I have a similar problem. I want to use a xml file as datasource. Devexpress has a possibility to add a xml as datasource, so you can add the tags to the report. Is there anything like this? I don't want to use visual studio to generate an Assembly. I want to put a xml file in the working directory and choose it directly as datasource. 
0
Stef
Telerik team
answered on 28 Oct 2013, 04:12 PM
Hi Eugenio,

It is in our plans to extend the collection of existing data sources and provide you with means to directly use XML, CSV, Excel files as data source for your reports. Meanwhile, you will have to read the XML into a DataSet or other custom business object in order to use it in a report.

Let us know if you have any further questions.

Regards,
Stef
Telerik

Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.

0
Eugenio
Top achievements
Rank 1
answered on 29 Oct 2013, 07:21 AM
Hello,

that sounds good. So I transformed my XML into a dataset with the visual studio xsd.exe. But how can I select this dataset for my objectdatasource. If I click on Datasource of my objectdatasource, there is nothing to select and I put the dataset in the working directory. Do I have to change the config file in any way, like with an assembly? The example http://www.telerik.com/help/reporting/object-data-source-how-to-bind-to-data-set.html shows only the way in code behind.
0
Stef
Telerik team
answered on 31 Oct 2013, 05:38 PM
Hi Eugenio,

Until we add the mentioned data source options, there is no direct way to access the XML from the Standalone Designer or use it with the Visual Studio Designer. You need to load the data into a DataSet object for instance, and use that custom object with ObjectDataSource component. When you use the Standalone Designer the code reading the XML should be placed in an external assembly, linked into the Standalone Designer configuration file as explained in the: Extending Report Designer help article.

For more details take a look at the How to use external assemblies with custom CLR objects in the Report Designer KB article.

Regards,
Stef
Telerik

Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.

Tags
Report Designer (standalone)
Asked by
Rishee
Top achievements
Rank 1
Answers by
Umadhav
Top achievements
Rank 1
Peter
Telerik team
Jared
Top achievements
Rank 1
Stef
Telerik team
Eugenio
Top achievements
Rank 1
Share this question
or