We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

query with blank parameter value

Thread ID:





129967 Apr 12,2017 10:42 AM UTC May 19,2017 05:52 AM UTC Report Platform 5
Tags: Report Designer
Gregory Kohle
Asked On April 12, 2017 10:42 AM UTC


I tried using a parameter, which can be blank in a query.
There are only values displayed if I put in a value for the parameter.
Here is the query:

select distinct Partnum from Artikel
where PARTNUM like '%' + @SearchArticle + '%'

Do I have to do something else to get it working or should this work?


Vijay Raja [Syncfusion]
Replied On April 13, 2017 02:10 PM UTC

Hi Ptrick, 

Thanks for your interest in Syncfusion components. 

The provided query will return the data only for non-null inputs, you can use the OR SQL Logical operator to return data for null type values inputs as shown in the below query. 

SQL query: 
select distinct Partnum from Artikel where PARTNUM like '%' + @SearchArticle + '%' OR ( (@SearchArticle is NUll) AND (PARTNUM is NULL) ) 

Vijay R. 

Gregory Kohle
Replied On May 17, 2017 09:35 AM UTC

Hi Vijay,

I want to show all values when the parameter is blank and if there is a text then filter depending on that.
I noticed that if I enter some data and then make this field blank again then there is the outcome I wanted.
If i just leave the field ontouched then there is no data to be loaded.
I attached the report and a test database.


Attachment: ReportBlankSearch_38dcbf56.zip

Vinoth Srinivasan [Syncfusion]
Replied On May 18, 2017 11:04 AM UTC

Hi Patrick, 
The ReportParameter “SearchArticle” set to “Allow Blank Value”, so the empty sting value passed to the query and it fails in returning data. We request to enable the “Allow Null Value”, “Allow Blank Value” for the “SearchArticle” parameter to retrieve data at initial loading. We have modified your report based on this and it can be downloaded from the following location. 
Vinoth S. 

Gregory Kohle
Replied On May 18, 2017 11:25 AM UTC

Hi Vinoth,

got it working now.


Vinoth Srinivasan [Syncfusion]
Replied On May 19, 2017 05:52 AM UTC

Hi Patrick, 

Thanks for your update. We are happy to hear that your query is resolved. Please let us know if you require any further assistance on this. 

Vinoth S. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon