If you'd like to help fund Wise Owl's conversion of tea and biscuits into quality training videos you can click this link https://www.wiseowl.co.uk/donate?t=1 to make a donation. Thanks for watching!
By Andrew Gould
https://www.wiseowl.co.uk - Parameters allow your users to filter reports by typing in values or selecting from drop down lists. But what if they want to leave a parameter blank and still see results in the report? This video teaches you how to handle null values in parameters to make this possible. You'll learn how to allow a null value in a parameter and how to write a WHERE clause to handle the null properly. We'll also look at how you can create drop down list parameters which allow null values, including how to append a null value to a dataset, how to mask the null value with descriptive text and how to sort the drop down list to make sure the null appears at the top.
You can download a script to create the database used in this video from the following link:
https://www.wiseowl.co.uk/files/execise-question-files/qf-898.zip
Visit www.wiseowl.co.uk for more online training resources in Microsoft Excel, Microsoft Access, Microsoft PowerPoint, Microsoft Word, Microsoft Project, Microsoft Publisher, Microsoft Visio, SQL Server, Reporting Services, Analysis Services, Visual Studio, ASP.NET, VB.NET, C# and more!
@dave58889 years agoExcellent job! You saved me, i needed to allow user to select from a pre-populated list of values in one parameter filtered by another parameter, and allow. ...Expand
@
@Terracronz10 years agoThat union sortorder field was brilliant btw. 2
@
@jesflo43 years agoBrilliant, thank you for this information, just what i was looking for. Cheers! 3
@
@alxvseti4 years agoAdding a Filter Writing a WHERE Clause in a Query Adding More Parameters Modifying the WHERE Clause Adding Even More Parameters Dropdown List Params Datasets for Dropdown Lists Fiters for Dropdown List Params Appending a Null Value to The List Masking the Null Value in the List .....Expand5
@
@pierrel52228 years agoThis is an outstanding series, made me actually want to go through all of them even if they don' t all apply, great job.
@
@khalidz19818 years agoYou are a very organized person and i love your work and i am going to finish the whole ssrs series.
@
@MissChenTW7 years agoGreat video series! I think for people who are not as familiar with sql thus the output created from " select directorid, directorname, directorname from tbldirector union select null, #39; show all' 0' orderby sortfield " adding the query' s output will help viewers understand the last part of this great video = the query output looks like below. Note, a row of " " simply means a valid data record. directorid directorname sortfield null show all directors 0 . . . 4 steven spielberg steven spielberg 48 steven soderbergh steven soderbergh . . ...Expand1
@
@krismaly11 years agoI enjoyed the video. This chapter is important for any developer. Thanks.
@
@RaviYadavGv9 years agoSuper. thank you so much for preparing and sharing these.
@
@autumn917511 years agoI learned something very useful for my job. Thank you!
@
@krismaly11 years agoI love this episode especially show all directors.
@
@cameronj807510 years agoGreat video. Any suggestion on the workaround ifcolumn had duplicates and required a distinct filter? With it, i can add the null, but not the directorid in the union @19. 50.
@
@akshayheroor33969 years agoIts very helpful and informative. Thank you so much:
@
@qaiseriftikhar10 years agoGreat videos, thanks for sharing them. The only thing i' ve noticed that you are suggesting to filter on dataset via ssrs. Isn' t that very inefficient?. ...Expand
@
@kingrich74211 years agoGreat video & very helpful! Is it possible to group a number of values against one label when attempting to specify values in a parameter? I' m. ...Expand
@
@fUjiMaNia11 years agoThanks for the help and thanks for the replies to my other questions i had on the other videos:
@
@hrypo7119 years agoThank you for the video! You probably know this, but i think you can set the " show allas null in the default value tab in parameter. Thank you again.
@
@nitintharwani745011 years agoHey your tutorials are really helpful. I have learnt alot from them. Thanks forsaid that i m trying to achieve masking of parameter just like normal password fields on login pages. Do u have any idea or workaround for this. ...Expand
@
@deepak210007 years agoNice video, thanks for the explanation. however i have a requirement similar to this, how can we still have a null checkbox as a default value your reply for this is much. ...Expand
@
@devexpost85087 years agoThanks. Well done. One very minor note however, at in the video, I believe that the addition of the "Show all Directors" list entry does not----as you say----"break the link to the criteria in your other data set", but instead simply results in a search for a @prmDirector "director" (a director named "Show all Directors") which does not exist in the FilmName table, and thus no results. Best Regards. .....Expand
@
@nitintharwani745011 years agoThank you for the quick reply. Yeah i know about values getting passed as literal values. But my client is okay with that. He just need to have masking. ...Expand
@
@fUjiMaNia11 years agoQuestion: is there a way to prevent the report from running until i click view report in the scenario when the null check boxes are ticket?
@
@murthymamidi66399 years agoHi wise, i have watched every video, really awesome and i learn more from u, and i have a small doubt in this video, 14. 56)minute u r creating the dtsdirectors. ...Expand
@
@mahnazrezahosseini1736 years agoThanks for video. I have " all groups" in my dropdownlist and want to return all values whenever i choose it. Couln' t do it. I used two ways . ...Expand
@
@pianomanuk19 years agoHi am working on a report with 12 parameters. 2 x mandatory start date, end date, 6 x mandatory multi selects and 4 x optional multi selects. My your above tutorial works for dropdown lists that are only single select. How can i achieve the same on multi select drop downs thus making the list optional ( at present i get ' a multi value parameter cannot accept null values'. ...Expand
@
@MrIrrepressible5 years agoWhats happens with multi select drop downs with nulls?
@
@rakesh29nov11 years agoHey what to do if i have to add multiselection values including null in my parameter list and in my paramter list i am hardcoding the availlable values. ...Expand
@
@Terracronz10 years agoThat was strange, i write a lot of sql and didn' t understand why the statement (filmname@prmfilmnameis null) would retrieve all t results, that feels like it reads where the film name matches the parameters or where the parameter is null, which doesn' t make sense to me why that would work. ...Expand
@
@curious31679 years agoCongrats those are some great tutorials out there. i have a question in this session. I noticed that we cannot choose the option " allow how do you handle a dropdown list of directors with null and multiple values?. ...Expand
@
@jodiezhu517310 years agoThat is a great video! But i also tried to display all the data when start date and end date are null, but didn' t figure yet, what would you do to make this work?
@
@RAPTORDARK311 years agoI need your help, how i can do a report whit multiples select and filter fields between them.
@
@timothyadammeyer8 years agoHi there. Your tutorials have really helped me learn this stuff. I was wondering if you could help with something. for this tutorial, specifically that' s the one thing i can' t figure out. ...Expand
@
@nitintharwani745011 years agoWindows forms or web application was my last resort. But thanks again for all the quick replies.
@
@rstanek226 years agoWhat if you use instead of a drop down but the ability to choose multiple values? In the scenario i have i want to be able to choose multiple values and. ...Expand
@
@kathryngr0214 years agoI tried applying the same code to a shared dataset where field = @parameter or @parameter is null but it will not populate results. Is there something else that needs to be done here?
@
@fbersol9 years agoHi, i need your help. I have a database for persons and it store yours photos but only de image path, so how to display image from images path stored in my database.
@
@dmitryvakhrushev79165 years agoIf you use this query in the seconddata set you do not need to remap the parameter to director id and add extra sorting to put show allon top of the list. with [cte1] as ( select [directorname] from [tbldirector] union select null ) select * , label]all from [cte1] order by [directorname]. ...Expand1
@
@dhanasekar19666 years agoUnion not working, an error occurred during local report processing. All queries combined using a union, intersect or except operator must have an equal number of expressions in their target lists.
@
@blobbles789 years agoI thought a better implementation would be to have a < show all> for the directors name, then just leaving it as is. This way the < comes before. ...Expand
@
@foxybark6 years agoAt in your video, what if you are working with a list of dates, what would your single quotes contain? Could this even be done with a list of dates?
@
@viralshah52639 years agoHi wise, i am stuck with my report for parameters. I have created multivalue parameter but i would like to give selection to user that they can. ...Expand
@
@null_x93 years agoWhen we need to add an andthan modify the code as shown in the video. Can we add another filter expression in the filter list? Are multiple filter expressions treated as and between them?
@
@20mim2010 years agoI have an urgent issue i really need ur help i am using sharepoint 2010 and i created a list and i want to do this in it the problem is the query looks very different than this is there a way to do it?
@
@ronpurczynski48038 years agoWhen i use the following statement in the dataset sql query: " where fieldname in (@prmmyparam) or @prmmyparam is null" and select i' m using sql server 2014. Could this be a data source provider issue?. ...Expand
@
@csanya258 years agoIs null is not working for me. Only the error message all the time. S.
@
@rishalinimanoharan12249 years agoHi wise, i need a help form you, im stuck with this problem for a long time. I have three parameters which are startmonth, endmonth and years as drop id="hidden31" down list, when a user selects all three options, the report should only view sum up of the isuess created within that month and year of selection. Im cracking my head so badly and i have no idea how to do this? Help me please!. ...Expand
@
@1snir10 years agoI am working with ssrs(sql server reporting services 2012)i have an datetime parameter. And tick the allow null property. In report a checkbox comeup with please help me(its valuable for business). ...Expand
Related videos for Reporting Services (SSRS) Part 13 - Null Values in Parameters:
Writing a WHERE Clause in a Query
Adding More Parameters
Modifying the WHERE Clause
Adding Even More Parameters
Dropdown List Params
Datasets for Dropdown Lists
Fiters for Dropdown List Params
Appending a Null Value to The List
Masking the Null Value in the List .. ...Expand 5
" select directorid, directorname, directorname from tbldirector
union
select null, #39; show all' 0'
orderby sortfield
"
adding the query' s output will help viewers understand the last part of this great video =
the query output looks like below. Note, a row of " " simply means a valid data record.
directorid directorname sortfield
null show all directors 0 . . .
4 steven spielberg steven spielberg
48 steven soderbergh steven soderbergh .
. ...Expand 1
thank you so much for preparing and sharing these.
however i have a requirement similar to this, how can we still have a null checkbox as a default value your reply for this is much. ...Expand
am working on a report with 12 parameters. 2 x mandatory start date, end date, 6 x mandatory multi selects and 4 x optional multi selects. My your above tutorial works for dropdown lists that are only single select. How can i achieve the same on multi select drop downs thus making the list optional ( at present i get ' a multi value parameter cannot accept null values'. ...Expand
i have a question in this session. I noticed that we cannot choose the option
" allow how do you handle a dropdown list of directors with null and multiple values?. ...Expand
for this tutorial, specifically that' s the one thing i can' t figure out. ...Expand
with [cte1] as
(
select [directorname]
from [tbldirector]
union select null
)
select
*
, label]all
from [cte1]
order by [directorname]. ...Expand 1
i am stuck with my report for parameters. I have created multivalue parameter but i would like to give selection to user that they can . ...Expand
i am using sharepoint 2010 and i created a list and i want to do this in it the problem is the query looks very different than this is there a way to do it?
" where fieldname in (@prmmyparam) or @prmmyparam is null"
and select i' m using sql server 2014. Could this be a data source provider issue?. ...Expand