Passing Null Value....?????

Stimulsoft Reports.NET discussion
Post Reply
abhi0410
Posts: 47
Joined: Fri Sep 26, 2008 12:42 pm
Location: bombay

Passing Null Value....?????

Post by abhi0410 »

Hi....

i am passing the value to parameters in the report in the format:

stiSales_Order_Print.Complie();
stiSales_Order_Print.CompiledReport.DataSources["Sales_Order_Print"].Parameters["@SalesOrderNo"].ParameterValue = orderNumber;
stiSales_Order_Print.CompiledReport.DataSources["Sales_Order_Print"].Parameters["@SalesOrderDate"].ParameterValue = orderDate;
stiSales_Order_Print.CompiledReport.DataSources["Sales_Order_Print"].Parameters["@Customer"].ParameterValue = Customer;

N i am calling the stored procedure in my report and passing the values to stored procedure with the help for parameter....
it works fine...

Now some time i may be passing Null value also those parameters in the report as users may not provide any value and would like to genrate the report...How to do that???

Thanks....
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Passing Null Value....?????

Post by Vital »

Hello,

Use following code:
stiSales_Order_Print.CompiledReport.DataSources["Sales_Order_Print"].Parameters["@SalesOrderNo"].ParameterValue = DBNull.Value;
Thank you.
Post Reply