我使用VB.net来控制DevExpress报表对象,我目前有一个处理所述报表数据的函数,当我运行它时,报表数据完全空白。当我运行SQL Server Profiler时,我可以看到在调用报表时运行命令exec dbo.sp_Get_CompanyTime @intCompanyID=1,@dteStart=NULL,@dteEnd=NULL,@strUserID=N'',@intCustomerID=1,@intProjectID=1
,根本不返回任何数据,因为UserID不匹配任何内容,对于客户ID和项目ID也是如此。我面临的问题是在VB中我有
Dim spcomptime As dsReporting.sp_Get_CompanyTimeDataTable = New dsReporting.sp_Get_CompanyTimeDataTable
Dim OpenDate As Nullable(Of DateTime)
Dim CloseDate As Nullable(Of DateTime)
Dim clientId As Nullable(Of Integer)
Dim cusId As Nullable(Of Integer)
Dim proID As Nullable(Of Integer)
Sp_Get_CompanyTimeTableAdapter.Fill(spcomptime, 1, OpenDate, CloseDate, clientId, cusId, proID)
正如您所希望的那样,它应该为前两个参数之外的所有内容传递空值!香港专业教育学院尝试使用其他地方建议的DBNull.value,但它告诉我它不能转换为“整数?”类型。 有人帮助我,我一直试图解决这个感觉就像一个时代。