SSRS: Multi-value parameter with repeated values - reporting-services

I'm having issues with multi-value parameters. I was expecting I could load distinct values for the label and value combination from the default dataset but it's not working.
I have a query that looks like this:
Id Name Col1 Col2
1 Foo aaa ddd
1 Foo xxx sss
1 Foo yyy zzz
2 Bar bbb eee
3 Huh ccc fff
And want to grab the ID - Name combo from the dataset. Ideally, the results would be:
Value Label
1 Foo
2 Bar
3 Huh
However, the actual results are:
Value Label
1 Foo
1 Foo
1 Foo
2 Bar
3 Huh
EDIT: I consider this a poor solution, but made a new dataset only to collect the fields as I needed them and populate the parameter dropdown list. It's not the prettiest outcome, but should work until I find a proper way to do it.
Some of my colleagues are telling me this is the only way to do it, so I have to create a new data set every time I want to fill a new multi-value parameter from a query... Please tell me if it's actually the way to do it, I find it extremely inefficient.

You have to create a dataset for each parameter in order to feed it properly.

Related

SSRS passing parameter in between values

I got some SSRS question. I need to pass in between values in parameters. How can I do it? Sample data:
No. Records
Student Name
5
Anne
5
Rick
4
John
3
Nick
2
Hazel
2
Rica
1
Mitch
The SSRS parameter should show something like this:
Select No. of Records:
1-2
3-4
5 or more
Boolean value is not working on this case
There are a few ways to do this, this is probably the simplest if it's not something you will repeat often.
Manually set your report parameter labels and values as follows
Then in you data query just do something like
SELECT *
FROM myTable t
WHERE
(#myParam = 1 AND NoOfRecords BETWEEN 1 AND 2)
OR (#myParam = 2 AND NoOfRecords BETWEEN 3 AND 4)
OR (#myParam = 3 AND NoOfRecords >= 5)
Make sure myParam is the name of your SSRS report parameter, it is case sensitive.

MySQL: Select a fixed value based on UNIQUE only values of another column

I have a table with values in a column called OrderID. The values aren't all unique and often two or more rows will share the same value. What I'm trying to do, when I make a Select, I want to add a fixed value based only on UNIQUE or DISTINCT values from the OrderID column. I've tried a SELECT DISTINCT but of course that just gives me distinct only rows, as I still need to return all of the data. I played around with UNION by having one query return all of the results and the other return only DISTINCT results, but I still didn't get the final result I was looking for.
Below is basically what I'm trying to accomplish. It seems like it should be easy, but I'm not sure how to tell my fixed value SELECT to only look for distinct values in a specific column. Keep in mind, my full dataset is much greater, I've just paired it down to what I think is necessary.
OrderID
123
456
789
246
357
456
123
Result I'm looking for:
OrderID || Price
123 3
456 3
789 3
246 3
123
357 3
456
579 3

SSRS grouping on multiple tablix

I have main report that has around 10 tablix and one sub report that has 2 charts. I want the each tablix grouped by same column, but every table uses different datasets. By using List control, we can group the tablix and set a page break between each group. For that, list dataset and tablix dataset must use the same dataset name.But I am not sure how to do that for multiple datasets. Could anyone please help me how to group multiple tablix based on same field value.Is it possible using list to do that? TIA
Attached for reference
. Each tablix uses different data sets.but the field names are same.If Service_line column has 10 rows, then I want to display in 10 pages(one page per service line).If I select page break at each tablix, first tablix splits by that field name,after that next tablix starts to split by that field name. I want to show A/R,cash,Adjustments in one page per service_line field and then next page the same tables but different service_line. So I thought Put in List all tables together and grouping at List level will solve the problem.Could you please help me on that? or if you have any other suggestions please let me know. I am not sure how to get this done. Appreciate your help.
If I understood you correctly, what you want to do is modify your data a little and use nested grouping.
Combine your datasets into one dataset using unions and label each row with column 'Category'that has value ('A/R', 'Cash', 'Adjustments')
for example your dataset might look something like this
CATEGORY | SERVICE_LINE | Total | ...
-------------------------------------
A/R | A | 100
A/R | B | 10
A/R | C | 1000
Cash | B | 50
Adjustments | B | 100
Cash | A | 5
Cash | C | 400
Adjustments | C | -100
Adjustments | A | 9999
after that you will create a 1 tablix (forget about the lists). And inside that tablix you will create a row group for Category and merge all columns and set value for the cell as [CATEGORY]. Also for this row group you want to set Page Break options as "Between each instance of a group". After that create a row below that contains all the column labels Service_line, Total, etc.
Now what you have to do is create one more row group as Adjacent Below and use Service_Line as group by attribute.
with some UI tweaking you can get it to look as you want.

How do I group values by row in SSRS?

I am new to SSRS and need some help.
I am using a Matrix to Pivot my data.
Dataset looks like this:
TEST TOOLID
----- ------
TEST1 123
TEST1 234
TEST2 456
What I currently have is this:
TEST1 TEST2
TOOL ID 123 N/A
TOOL ID 234 N/A
TOOL ID N/A 456
The output I am looking for is (NULLS should be converted to N/A):
TEST1 TEST2
TOOL ID 1 123 456
TOOL ID 2 234 N/A
Thanks
jlimited
Choose Details in lower left of view pane under 'Row Groups'
Right Click>Add Group>Parent Group
Choose your item you want to group by, include header is the standard behavior(check box to select). Hit okay.
You are now grouping your columns and you should see a bit more geometric ( in the gray space before the rows showing they are grouped accordingly now.

Keeping some choices in the Table for the Field of Type Dropdown

i am having a Table named
Attributes
which has
id form_id label size sequence_no Type
1 1 Name 200 1 Text
2 1 Age 150 2 Number
3 1 Address 300 3 Textarea
4 1 Gender 200 4 Dropdown
I am having the doubt how can i keep the Choices of the Field of type "Dropdown" in the Table
Eg. For Gender the choices will Male , Female..
Please give me the suggestions...
You simply need a child table like this:
id value_id sequence_no label
4 100 1 Male
4 101 2 Female
Note where id = 4 is all the values for the #4 question.
Sounds like you're trying to build an automagic form that is built from a database?
I would suggest having that table be something like elements and have another table for options which links back to the original id
i.e.
options
id element_id value text
1 4 1 Male
2 4 2 Female
That way for specific types you will be know to look up the options.
You may want another field to specify if its a multiselect or perhaps you could make it another Type.
edit :
you can add another type to this table call dropdown_choice,
and add all the choices of this dropdown to this table,
need to keep in another field the master id of this dropdown choice.