- Extends the DP class from SrsReportDataProviderPreProcessTempDB:
[
SRSReportParameterAttribute(classStr(ClassNameContract))
]
class ClassNameDP extends SrsReportDataProviderPreProcessTempDB
{
TableNameTmp tableNameTmpList;
}
- Write the processReport method:
public void processReport()
{
ClassNameContract contract = this.parmDataContract() as ClassNameContract;
RecordInsertList dataRecordInsertList = new RecordInsertList(tableNum(TableNameTmp), // table id
false, // skip insert
false, // skip database log
false, // skip events
false, // skip aos validation
false, // skip RLS validation
tableNameTmpList); // buffer where records will be inserted
fromDate = contract.parmFromDate();
toDate = contract.parmToDate();
tableNameTmpList.setConnection(this.parmUserConnection());
while select *
from orginalTable
where orginalTable .TransDate>= fromDate
&& orginalTable .TransDate <= toDate
{
tableNameTmpList.clear();
tableNameTmpList.Id = orginalTable .Id;
tableNameTmpList.Name = orginalTable .Name;
dataRecordInsertList.add(tableNameTmpList);
}
dataRecordInsertList.insertDatabase();
}
- Compile CIL
- Refresh dataset in SSRS design.
- Deploy report.
Comments
Post a Comment