Show empty field with parameter
Hi Miki, If I understand you correctly, first change your second parameter property to allow blank values. Now change main dataset query something like below : If @description<>'' Begin Select <column_list> From <tablename(s)> Where discription(or whatever column name you are using)=@discription And resolution(or whatever column name you are using)=@resolution End Else Begin Select <column_list> From <tablename(s)> Where discription(or whatever column name you are using)=@discription--Here you don't need to check value for second parameter in case of blank. EndThanks, Sumit
April 11th, 2012 4:29pm

Hi I thank you for the replay! My code skills it not the best sorry! here is an example of my code could you please explain it with this fields, I would appreciate it! This is my try to do what you explained:(and I could not get it to work, but as I said my sql skills is not what they should be) begin select xxx.a xxx.b aso xxx.resolution xxx.description from xxx end if @resolution <> '' Begin select xxx.resolution from xxx where xxx.resolution like @resolution End if @description <> '' Begin AND The same code here but for the description.... End
Free Windows Admin Tool Kit Click here and download it now
April 14th, 2012 8:24am

Hi! I am using report builder 3.0 and I am having a problem that I hope someone out there can help me solve :) I have 2 parameters, first one is description, this field can never be empty in the database so this one I can easily just do an % on to show all but then I have the second parameter that is resolution. This one can be empty so if only do an % on this one it will show me everything that is not empty :( and I if the parameter is empty it should not consider the parameter and if I write something in the parameter it should only look for that I have tried some solutions that i found here on the forum but nothing have help t me because I guess it is not the solution for my problem ;P Thank you in advance // Miki
April 14th, 2012 8:55am

Hi Miki, If I understand your problem correctly, you want show empty field with parameter, you can check box allow blank values in Parameter Properties.
Free Windows Admin Tool Kit Click here and download it now
April 14th, 2012 6:01pm

Yes, That should work but if I leave the parameter empty it will not give any results, do I have to write something like "" in the parameter? And the problem might also be here that I want if I leave the parameter empty I want to show all like "% + empty"
April 15th, 2012 3:53am

Hi mikii111, To show something when the parameter is null, one possible solution is to achieve it by changing dataset query as: if @para is not null begin select f1,f2 from tab where f1=@para end else begin select '%'+ 'empty' end Thanks, LolaPlease remember to mark the replies as answers if they help.
Free Windows Admin Tool Kit Click here and download it now
April 15th, 2012 6:01am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics