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
Hi,
The data source from which each Table gets its data is defined by its DataSourceName property. So if you have two different data sources defined, let’s say A and B, one table should be associated to data source A and the other to B. If that is the case, each expression “=Field.ProducName” would refer to the appropriate data source. Also each table will iterate over the associated DS.
Does your report have an associated data source?
Thanks,
Leo
The 2 datasources names are correct. As the 2 Datasouces has the "ProductName" field, in the 2 tables(in report designer) in each table the ProductName column's content is : " =Fields.ProductName ".
Maybe it should be " =Fields.DataSourceName.ProductName ", to differentiate which table the column belongs.
bye
thanks
Can you check that the DataSourceName property is correctly set for both of the tables? It sounds like you possibly have them set to the same Data Source which would cause them to render the same data.
Brent
Hi Leonardo
thanks for the answer as you helping me a lot.
I try to describe my problem(a but changed).
i create 2 datasouces for my report each is printed in table. In these datasouces there are about 5 or 6 field with same names (that i must print). Therefore in the 2 tables there are some field with same content ("=Fields.ProductName", etc,). But the ProductName in the first DataSource is different than the second.
But the data printed in the 2 table is same.
I can’t reproduce the problem you mention. If you have two independent data sources (each with 8 records) and you create one table for each data source. Both tables should be correctly rendered. Having fields with the same name should not be a problem.
Please tell me a bit more about the structure of the data and report you are trying to create, so i can try to reproduce the problem.