If you became a customer of the Syncfusion� Reporting Platform or the Report Viewer, Report Designer, or Report Writer components before October 2019 and have questions related to those products, you can request support through our forum system. However, please note that this support system is only for existing customers who are still using the Syncfusion� Reporting Platform or its components and not for new customers looking for reporting products from Syncfusion�.

For new customers or those with general reporting questions, we recommend contacting our support team at https://support.boldreports.com/, which is a separate brand created by Syncfusion� for its reporting solutions. Our team will be happy to assist you with any questions you may have.

Thank you for choosing Syncfusion� for your reporting needs.

How to set null for integer (or string) parameter?

Hello,

I would like to retrieve data from stored procedure into a rdl report.
The stored procedure has integer parameters. Running it from the SSMS is working well without specifying the parameters.
How can I achieve the same functionality in the Report Designer?

Without selecting parameter the following error comes up: "Select a value for the parameter 'ProductType'."

The parameter is working well if it's selected. I checked the "Allow null value" option. Although I could read in the docs that it is not enough. I have to set the null value explicitly as a value, but it's not possible for integer. I also tried switching to string, which would be fine as well, but it didn't work either.

How can I make it work?


4 Replies 1 reply marked as answer

MS Muthuramana Sankaranarayanan Syncfusion Team August 21, 2020 07:02 AM UTC

Hi Istvan, 

Please find the details for your queries from below, 

Without selecting parameter the following error comes up: "Select a value for the parameter 'ProductType'." 
When a parameter is allowed to have null or blank values the report will be allowed to be previewed without passing any parameters or else the reported error will be thrown which is a behavior. 
I checked the "Allow null value" option. Although I could read in the docs that it is not enough. I have to set the null value explicitly as a value, but it's not possible for integer. I also tried switching to string, which would be fine as well, but it didn't work either. 
We checked the reported issue but we were not able to reproduce it. Is it possible for you to share a simple report with issue reproducible as it will be helpful for us to validate the reported issue form our end. 
 
Also for further details regarding the properties “Allow blank values” and “Allow null values” in parameter we suggest you to refer the below documetnation link, 
 
 
Regards, 
Muthu Ramana S 



IP Istvan Piroska August 21, 2020 08:06 AM UTC

Hello Muthu,

Thanks for the answer.

Actually I am pretty sure that the missing null value element cause the problem.
Following the documentation:

"Select Allow null value, if the value of the parameter needs to be set as null.
Note: If you specify valid values for a parameter, and you want null to be one of the valid values, you must include null as one of the values that you specify. Selecting this option does not automatically include the null value for available values."

It's fine, but how can I get a null value, what is the "best practice"? The values are set in query directly from the database. This part is working fine. But I wouldn't like to place a null value in the database. Is there any way to add it somehow manually?
(Just to compare, in a C# vievmodel I can manage it of course, but here this is not the case).

This is my actual notes about the issue.
If there is no solution can I send the project somehow in privat?


IP Istvan Piroska August 21, 2020 09:28 AM UTC

Yes, it was the issue.

Meanwhile I could solve to pass an extra null object to the data source and it is working perfectly now.

The solutions is in an old but very good video:

Marked as answer

MS Muthuramana Sankaranarayanan Syncfusion Team August 25, 2020 12:13 PM UTC

Hi Istvan, 

We are glad the issue is resolved at your end. Please let us know if you need any other assistance regarding this. 
 
Regards, 
Muthu Ramana S 



Loader.
Up arrow icon