Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1930
Question on multiple DataSource
posted

hi

i would like to ask a quetion.

I saw that in report we can set more than 1 datasource.What's the porpuse of this??

Also if i set 2 datasource how will the xaml be?? (as in xaml also set the entity name in reportviewer's datasource setting).


I created an invoice report for person and adress.(to print person and his address) I did that creating a view on db and groupping the rows.

If i want to load persons and address as separate and set them as data source without using view. Is it possible somehow ???

thanks

Parents
  • 3070
    posted

    Hi,

    Supporting multiple data sources allows you to combine several portions of data in the same report. For example in a DashBoard you can display several charts, each one based on a different data source. Currently each data source is independent from the others. You can’t combine them, i.e. you can’t simulate a join inside the report. Joins operations must be resolved at the data level. In order to do what you want with Persons and Address you will need to do a join, so you have to use a View or an SQL sentence.

    Being able to combine data sources inside the report is a v.Future feature.

    If you have several data sources in your report at the Xaml level you can specify one ig:DataSource for each Data Source. For example:

    <ig:XamReportViewer Name="xamReportViewer1">

        <ig:XamReportViewer.RenderSettings>

            <ig:ClientRenderSettings DefinitionUri="...">

                <ig:ClientRenderSettings.DataSources>

                    <ig:DataSource TargetDataSource="DS1" ItemsSource="{Binding DS1}" />

                    <ig:DataSource TargetDataSource="DS2" ItemsSource="{Binding DS2}" />

                </ig:ClientRenderSettings.DataSources>

            </ig:ClientRenderSettings>

        </ig:XamReportViewer.RenderSettings>

    </ig:XamReportViewer>

     

    Thanks,

    Leo

Reply Children