问题描述
亲爱的朋友们
我有一个项目,我需要在我的数据报告上放三个字段namley
DEPARTMENT,SEX,TOTALPATIENTS
这里DEPARTMENT和SEX是我的数据库表中的字段,TOTALPATIENTS是使用以下查询创建的计算字段(别名)
Dear friends
I have a project and i need to put three fields on my data report namley
DEPARTMENT, SEX, TOTALPATIENTS
Here DEPARTMENT and SEX are fields in my data base table and TOTALPATIENTS is the calculated field (Alias) created with the following query
SELECT DEPARTMENT, SEX, COUNT(*) AS TotalPatients
FROM PATIEnts
GROUP BY DEPARTMENT, SEX
ORDER BY DEPARTMENT;
但是我现在有一个问题。
当我在我的VB6数据报告中将DEPARTMENT,SEX和TOTALPATIENTS作为rptlabels和rtptextbox时,它显示未找到数据字段TOTALPATIENTS。
如何解决这个问题。
请帮助
Sarfaraz
But i have a problem now.
When i put DEPARTMENT , SEX and TOTALPATIENTS as rptlabels and rtptextboxes on my VB6 data report it shows data field TOTALPATIENTS not found.
How to solve that.
Please help
Sarfaraz
推荐答案
SELECT DEPARTMENT, SEX, TOTALPATIENTS
FROM (SELECT DEPARTMENT, SEX, COUNT(*) AS TotalPatients
FROM PATIEnts
GROUP BY DEPARTMENT, SEX)
ORDER BY DEPARTMENT;
另一种可能的解决方案是VB6数据报告区分大小写。因此,您需要将别名更改为AS TOTALPATIENTS或将rptlabel更改为TotalPatients。
Another possible solution is that the VB6 data report is case sensitive. So you would either need to change the alias to "AS TOTALPATIENTS" or change the rptlabel to "TotalPatients".
这篇关于在vb6数据报告中使用别名字段名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!