Two Matrices placed inside tablix

Hi,

We have a report in which we have placed two matrices side by side so on viewing it will not be seemed to be two different matrix but comes out of same matrix. We have this two matrices, because the data are completely different from different sources. 

Now, when we tried to place a title in the middle of two matrices, we failed. As the two matrices dynamically grow in column wise, the title place inside a text box is not growing dynamically as such. 

I tried to put in those two matrices inside a tablix inside two column cells, and merged the row above in order to have the title too will be placed in the middle in any scenario. But, placing the two matrices inside the same tablix is really challenging as i see many errors appears related to 'defining the field name within the dataset scope' 

Can you please say me if this is possible to have two matrices to be placed inside same tablix in adjacent cells? - Than

February 5th, 2015 5:11am

its possible

just map the table to a dummy dataset. Add a dummy grouping inside the tablix and then add matrices inside it which will have same scope as per the grouping.

Free Windows Admin Tool Kit Click here and download it now
February 5th, 2015 5:52am

its possible

just map the table to a dummy dataset. Add a dummy grouping inside the tablix and then add matrices inside it which will have same scope as per the gro

February 5th, 2015 6:08am

Yes

You need to add them in data row

For detailed explanation I need to understand what you're exact requirement

So give some sample data from tables (datasets) by posting create/insert statements and explain how you want data to come in two matrices with title.

Free Windows Admin Tool Kit Click here and download it now
February 5th, 2015 2:29pm


So give some sample data from tables (datasets) by posting create/insert statements and explain how you want data to come in two matrices with title.



Hi Visakh!

Fine, will give you an example just for the sake to understand how to get the soln work for this case. Hope you might have the DB 'AdventureWorks2012'. using that I have tried creating a report with a similar need for sharing the title across both matrices. 

I will paste here the queries i used for datasets:

-- TT6
Select IsNull(SalesPersonID,' ') SalesPersonID, Count(SalesOrderID) TotalCount, Month(OrderDate) OrderMonth
from [Sales].[SalesOrderHeader] 
Where Month(OrderDate) in (@Month)
and TerritoryID = 6
Group by SalesPersonID, Month(OrderDate)
Order by 3

--TT5
Select IsNull(SalesPersonID,' ') SalesPersonID, Count(SalesOrderID) TotalCount, Month(OrderDate) OrderMonth
from [Sales].[SalesOrderHeader] 
Where Month(OrderDate) in (@Month)
and TerritoryID = 5
Group by SalesPersonID, Month(OrderDate)
Order by 3

--Month
Select Distinct Month(OrderDate) from [Sales].[SalesOrderHeader] order by 1

Now, PFA the below screen shot of the report created out of the above dataset queries,

1. the blue & green highighted are two different matrices for which we need to have the report title to be centre aligned.

2. please see the below screen shot where upon parameter selection, the report title is shared across.

So, I planned to put those two matrices inside a tablix and to have a merged column cells above the matrices to have the dynamically displayed Report Title.

Now, Please share your work around for the same - Thanking you very much!

February 5th, 2015 4:44pm

Hi Radhai,

According to your description, you create two matrixes with two datasets, then you want to display the report title above the combined matrixes with dynamic width.

In Reporting Services, one tablix can only include one dataset, unless using Lookup() function to get values from another dataset. In your scenario, since two datasets dont have the same field, we cant use Lookup() function to have those data fields from two datasets together. Generally, you have to create two matrixes with two datasets, each dataset is rendered within one tablix. For your requirement, one workaround is to add the two matrices as subreports into one tablix. Then you can add report title into tablix header. However, since we need two extra subreports to show the data, it may have some performance issue. Another ways is to add a textbox above those matrixes to show report title, then adjust the textboxs width same as two matrices width manually.

If you have any question, please feel free to ask.

Best regards,
Qiuyun Yu

Free Windows Admin Tool Kit Click here and download it now
February 8th, 2015 2:41pm

Thank you Qiuyun!

Yes. I did using subreports with no other go for it ...

February 12th, 2015 2:49am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics