Here's a sample matrix:
Men Women Total
Full Professor 36 12 48
Assoc. Professor 16 9 25
Assistant Professor 11 14 25
Total 63 35 98
Now, it's easy enough to make the values clickable so that somebody can drill down to a report that shows detail about the people. I have also discovered how to turn off clickability on the totals. However, what I really want is for the totals to be clickable so that, for example, if I click on the 63, I see a report that shows all men. Likewise, If I click on the 48, I want to see a report that shows all Full Professors. What currently happens when the totals are clickable is that if I click on the 63, I get all men who are full professors (36 records instead of 63). If I click on the 48, I get all Full Professors who are men. (36 records instead of 48).
Is there any way to send different parameters (or even no parameters) to the secondary report if the subtotals are clicked instead of the regular results?
Thanks in advance!
Daniel,
If your total link you should be passing the SubTtotal report field value - ReportItems!MySubtotal.value and not the Fields!MyMatrix.value.
I hope this helps.
Carl
|||Thanks for your reply, Carl.
The problem is that the matrix only has one field on which to create the navigation... the data field. The total field is generated automatically, so I don't see how it's possible to creating a unique link for the total itself. If there is a way, please tell me how.
Thanks,
Dan
Yes,
you can just past the "ReportItems!MyField.value" if you click on the "36" it passes "36" if you click on the "58" it passes "58"
Ham
|||Thanks for your assistance.
But... I'm not sure we're connecting here. In Layout View, the matrix has one data field. I right click on that field and choose Properties. Then I click on the Navigation tab and in the "Jump to report" menu, I choose the name of my sub report. Then I click on Parameters and add the two parameters, =Fields!Gender.Value and =Fields!JobEEO.Value.
Now, when I Preview my report, every number is clickable, including the subtotals. It's just that clicking on the subtotals doesn't bring the correct result, as described in my first post.
I'm trying desperately to explain this so that you can see it, but I have a feeling I'm not doing a very good job...
|||dj,
Go to where you add the two parameters in the navigation, In the parameter value, select expression, in your expression, you can type " ReportItems! " your intellisense will then allow your to select the Report Field you want to pass.
Ham
|||
The report field values are meaningless as parameters, though. What I really am saying when I click on the 63 is: "Show me a list of all Full Professors, Associate Professors, and Assistant Professors who are Male."
So the parameters I need to pass are
1) JobEEO = Full Professor, Associate Professor, Assistant Professor
2) Gender = Male
|||Hi,
I think you need to use the InScope function to determine which parameter values to pass.
This link may help:
http://msdn2.microsoft.com/en-us/library/aa255807(sql.80).aspx
Ian.
|||I have finally figured this out and I though I would pass it on to anyone who needs it in the future.
The best way to deal with this situation is
1) On the sub-report, for a multi-valued parameter, make every option the default. So in my example, the default for the Job EEO would be Full Professors, Associate Professors, and Assistant Professors and the default value for Gender would be both male and female.
2) On the first report, only pass the parameter if its value is in scope. This is accomplished by editing the Omit property of the parameter you are passing... setting it to something like: =Not(InScope("matrix1_Gender"))
This means that if there is no distinct value for the gender, the parameter will not be passed. The subreport will then show data for both genders because that is the subreport's default.
If making every option in a subreport's parameter the default doesnt' work for your needs, there is another way. On the parameter that's being passed out of the first report, you can edit the expression to something like this:
=Iif(InScope("matrix1_Gender"), Fields!Gender.Value, Split("Male,Female", ","))
This, translated into English, says, "If you clicked on a field related to a specific gender, then send that gender to the subreport. Otherwise, send both Male and Female to the subreport."
|||Thanks !It works !
No comments:
Post a Comment