Insert a separator into a dropdown list in SSRS - reporting-services

I have a report that pulls information on tools. I have a multi-value parameter setup in SSRS that pulls a tool name and GUID and then passes the GUIDs to a stored proc for results.
The tools have in addition to name and GUID a value of active. I want to display a list of tools with active items first, then inactive. Easy enough that's just an order, however I'd like to put a visual separator between active and inactive tools. I can achieve this by creating an order value based on active status, and then using union to attach a dummy line between them.
However this means its possible to select the separator line. I can handle that line in my stored procedure so it doesn't cause a problem, but I'd like to make that line unselectable or to have a separator similar to what you see in a dropdown menu.
Does anyone know of any functionality that will achieve this?
I main project is currently help in 2008R2, but I may be able to upgrade if there is a good solution to this.
Many thanks in advance.

OK - have found there seems to be no way of showing a separator as such short of coding in a separator line in the data set. Final solution was close to my original plan. I now download two datasets, one of all tools (Active, separator, inactive) and attach this to my available values, and one of active only, which I then attach to my default values.
This means that both are available, but default is active only. Not a solution to the exact question, but best that I could come up with and is close enough to fit for purpose.
If anyone does come across better solutions, I'd love to here them.

Related

flatten results onto one line in report builder

report example
i have a report that displays client contact details, but annoyingly for each different contact type it displays the results on a separate line! Can anyone advise if it possible to show the results on one line using an expression or some sort of filter, not using SQL.
as you can see from the image Miss S has both a mobile (MBL) and telephone (TEL) number but they show on different rows, if in my program i were to add an email address then it would add a third line, is it possible to flatten the results down to one row?
regards
You'll need to remove the Contact Type column from the tablix as this won't be valid once you put all the contact details on the same row.
Once this is removed, you will then need to edit the row group (under the main design window) and group by the first 5 columns only. There may already be grouping set, if so check that contact type is not in the group by list, if it is remove it.
Alternative
After saying all this, I can't help but think this report would be a whole lot easier, assuming the data was structured correctly (it may already be), to use a matrix control. That way all this and the answer to your previous question (asked recently) would be automatic. I won't go into detail but if you are interested, create a new question and show the output from your dataset query, the query code itself and the desired output. optionally, accept this answer ! :)

Regarding get automatic columns in sql`

I have basically 50 fields in a table and I want to select this fields from table on a regular basis.
Problem is: I have to write all this 50 fields manually.
Is there any shortcut in intellisence or any other tool where I can get all fields. automatically by pressing tool.
Also guys if anyone knows here extra addons on sql..then please post it here.
I'm a bit late to the party here (answer already accepted) but here goes anyway...
Did you know that you can drag the columns from the table to the editor window in Sql Server management studio?
So to get the columns, you can expand the table in SSMS, click on the Columns item (for lack of a better word) and drag it to the editor window. When you release, a comma separated list of all the columns for the table will be inserted to the editor at the position you point to.
It's not a easy as autoexpanding *, but it's a good little trick when you have lots of columns.
Check this http://www.devart.com/dbforge/sql/sqlcomplete/download.html link.
It may help you. Its a great intellisense tool for sql. Its has all functionality to improve productivity.
try this:
select name+',' from sys.columns where object_id=OBJECT_ID('tablename')
Now you just need to copy the result and put after the select keyword

Building a rdl report for CRM

I'm creating my first report for CRM 2011 using SQL Server Business Intelligence Development Studio and i've managed to do a decent amount but as I move into the more complex parts i'm becoming stuck, and I was wondering if someone would be able to help me with a few questions I have:
I'm using fetchXml to get the data from CRM for some accounts that the report is for, I need to include some data from a child entity but can't include them in the same way that I can for a parent entity to accounts. So for this I'm assuming I need to use a separate fetch query, but how do I pass the ID of the account the report is looking at into the second fetch query as a parameter?
Once I've got the names of all the child items with the fetchXml, whats the easiest way to display them all in a numbered list?
EDIT: For 1 and 2 I found that I can use a subreport with the child data in it. Using a list item I can show all in a bulleted list and I can pass the parameter through from the main report to the subreport
I'm listing the account's address on the report but since they might or might not have the lines 2 and 3 fields completed i'm unsure of how to display it without either missing off some of the address or leaving big gaps. I've tried creating different text boxes with the different combinations of line 1, 2 and 3 and then make only one visible with the use of expressions but the iif statement always returns false. Is there an easier way to do this?
EDIT: I've found out how to do this using a number of different text boxes containing the different combinations and hiding them using the visibility rule. What was initially confusing though is that the rule is for if the box should be hidden, rather than if it should be shown
When I add a field onto the report it always has a "First()" statement on it. Is this required or will it limit my report in any way?
EDIT: This doesn't seem to have an effect on the report as the record to run it against is always selected beforehand, so the First() statement doesn't restrict any data
If anyone could help me with any of these questions at all then that would be greatly appreciated.
Thanks
I've found the answers to my questions, i've put them in the original post.

Access Input textbox on Data Access page with only select enabled to allow filter by searchs

I have a data access page which gets all it's data from a query of another table, problem is all the textboxs I make on the page and bind the Control source to the matching column then don't allow me to input any text in to use the filter option to search all the results.
I don't want to be able to record any information but if I change page properties to from DataEntry = false too true then it no longer displays the whole section of textboxs.
Anybody know of a way round this or suggestions of other simple solutions to display certain data from the table or all the data from the query in the same/similar way as this?
Edit- Original issue which now requires me to find new solution.
I've used DAP quite a bit -- I even built DAP solutions at Microsoft, and they were wildly popular. I always preferred to use the SQL Server flavor of DAP.. and that allows you to use TWO different types of filters, the standard filter property, in addition to the serverFilter property. The serverFilter property is extremely powerful, and it's incredibly nice to be able to filter things in TWO different ways.
Hope that helps
-Aaron MCITP DBA
The original issue has now been resolved but I had also found these 1, 2 links which guide one through a search feature on DAP's.

Grouping by a report item in SSRS 2005 - textbox - any workarounds?

I want to group by a report item, but that's not allowed.
So I tried creating a parameter...not allowed as well.
Tried referencing from footer...failed again.
This is somewhat complicated.
Let me explain:
I have textbox22, it's value is:
=Code.Calc_Factor(Fields!xx.Value, fields!yy.Value...)
This is embedded VB code in the report that's called for each row to calculate a standard factor.
Now to calculate the deviation from the standard factor, I use textbox89, whose value is:
=(Fields!FACTOR.Value - ReportItems!textbox22.Value)/ReportItems!textbox22.Value
Don't get confused between Fields!FACTOR.Value and textbox22.Value, they are different.
Fields!FACTOR.Value is the factor used, textbox22.Value is what it should be (standard factor).
Now I want to create a group which splits deviations into 2 groups, > 1% or not.
So I tried creating a group:
=IIF(ReportItems!textbox89.Value > 1,0,1)
...But then SSRS complains about using report items.
I have run into a similar problem of using report items in the past, but this is a new case!
Any help greatly appreciated.
Have you tried adding a calculated field to your dataset?
Here is how it works:
While you are in the layout view of the report, open "datasets" tool window(in my environment it is on the left).
Right click on the DataSet you are working with and add a field, you can use a calculated field, and build your formula appropriately
Then you should be able to group on this field
-Dan
I'm not 100% that someone won't have some magic solution for this but I have run across similar problems myself in the past. I believe (but could be wrong) the problem Reporting Services is having is that it only renders once and what you're asking it to do is render the data before rendering the grouping which it doesn't do.
The only way I have ever been able to produce the exact results I need is to make the data rendering happen exclusively in the SQL (through the use of table variables usually) and then use Reporting Services merely as a display platform. This will require that your factoring algorithm gets expressed in the T-SQL within the stored procedure you will likely have to write to get the data in shape. This would appear to be the only way to achieve your end result.
This has the bonus feature of separating report design and presentation from data manipulation.
Sorry I couldn't provide a SSRS solution, maybe someone else will know more.