Monday, March 26, 2012

Matrix with two datasource

Hi,
Could we a Matrix in report with moe than on datasource?
I want to show the sales amount for this week and previous week in a Matrix.
I use one datasource to retrive this week's data, and the other datasource
to retrive previous week's data. How cound I show these two data in a
matrix?On Nov 22, 2:45 pm, "ad" <fly...@.wfes.tcc.edu.tw> wrote:
> Hi,
> Could we a Matrix in report with moe than on datasource?
> I want to show the sales amount for this week and previous week in a Matrix.
> I use one datasource to retrive this week's data, and the other datasource
> to retrive previous week's data. How cound I show these two data in a
> matrix?
There are a couple of limited options here. The most flexible is to
use multiple datasources at the stored procedure/query level (that is
sourcing the matrix control). If you need to access different
databases or SQL Server Instances, this should be fairly straight
forward. For SQL Server Instances, you will want to create a linked
server. The other option, though limited, is to reference a second
report dataset via an aggregate (which does not seem to fit your needs
in this case). For this option, you would need to access a second
dataset via an aggregate expression. Something like this would work
for the second one (if it were an option):
=Sum(Fields!SomeFieldName.Value, "dsSecondDataset")
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant

No comments:

Post a Comment