SELECT MonthReport.OBJECT_KEY,MonthReport.ApprovalResult,MonthReport.factoryKey,MonthReport.ReportDate,MonthReport.CoalPowderlConsumption,MonthReport.CoalPowderHeat,PL_SITE.SITE_NAME,PL_SITE.SITE_NUMBER,PL_CELL.SEQUENCE,PL_CELL.CELL_NAME,PL_CELL.CELL_NUMBER,PL_CELL.DAILY_CAPACITY FROM dbo.[MonthReport] LEFT JOIN PL_SITE ON MonthReport.factoryKey = PL_SITE.OBJECT_KEY LEFT JOIN PL_CELL ON MonthReport.prodLineKey = PL_CELL.DCS_NUMBER where ApprovalLevel=2 ${if(type='year', " and year(dbo.[MonthReport].ReportDate) = '" + 年+"'", "")} ${if(len(公司名称) == 0,""," and SITE_NAME in ('" + 公司名称 + "')")} 这段代码是好用的,但是我只不过在where的后面加了一句order by SEQUENCE (因为要求按顺序显示),报表就显示不了了,预览数据是可以的,一运行就报错。。。这到底是什么鬼。。。 |
最佳回答 |
||||
0
|
|