How to include 'NULL' value in Microsoft SQL server Report Builder - sql

I would like to include NULL value from the database in Micorsoft SQL Server Report Builder 2012.
Problem:
Whenever I try to include NULL value in parameter drop-down list.. I can't sort by 'NULL' values in my report.

You mean like the Null values go last?
Well I had problems when I tried to order my results by Query or by hand (I mean, like selecting how to order in the tablix) because none of this would work at all.
It will result for sure if you use "Dynamic Order". :)
It's not too "Comfortable" to use it because when you run the report you will have to click in the column you will use as a reference to order your report and when it's done you will be able to sabe or print your report.
It would be great if it ordered the results by itself by just running the report but it won't work.
:) I hope I could help.

Related

Crystal Report: IsNull equivalent for SQL Expression

I want to filter out the data in my crystal report. Currently, I have the following formula in the Record Selection: isnull({T_TABLE.SOME_COLUMN}).
Apparently, if we use some functions in Crystal Report, it does not get converted to the SQL query (i.e. it will not add the SQL statement with something like T_TABLE.SOME_COLUMN IS NULL.
Since this checking is pretty basic, I want this condition to be pushed to the SQL statement that is generated because it should be faster to filter at database level rather than Crystal Report. Based on what I read, the possible way to push some condition to the SQL statement is to use the SQL Expression Fields. But I don't seem to be able to write T_TABLE.SOME_COLUMN IS NULL. It gives error : FROM keyword not found where expected.
Any idea how to solve this?
[EDIT]: The IsNull seems to be pushed when if it is isnull({T_TABLE.SOME_COLUMN}). But if it is some view, e.g. isnull({V_VIEW.SOME_COLUMN}), it does not get pushed.
The IsNull() function is actually pushed to the SQL query, with the condition that it is not compared to some value in the Crystal Report Record Selection formula.
So IsNull({T_TABLE.SOME_COLUMN}) is converted to SQL query T_TABLE.SOME_COLUMN IS NULL. But IsNull({T_TABLE.SOME_COLUMN}) = true won't.

Allow Drop Downs in an SSRS Report (2008) to accept text as an input

Okay, so I have an SSRS report that has a parameter with available values from a query. All of this works fine, but I would like the user to be able to select multiple items using: "SomeText%" which will retrieve all like: SomeText12, SomeTextHeyThere etc. The sql for this is all set up, but once you set the parameter to get values from a query in visual studio, you don't have the option to enter in text as well. This seems like it should be a common feature. Does anyone know how to add it so that the user can enter text and select from the drop down at the same time? I can create 2 parameters to do this, but that is just clunky.
Thanks!

SQL Reporting Services Filter Select All Auto Run

I am creating a report with SQL reporting services.
VS 2008 SQL 2008.
I created a filter for dates and distinct values. For dates I created two filters/parameters for date ranges and was able to successfully run the report on first click.
However when creating a filter for distinct values and drop down. I am unable to figure out how to run the reports on first click. It keeps forcing me to choose a selection. I want it to run on the first click with the "Select All" option already selected.
What am I missing? The Dataset query contains the dates while I added the drop down one through the GUI.
Use these instructions to set default values. You'll want to use the Get values from a query option. Point the default parameter to the dataset that is being used to generate the list of distinct values.

Howto: Display a parameter on a SQL Server Report?

I'm creating some reports in Visual Studio BIDS, out of our SQL Analysis Server 2008.
The report works fine, and uses an MDX query with parameters. So far, so good.
The problem is that I would like to display the parameter on the report. For example, I would like to display the 'Month' of the Date parameter, but it shows up on the report like this:
[Date].[Month].&[2010-01-01T00:00:00]
Not really what I want. How can I display this value as 'January' ? I can't find any function which does this. The only way I see this is possible is to include the date value in the returned fields.
Does anyone have experience with this?
I fixed this by adding the necessary values in the Select-fields.

Format SQL query results

I am looking for a way to set the width on the returned column result from a SQL query.
I run a query like Select Product from ConfigScheduling where Product is an Nvarchar(Max) column.
The result in SQL Server Management Studio with Results to Grid is a 90 char wide visible column, with the full result present, but not visible.
Thank you
Couldn't find it by default, but if you double-click on the right part of the Column Header it will stretch like in Excel.
Tools>Options>Query Results>SQL Server>Results to Grid>Non XML data
Tools>Options>Query Results>SQL Server>Results to Text>Maximum number of characters displayed in each column.
If these still don't suit your needs, you'll need to use another tool such as bcp or sqlcmd/osql.
If I remember correctly, SQL Server Management Studio cannot pull the whole nvarchar(max) field into display and won't attempt to either. The only way to fully access the resultset is to use a third party tool or display it in a gridview or something in a webapp.