ReportViewer with null values

0

I generate a report with area, Type, and two dates within which the area and the type can contain or not values, with the four parameters works correctly, but how can I get the query executed correctly when the value is null? ? Thanks!

        //Array 
        ReportParameter[] parameters = new ReportParameter[4];
        //Establecemos el valor de los parámetros
        parameters[0] = new ReportParameter("Area", lbl1.Text);
        parameters[1] = new ReportParameter("Source", lbl2.Text);
        parameters[2] = new ReportParameter("fecha1",f11);
        parameters[3] = new ReportParameter("fecha2", f22);
        //array al ReportViewer
        ReportViewer1.LocalReport.SetParameters(parameters);
       ReportViewer1.LocalReport.Refresh();'

The parameters are extracted from three DropDownList

    
asked by Xavier 16.05.2017 в 18:55
source

1 answer

0

At last I could solve it, at the time of declaring the DataSet, right click on DataTable, properties, review the properties of the data and there must be activated to accept nulls, otherwise it will return error even if the syntax is correct and report accept null , Greetings!

    
answered by 26.05.2017 в 15:27