RunbaseReport Class Call the Vend Report with Batch Function

hi,my friend, now i am in trouble now, i have wrote job call the my class extend runbasereport class,but the batch was not run it, the error occur " the SysQueryRun not initialized ", so who could told to me how i use the runbasereport in batchheader?

BatchHeader batchHeader;
WS_20120305_PrintReport_GR printReportGR;
;

batchHeader = BatchHeader::construct();
printReportGR = new WS_20120305_PrintReport_GR();
batchHeader.addTask(printReportGR);
batchHeader.parmAlerts(NoYes::Yes,NoYes::Yes,NoYes::Yes,NoYes::Yes,NoYes::No);
batchHeader.save();