0
votes

I'm using MS Report Builder v3.0 to create a report. As part of this report, I have a multi-valued parameter (named @Diagnoses). The labels and some of the values (truncated by the size of the display boxes) of this parameter are shown below:

enter image description here

What I would like to be able to do is display the labels / values the user chooses in a 2-column tablix (I've tried using separate textboxes for the labels / values but the results are mis-aligned).

However, this does not appear to be straightforward. The closest method I've found is this one, which stores the user's choices in an internal parameter in xml format, then queries this parameter to produce a dataset from the xml.

So, I created the xml-producing internal parameter like this:

enter image description here

...and I've created a dataset based on this data, with the following query:

enter image description here

But now when I put these values into a tablix, the labels and values are now on separate rows, like this:

enter image description here

Does anyone have a straightforward way of sorting this out?

Best Wishes

C J

1
Can you edit your question and post an example of what you want the output to look like. Typically you would do this kind of thing by simple using JOIN on you parameter labels and have a separate textbox for each (or textboxes in list/table control) but the solution might not be what you want until we see exactly what you expect.Alan Schofield
OK - I've made some progress with this and amended my question accordingly - see the end of the question for roughly what I want the Tablix to look like (but it needs amending so that each label / set of values is on its own row (so in the example given you'd have 3 rows not 6)Campbell Reid

1 Answers

0
votes

OK - I've solved it (it's not pretty, but it works!)

Basically, the problem comes from having to use the join statement when creating the xml - you can't really put both the label information and the value information on the same row in the xml.

To get round this, you have to use two internal parameters to create two datasets - one for the labels column, one for the values column. The method for creating these is essentially the same as that shown above, except for the values parameter, the expression for the default value is:

enter image description here

...and for the labels parameter, it's this:

enter image description here

(by the way, make sure you set the available values to "None" for internal / hidden parameters - the expressions here are for the default values)

Then, when you create the values dataset, you use the following syntax in its query:

enter image description here

...and similarly for the labels dataset.

Finally, in the report, you create one matrix from each of the two datasets, then put them next to each other, using fixed row heights and setting "can shrink" / "can grow" to false so that they look like they're in the same table:

enter image description here

I hope this helps somebody!