奇怪问题:QuickReport中的rbColumnHeader类型的QRBand中的QRLabel内容不能显示

麦子VISA 2004-11-04 05:04:28
我只在FormCreate事件中写了以下代码:
procedure TfrmYear_Report.FormCreate(Sender: TObject);
var
intRecCount:integer;
strYear:string;
begin
strYear:='2004';
//国内男客统计
DS_Year.close;
DS_Year.CommandText:='Select * from History_China where sex=''1'' and ArriveTime>='''+strYear+'01000000'' and ArriveTime<='''+strYear+'04000000''';
DS_Year.Open;
if not DS_Year.Recordset.EOF then
intRecCount:=DS_Year.RecordCount
else
intRecCount:=0;
QRLabel25.Caption:=inttostr(intRecCount);


DS_Year.close;
DS_Year.CommandText:='Select * from History_China where sex=''1'' and ArriveTime>='''+strYear+'04000000'' and ArriveTime<='''+strYear+'07000000''';
DS_Year.Open;
if not DS_Year.Recordset.EOF then
intRecCount:=DS_Year.RecordCount
else
intRecCount:=0;
QRLabel26.Caption:=inttostr(intRecCount);


DS_Year.close;
DS_Year.CommandText:='Select * from History_China where sex=''1'' and ArriveTime>='''+strYear+'07000000'' and ArriveTime<='''+strYear+'10000000''';
DS_Year.Open;
if not DS_Year.Recordset.EOF then
intRecCount:=DS_Year.RecordCount
else
intRecCount:=0;
QRLabel27.Caption:=inttostr(intRecCount);


DS_Year.close;
DS_Year.CommandText:='Select * from History_China where sex=''1'' and ArriveTime>='''+strYear+'10000000'' and ArriveTime<='''+strYear+'12312459''';
DS_Year.Open;
if not DS_Year.Recordset.EOF then
intRecCount:=DS_Year.RecordCount
else
intRecCount:=0;
QRLabel28.Caption:=inttostr(intRecCount);

//国内女客统计
DS_Year.close;
DS_Year.CommandText:='Select * from History_China where sex=''2'' and ArriveTime>='''+strYear+'01000000'' and ArriveTime<='''+strYear+'04000000''';
DS_Year.Open;
if not DS_Year.Recordset.EOF then
intRecCount:=DS_Year.RecordCount
else
intRecCount:=0;
QRLabel30.Caption:=intToStr(intRecCount);


{DS_Year.close;
DS_Year.CommandText:='Select * from History_China where sex=''2'' and ArriveTime>='''+strYear+'0400'' and ArriveTime<='''+strYear+'0700''';
DS_Year.Open;
if not DS_Year.Recordset.EOF then
intRecCount:=DS_Year.RecordCount
else
intRecCount:=0;
QRLabel31.Caption:=inttostr(intRecCount);


DS_Year.close;
DS_Year.CommandText:='Select * from History_China where sex=''2'' and ArriveTime>='''+strYear+'0700'' and ArriveTime<='''+strYear+'1000''';
DS_Year.Open;
if not DS_Year.Recordset.EOF then
intRecCount:=DS_Year.RecordCount
else
intRecCount:=0;
QRLabel32.Caption:=inttostr(intRecCount);


DS_Year.close;
DS_Year.CommandText:='Select * from History_China where sex=''2'' and ArriveTime>='''+strYear+'1000'' and ArriveTime<='''+strYear+'1231''';
DS_Year.Open;
if not DS_Year.Recordset.EOF then
intRecCount:=DS_Year.RecordCount
else
intRecCount:=0;
QRLabel33.Caption:=inttostr(intRecCount);}
//DS_Year.Close;

end;
-------------------------
最奇怪的地方就是我把女客显示那块注销掉后,rbColumnHeader类型的QRBand中的QRLabel内容就能显示...否则加算是加一个QRLabel30的内容上去,rbColumnHeader类型的QRBand中的QRLabel内容也是不能显示的,上面女客的代码都是COPY码...帮忙看看看..先谢了~~
...全文
117 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
麦子VISA 2004-11-05
  • 打赏
  • 举报
回复
全部放在DETAIL里就行了~~谢谢眼睛
aiirii 2004-11-04
  • 打赏
  • 举报
回复
看不出問題, showMessage 下你要顯示的內容, 看是不是 空的, 空的, 當然看不到了

2,497

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 数据库相关
社区管理员
  • 数据库相关社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧