为什么我的报告没有显示任何结果?代码有什么问题? [英] why my report doesnt show any results? whats wrong in the code?

查看:138
本文介绍了为什么我的报告没有显示任何结果?代码有什么问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi
我在项目中使用了一个数据集,然后添加了一个数据表,在该数据表中我编写了以下代码:
我没有显示错误...


hi
i used a dataset in my project and then add a datatable,in the datatable i wrote this code:
i doesnt show error...


SELECT        Person.Lastname, Person.Firstname, COUNT(HospitalRecord.HospitalRecord_ID) AS count, Person.FatherName, Person.BirthDate, 
                         (CASE WHEN Person.IsPrivate = 1 THEN 'yes ' ELSE ' no' END) AS sherkati
FROM            HospitalRecord INNER JOIN
                         IMPHO.dbo.Person AS Person ON HospitalRecord.MedicalID = Person.MedicalID INNER JOIN
                         department ON HospitalRecord.Ward_ID = department.depID
WHERE        (HospitalRecord.Disch_Date >= @date1) AND (HospitalRecord.Disch_Date <= @date2) AND (HospitalRecord.Cancel = 0) AND (department.Department = @ward)
GROUP BY  Person.FatherName, Person.BirthDate, Person.Lastname, Person.Firstname, Person.IsPrivate
HAVING        (COUNT(HospitalRecord.HospitalRecord_ID) >= @number)




当我运行该应用程序并输入所需的参数时,它没有显示任何结果?代码中有什么问题????




when i run the application and enter the needed parameters ,it doesnt show any results? whats wrong in the code???

推荐答案

如果不是不可能的话,我们很难告诉您您出了什么问题,如果您无法获得您的结果,那么您将无法获得任何结果数据.

话虽如此,如digimanus所述,并删除filter子句以查看您出了问题的地方.
Its very hard if not impossible for us to tell you what is wrong with you not getting any results without having access to your data.

Having said that do as digimanus said and remove the filter clauses to see where you are going wrong.


这篇关于为什么我的报告没有显示任何结果?代码有什么问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆