为何用quickrep只能显示adodataset表里的最后一行,而dbgrid显示的数据正常 ( 积分: 50 )

  • 主题发起人 主题发起人 nicholas1
  • 开始时间 开始时间
N

nicholas1

Unregistered / Unconfirmed
GUEST, unregistred user!
DataModule1.ADODataSet1.CommandText:='select (select CNNAME fromdo
CTORUSER where WORKID=PATIENTSELF.ASKDR) AS 医生,ASKDR,COUNT(*) as 人数 from PATIENTSELF WHERE CHECKTIME>='''+startday+''' and CHECKTIME < '''+endday+''' GROUP by ASKDR';
//showmessage(DataModule1.ADODataSet1.CommandText);

DataModule1.ADODataSet1.Open;
DataModule1.ADODataSet1.Active:=true;
form3.QRDBText1.DataField:='医生' ;
form3.QRDBText2.DataField:='ASKDR' ;
Form3.QRDBText3.DataField:='人数' ;
Form3.QuickRep1.Preview;
 
DataModule1.ADODataSet1.CommandText:='select (select CNNAME fromdo
CTORUSER where WORKID=PATIENTSELF.ASKDR) AS 医生,ASKDR,COUNT(*) as 人数 from PATIENTSELF WHERE CHECKTIME>='''+startday+''' and CHECKTIME < '''+endday+''' GROUP by ASKDR';
//showmessage(DataModule1.ADODataSet1.CommandText);

DataModule1.ADODataSet1.Open;
DataModule1.ADODataSet1.Active:=true;
form3.QRDBText1.DataField:='医生' ;
form3.QRDBText2.DataField:='ASKDR' ;
Form3.QRDBText3.DataField:='人数' ;
Form3.QuickRep1.Preview;
 
搞定了,hoho
 
什么年代了还qr,把qr的dataset设为ds就vok了,搞定了就给我分把,哈哈
 
后退
顶部