小弟新手,看不太明白这段指今,敬请高手指点.谢谢.
float Ayear;
float Amonth;
float Aday;
long x;
long y;
long Row;
long StartTime;
string temp;
Ayear=ADate.Year;
Amonth=ADate.Month;
Aday=ADate.Day;
temp=StrFromInt( Ayear, 10 );
if(Amonth<10)
temp=temp+"-0"+StrFromInt( Amonth, 10 );
else
temp=temp+"-"+StrFromInt( Amonth, 10 );
if(Aday<10)
temp=temp+"-0"+StrFromInt( Aday, 10 );
else
temp=temp+"-"+StrFromInt( Aday, 10 );
\\本站点\选择日期=temp;
ReportSetCellString2("Report0", 4, 1, 27, 6, " "); //清空单元格
ReportSetCellString("Report0", 2, 2, temp);//填写日期
//查询数据
StartTime=HTConvertTime(Ayear,Amonth,Aday,0,0,0);
ReportSetHistData("Report0", "\\本站点\压力", StartTime, 3600, "B4:B27");
ReportSetHistData("Report0", "\\本站点\温度", StartTime, 3600, "C4:C27");
ReportSetHistData("Report0", "\\本站点\密度", StartTime, 3600, "D4:D27");
ReportSetHistData("Report0", "\\本站点\电流", StartTime, 3600, "E4:E27");
ReportSetHistData("Report0", "\\本站点\电压", StartTime, 3600, "F4:F27");
//填写时间
x=0;
while(x<24)
{
row=4+x;
y=StartTime+x*3600;
temp=StrFromTime( y, 2 );
ReportSetCellString("Report0", row, 1, temp);
x=x+1;
}
楼主最近还看过